Sim-Suction: Learning a Suction Grasp Policy for Cluttered Environments Using a Synthetic Benchmark.
Juncheng Li, David J. Cappelleri.
IEEE Transactions on Robotics
Paper |
Project Website
g5.2xlarge
instance type or larger for optimal performance and to prevent memory leak issues.500GB
.gp2
or gp3
). A throughput of 500 MiB/s
or higher is advisable.Element | Good | Ideal |
---|---|---|
OS | Ubuntu 20.04/22.04 | Ubuntu 20.04/22.04 |
CPU | Intel Core i7 (9th Generation) AMD Ryzen 7 |
Intel Core i9, X-series or higher AMD Ryzen 9, Threadripper or higher |
Cores | 8 | 16 |
RAM | 64GB* | 64GB* |
Storage | 500GB SSD | 1TB NVMe SSD |
GPU | GeForce RTX 3080 | RTX A6000 |
VRAM | 10GB* | 48GB* |
2022.2.1
(Ubuntu 20.04
or later, GPU Driver 525.60.11
)Before launching the project, ensure to install all the necessary dependencies:
Navigate to your Isaac Sim installation directory: Replace the given path with your specific installation directory if different:
cd path_to_your_isaac_sim_directory
# For instance:
cd ~/.local/share/ov/pkg/isaac_sim-2022.2.1
Install the necessary dependencies:
Navigate to the Sim-Suction-API
directory (which is this repository's root folder) and locate the isaac_sim_gen
folder. Within it, you'll find the issac_sim_requirements.txt
file. Replace [YOUR_PATH_TO_THIS_REPO]
with the path to the Sim-Suction-API
directory on your machine.
./python.sh -m pip install -r [YOUR_PATH_TO_THIS_REPO]/Sim-Suction-API/isaac_sim_gen/issac_sim_requirements.txt
Use the generate_cluttered.py
script to create synthetic cluttered environments. Below are the available options you can configure:
cd path_to_your_isaac_sim_directory
./python.sh [YOUR_PATH_TO_THIS_REPO]/Sim-Suction-API/isaac_sim_gen/generate_cluttered.py [OPTIONS]
generate_cluttered.py
:--headless
False
--asset_path
../nvidia_assets/*.usd
(relative to the script's directory)--asset_path1
../ShapeNet/*.usd
(relative to the script's directory)--save_data_path
../synthetic_data
(relative to the script's directory)--objects_per_stage
1 20
--max_stage
500
To reduce memory consumption, it's beneficial to leverage the USD’s Scenegraph Instancing functionality. This allows you to mark common meshes shared by different copies of the same robots as instanceable. Note that the instanceable assets are textureless.
Use the convert_instance.py
script to facilitate this process:
cd path_to_your_isaac_sim_directory
./python.sh [YOUR_PATH_TO_THIS_REPO]/Sim-Suction-API/isaac_sim_gen/convert_instance.py [OPTIONS]
convert_instance.py
:--headless
False
--data_path
../synthetic_data
(relative to the script's directory)Output:
[YOUR_PATH_TO_THIS_REPO]/Sim-Suction-API/synthetic_data/stage_{stage_ind}_instanceable.usd
{stage_ind}
will be replaced by the stage index number. Utilize the pointcloud_seal_eval.py
script to generate point clouds and evaluate seals.
Execute the script with:
./python.sh [YOUR_PATH_TO_THIS_REPO]/Sim-Suction-API/isaac_sim_gen/pointcloud_seal_eval.py [OPTIONS]
--headless
False
--debug_draw
True
--pcl_path
../pointcloud_train
(relative to the script's directory)--data_path
../synthetic_data
(relative to the script's directory)--instanceable_flag
True
--seg_dic_path
../seg_dic.pkl
(relative to the script's directory)--save_pcd_flag
False
--save_pkl_flag
False
--save_pcl_flag
False
--suction_radius
1.5
--deformation_threshold
0.15
.pcd File:
stage_folder+"/"+class_name+"_"+object_number+".pcd"
.pkl File:
data_root+"/stage_"+stage_ind+"/"+"stage_"+stage_ind+"_candidates_after_seal.pkl"
segmentation_id
, object_name
, rotation_after_seal_pass
, and more..npz File:
pointcloud_root+"/"+stage_ind+".npz"
Use the 1:1 testing board to evaluate the seal model.
Use ./testing_board/test_board.usd
to generate candidates after seal evaluation, and use ./testing_board/test_board.fbx
to 3D print the 1:1 model to perform real experiments.
Test Board Simulation |
Test Board 3D printed |
The simulation module orchestrates the process of simulating the UR10 robot's interactions with cluttered environments. It uses Isaac Sim to visualize and evaluate the robot's suction operations.
Before initiating the simulation, ensure the following:
../Props
directory.simulation_utils.py
file has the correct settings for the SurfaceGripper
function handle, which manages the suction parameters.Execute the simulation script suction_simulation.py
using the following:
./python.sh [YOUR_PATH_TO_THIS_REPO]/Sim-Suction-API/isaac_sim_gen/suction_simulation.py [OPTIONS]
--headless
: Run the simulation in headless mode. Set to True
when generating the dataset.
False
--RobotArm_path
: Specifies the path to the robot's USD file.
../Props/ur10_invisible_suction.usd
--SuctionCup_path
: Specifies the path to the robot's suction cup USD file.
../Props/short_gripper.usd
--data_path
: Path to the synthetic data directory.
../synthetic_data
--start_stage
: Determines the initial stage index for the simulation.
0
--end_stage
: Determines the concluding stage index for the simulation.
500
--grid_space
: Defines the grid spacing utilized when cloning environments.
300
The script generates a .pkl
file containing a dictionary data structure for the simulation evaluation results with keys such as rotation_after_exp_success
, translation_after_exp_success
, object_mass
, and more. The file is saved in the following format:
data_root+"/stage_"+stage_ind+"/"+"stage_"+stage_ind+"_candidates_after_simulation.pkl"
This script visualizes the suction evaluation results. It uses the Open3D library to display 3D point clouds and mesh objects.
To run the script, use the following command:
python3 [YOUR_PATH_TO_THIS_REPO]/Sim-Suction-API/isaac_sim_gen/
view_suction.py
[--data_path DATASET_PATH] [--stage_ID STAGE_ID] [--mode MODE] [--ground GROUND_PLANE] [--suction_radius RADIUS]
The command-line arguments are as follows:
--data_set_path
: The path to the dataset directory. Default is synthetic_data
.--stage_ID
: The stage ID number. Default is 0
.--mode
: The type of check to visualize. Choices are collision
, seal
, or simulation
. Default is seal
.--ground
: Whether to include the ground plane in the visualization. Choices are True
or False
. Default is False
.--suction_radius
: The suction radius to use. Default is 1.5
. The script generates a 3D visualization of the suction annotation results for the specified dataset and parameters. The visualization includes the point cloud data, suction candidates, and collision/seal/dynamic simulation results.
Execute the script sim_suction_label_processing.py
using the following:
python3 [YOUR_PATH_TO_THIS_REPO]/Sim-Suction-API/Sim-Suction-Pointnet/sim_suction_label_processing.py [OPTIONS]
--pcl_path
: Path to the point clouds.--data_path
: Path to the data.--label_path
: Path to save the labels.--save_label_flag
: Flag to save the suction labels as an npz file (default: False
).--has_color
: Flag to indicate if the point cloud has a color channel (default: False
).--start_stage
: Starting stage number (default: 0
).--end_stage
: Ending stage number (default: 500
).--suction_radius
: Suction radius for the KDTree (default: 1.5
).--debug_draw
: Flag to enable debug drawing mode (default: False
).The script generates the training suction labeling (binary) and stored in ../sim_suction_label
folder.
The code has been tested with CUDA 11.7
and pytorch 1.13.1
on ubuntu 20.04
. The training was performed on 2 A100 (80G) for 200 epochs.
Download and set your dataset paths:
data_root="/path/to/your/pointcloud_train"
suction_label_root="/path/to/your/sim_suction_label"
Install the utils of pointnet++ backbone:
cd /path/to/your/sim_suction_model/utils/pn2_utils
python3 setup.py install --user
cd /path/to/your/sim_suction_model/utils/pn2_utils/fuctions
python3 setup.py install --user
Execute the script sim_suction_train.py using the following:
python3 sim_suction_train.py [OPTIONS]
Options used in this repo:
--batch-size
: Specify the batch size for training (default is 64).--model-path
: To saved model pathDownload the google_selected Assets(novel)
and store it in ../google_selected
folder.
Download the test_similar dataset
and store it in ../test_similar
folder or use generate_cluttered script to generate your own test_similar dataset.
Download the test_novel dataset
and store it in ../test_novel
folder or use generate_cluttered script to generate your own test_novel dataset. (Note: use novel_seg_dic.pkl
generated from google_selected Assets for novel dataset)
cd path_to_your_isaac_sim_directory
./python.sh [YOUR_PATH_TO_THIS_REPO]/Sim-Suction-API/isaac_sim_gen/test_single_shot_generator.py [OPTIONS]
--dataset_type
: Choose the dataset type (either test_similar
or test_novel
).
test_novel
--headless
: Run in headless mode (Make it True when generating the dataset).
--data_path
: Define the path for the data.
test_similar
: ../test_similar
(relative to the script's directory)test_novel
: ../test_novel
(relative to the script's directory)--seg_dic_path
: Define the path for the segmentation dictionary.
test_similar
: ../seg_dic.pkl
(relative to the script's directory)test_novel
: ../novel_seg_dic.pkl
(relative to the script's directory)--save_pcl_path
: Define the path to save the single shot point cloud as an npz file.
test_similar
: ../test_similar_pointcloud
(relative to the script's directory)test_novel
: ../test_novel_pointcloud
(relative to the script's directory)--save_pcl_flag
: Flag to save the single shot point cloud as an npz file.
--frame_per_stage
: Define how many frames per stage.
--start_stage
: Define the starting stage number.
--end_stage
: Define the ending stage number.
--visualization_flag
: Flag to visualize the point cloud.
To visualize point clouds from either the test_similar
or test_novel
dataset, use the command below:
python3 [YOUR_PATH_TO_THIS_REPO]/Sim-Suction-API/isaac_sim_gen/view_pointcloud.py [OPTIONS]
--dataset_type
: Choose the dataset type (either test_similar
or test_novel
).
test_novel
--stage
: Define the stage number.
--frame
: Define the frame number.
Point Cloud from Test_Similar |
Point Cloud from Test_Novel |
Execute the script sim_suction_inference.py using the following:
python3 sim_suction_inference.py [OPTIONS]
--pointcloud_test_path
: Point cloud path.
../test_novel_pointcloud
../test_similar_pointcloud
, ../test_novel_pointcloud
--save_result_path
: Save result path.
../test_novel_inference_result
../test_similar_inference_result
, ../test_novel_inference_result
--total_frame
: Total frame number.
100
--total_stage
: Total stage number.
100
--model_name
: Model name.
/MV_PCL_1550_500.model
--model_path
: Saved model path.
--visualize
: Which subset to visualize.
top_1%
top_1
, top_1%
, top_5%
, top_10%
--visualization_flag
: Visualization flag.
False
--save_result_flag
: Save inference result flag.
True
Execute the script sim_suction_eval.py using the following:
(Notes: slow process takes more than 24 hours)
cd path_to_your_isaac_sim_directory
./python.sh [YOUR_PATH_TO_THIS_REPO]/Sim-Suction-API/Sim_Suction_Pointnet/sim_suction_eval.py [OPTIONS]
To get result metrics from saved ../test_similar_eval_result
, execute the script eval_post_processing.py using the following:
python3 eval_post_processing.py [OPTIONS]
Execute the sim_suction_demo.py script as follows:
python3 sim_suction_demo.py [OPTIONS]
Notes: use RGB and registered point cloud from demo folder.
--text_prompt
:
--box_threshold
:
--text_threshold
:
--device
:
--demo_path
:
current_directory+"/demo"
--demo_number
:
--suction_confident_threshold
:
The visualization below showcases the system's capability to identify and select cups for grasping.
suction_confident_threshold
. The greener the marker, the higher the confidence score.
Here you will find information about the updates and improvements in each release.
If you find this work useful for your research, please consider citing our paper:
@ARTICLE{10314015,
author={Li, Juncheng and Cappelleri, David J.},
journal={IEEE Transactions on Robotics},
title={Sim-Suction: Learning a Suction Grasp Policy for Cluttered Environments Using a Synthetic Benchmark},
year={2023},
volume={},
number={},
pages={1-16},
doi={10.1109/TRO.2023.3331679}}