PointNetGPD使用手册

news/2024/11/23 1:55:10/

1.创建环境+配置环境变量

mkdir -p $HOME/code/
cd $HOME/code/
 

- Set environment variable `PointNetGPD_FOLDER` in your `$HOME/.bashrc` file.
export PointNetGPD_FOLDER=$HOME/code/PointNetGPD
 

2.安装

1. Install `pcl-tools` via `sudo apt install pcl-tools`.
2. An example for create a virtual environment: `conda create -n pointnetgpd python=3.10 numpy ipython matplotlib opencv mayavi -c conda-forge`
3. Make sure in your Python environment do not have same package named ```meshpy``` or ```dexnet```.
4. Install PyTorch: https://pytorch.org/get-started/locally/

3.项目

1. Clone this repository:
cd $HOME/code
git clone https://github.com/lianghongzhuo/PointNetGPD.git
 

2. Install our requirements in `requirements.txt`
    cd $PointNetGPD_FOLDER
    pip install -r requirements.txt

3. Install our modified meshpy (Modify from [Berkeley Automation Lab: meshpy](https://github.com/BerkeleyAutomation/meshpy))
    cd $PointNetGPD_FOLDER/meshpy
    python setup.py develop
 

4. Install our modified dex-net (Modify from [Berkeley Automation Lab: dex-net](https://github.com/BerkeleyAutomation/dex-net))
    cd $PointNetGPD_FOLDER/dex-net
    python setup.py develop

5. Modify the gripper configurations to your own gripper
    vim $PointNetGPD_FOLDER/dex-net/data/grippers/robotiq_85/params.json

4.数据集

1.下载作者生成好的数据集: https://tams.informatik.uni-hamburg.de/research/datasets/PointNetGPD_grasps_dataset.zip
2.修改文件夹名字为`ycb_grasp`并移动到`$PointNetGPD_FOLDER/PointNetGPD/data/`

4.1 自己生成数据集

1. 下载YCB数据集:(http://ycb-benchmarks.s3-website-us-east-1.amazonaws.com/).
1.1 用命令下载数据集(https://github.com/lianghongzhuo/ycb-tools).
    cd $PointNetGPD_FOLDER/data
    git clone https://github.com/lianghongzhuo/ycb-tools
    cd ycb-tools
    python download_ycb_dataset.py rgbd_512

2. 数据集里内容格式:Manage your dataset at: `$PointNetGPD_FOLDER/PointNetGPD/data`
    Every object should have a folder, structure like this:
    ```
    ├002_master_chef_can
    |└── google_512k
    |    ├── nontextured.obj (generated by pcl-tools)
    |    ├── nontextured.ply
    |    ├── nontextured.sdf (generated by SDFGen)
    |└── rgbd
    |    ├── *.jpg
    |    ├── *.h5
    |    ├── ...
    ├003_cracker_box
    └004_sugar_box
    ...
    ```
3. Install SDFGen from [GitHub](https://github.com/jeffmahler/SDFGen.git):
    cd $PointNetGPD_FOLDER
    git clone https://github.com/jeffmahler/SDFGen.git
    cd SDFGen && mkdir build && cd build && cmake .. && make

4. Install [Open3D](http://www.open3d.org/docs/latest/getting_started.html)
    pip install open3d

5. Generate `nontextured.sdf` file and `nontextured.obj` file using `pcl-tools` and `SDFGen` by running:
    cd $PointNetGPD_FOLDER/dex-net/apps
    python read_file_sdf.py

6. Generate dataset by running the code:
    cd $PointNetGPD_FOLDER/dex-net/apps
    python generate-dataset-canny.py [prefix]
    where `[prefix]` is optional, it will add a prefix on the generated files.

5. 可视化结果

- Visualization grasps可视化抓取
    cd $PointNetGPD_FOLDER/dex-net/apps
    python read_grasps_from_file.py
    Note:
    - This file will visualize the grasps in `$PointNetGPD_FOLDER/PointNetGPD/data/ycb_grasp/` folder

- Visualization object normal可视化法线
    cd $PointNetGPD_FOLDER/dex-net/apps
    python Cal_norm.py
This code will check the norm calculated by `meshpy` and `pcl` library.

6.训练网络Training the network

1. YCB数据准备:
    cd $PointNetGPD_FOLDER/PointNetGPD/data

    Make sure you have the following files, The links to the dataset directory should add by yourself:
    ```
    ├── google2cloud.csv  (Transform from google_ycb model to ycb_rgbd model)
    ├── google2cloud.pkl  (Transform from google_ycb model to ycb_rgbd model)
    └── ycb_grasp  (generated grasps)
    ```

2.从RGBD图像中生成点云 you may change the number of process running in parallel if you use a shared host with others
    cd $PointNetGPD_FOLDER/PointNetGPD
    python ycb_cloud_generate.py
Note: Estimated running time at our `Intel(R) Xeon(R) CPU E5-2690 v4 @ 2.60GHz` dual CPU with 56 Threads is 36 hours. Please also remove objects beyond the capacity of the gripper.

7. Run the experiments:

    cd $PointNetGPD_FOLDER/PointNetGPD
 

    Launch a tensorboard for monitoring
    tensorboard --log-dir ./assets/log --port 8080
 

    and run an experiment for 200 epoch
    python main_1v.py --epoch 200 --mode train --batch-size x (x>1)
 

    File name and corresponding experiment:
    ```
    main_1v.py        --- 1-viewed point cloud, 2 class——单视角点云+2类
    main_1v_mc.py     --- 1-viewed point cloud, 3 class——单视角点云+3类
    main_1v_gpd.py    --- 1-viewed point cloud, GPD——单视角点云+GPD
    main_fullv.py     --- Full point cloud, 2 class——整个点云+2类
    main_fullv_mc.py  --- Full point cloud, 3 class——整个点云+3类
    main_fullv_gpd.py --- Full point cloud, GPD——整个点云+GPD
    ```

For GPD experiments, you may change the input channel number by modifying `input_chann` in the experiment scripts(only 3 and 12 channels are available)

8. 使用训练的网络Using the trained network

1. Get UR5 robot state:

    Goal of this step is to publish a ROS parameter tell the environment whether the UR5 robot is at home position or not.


    cd $PointNetGPD_FOLDER/dex-net/apps
    python get_ur5_robot_state.py

2. Run perception code:
    This code will take depth camera ROS info as input, and gives a set of good grasp candidates as output.
    All the input, output messages are using ROS messages.

    cd $PointNetGPD_FOLDER/dex-net/apps
    python kinect2grasp.py

    arguments:
    -h, --help                 show this help message and exit
    --cuda                     using cuda for get the network result
    --gpu GPU                  set GPU number
    --load-model LOAD_MODEL    set witch model you want to use (rewrite by model_type, do not use this arg)
    --show_final_grasp         show final grasp using mayavi, only for debug, not working on multi processing
    --tray_grasp               not finished grasp type
    --using_mp                 using multi processing to sample grasps
    --model_type MODEL_TYPE    selet a model type from 3 existing models
    ```


http://www.ppmy.cn/news/167875.html

相关文章

st58服务器装系统,联想 Thinksystem ST58服务器介绍

联想ThinkSystem ST58是一款易于管理的入门服务器,非常适合寻求提高生产效率的中小型企业、远程或分支办公室或零售环境。经过价值优化的主板结合最新的英特尔至强E-2100/2200处理器,为ST58提供优于高端台式机的出色价格,以及高于台式机方案的…

联想ThinkServer RD640 服务器做RAID 5

1.服务器开机,按CTRLH,进入raid管理界面 2.点击 configuration wizard 选项 3.清楚原有的raid配置 4.清空完原有的配置,然后重新配置 5.添加磁盘创建磁盘组 6.创建磁盘空间大小 7.设置raid 5 模式 8.配置虚拟设备 9.格式化虚拟磁盘 10.raid 5…

rd640服务器引导,联想RD640服务器内部介绍

联想RD640服务器内部介绍: 内部结构的设计往往对服务器的稳定性有着重大的影响,同时即使是相同部件,采用不同布局也可能呈现不同的性能。服务器内部布局对服务器的整体性能有着巨大的影响。接下来我们来看下联想RD640服务器的内部结构。 通过…

rd640服务器加硬盘,联想RD640服务器外部简介

联想RD640服务器外部简介 联想RD640服务器外部简介: 硬件是服务器产品的基础,对服务器的性能有着巨大的影响,服务器平台整体性能优劣我们可以从硬件设计方面看出一些端倪。外观设计精致细腻的产品,其产品内部设计自然也不会很差。…

联想服务器rq940运维端口,联想RQ940服务器,联想服务器总代,金牌分销

RQ940 ThinkServer RQ940提供企业级的性能和扩展能力,超高可靠性设计保证业务连续运转。可轻松应对虚拟化、内存数据库、高性能计算和任务关键型应用等要求为严苛的部署情形 RQ940采用4U 大小的4路服务器设计,可提供非凡的计算性能、RAS技术和更智能的灵…

联想服务器系统安装

1. 以下安装指南适合于没有raid 卡的情况,若系统中有raid 卡,安装操作系统时请参见raid 卡用户手册。 2. windows 2000不能识别主频高于2ghz的处理器。至强处理器需要操作系统安装新的补丁程序,安装servicepack4 以上版本补丁程序后&…

联想850服务器维护手册,联想ThinkSystem SN850服务器评测

今年7月,随着英特尔至强可扩展处理器家族的发布,联想在第一时间发布了10款全新的ThinkSystem服务器产品,产品类型覆盖塔式、机架、刀片、高密度服务器等,能够为不一样需要的客户提供丰富的产品选择。本次送测的是联想ThinkSystem …

联想x3850x6重装系统_中心管理服务器介绍及配置方案:联想服务器 X3850X6

中心管理服务器(CMS,CentralManagementServer),一般是指视频监控系统的中心管理服务器。 它可以: 作为B2BUA应用服务器提供网络视频监控业务; 作为管理中心提供客户/用户管理、前端/平台设备管理和虚拟域管理; 作为存储中心存储用户数据和业务参数配置数据; 作为Portal提…