├── manipgen
├── __init__.py
├── real_world
│ ├── __init__.py
│ ├── vlm_planning
│ │ ├── __init__.py
│ │ └── prompts
│ │ │ ├── planning_examples.py
│ │ │ ├── tagging_prompt.py
│ │ │ ├── segmentation_doublechecker_prompt.py
│ │ │ └── workspace_prompt.py
│ ├── utils
│ │ ├── constants.py
│ │ ├── vis_utils.py
│ │ ├── calibration_utils.py
│ │ └── rl_utils.py
│ └── scripts
│ │ ├── get_camera_intrinsics.py
│ │ └── run_manipgen.py
├── assets
│ ├── umi
│ │ ├── franka_finger_holder.stl
│ │ └── soft_gripper_finger.stl
│ ├── urdf
│ │ └── franka_description
│ │ │ └── meshes
│ │ │ ├── collision
│ │ │ ├── hand.stl
│ │ │ ├── finger.stl
│ │ │ ├── link0.stl
│ │ │ ├── link1.stl
│ │ │ ├── link2.stl
│ │ │ ├── link3.stl
│ │ │ ├── link4.stl
│ │ │ ├── link5.stl
│ │ │ ├── link6.stl
│ │ │ ├── link7.stl
│ │ │ ├── stltoobj.bat
│ │ │ ├── stltoobj.mlx
│ │ │ └── finger.obj
│ │ │ ├── visual
│ │ │ ├── daetoobj.mlx
│ │ │ ├── daetoobj.bat
│ │ │ ├── link1.mtl
│ │ │ ├── link2.mtl
│ │ │ ├── finger.mtl
│ │ │ ├── link5.mtl
│ │ │ ├── link4.mtl
│ │ │ ├── link3.mtl
│ │ │ ├── hand.mtl
│ │ │ ├── link7.mtl
│ │ │ ├── link0.mtl
│ │ │ └── link6.mtl
│ │ │ └── hande
│ │ │ ├── finger_1-collision-simple.obj
│ │ │ └── finger_2-collision-simple.obj
│ └── industreal
│ │ ├── yaml
│ │ ├── industreal_asset_info_gears.yaml
│ │ ├── industreal_asset_info_franka_table.yaml
│ │ └── industreal_asset_info_pegs.yaml
│ │ ├── mesh
│ │ ├── industreal_franka_table
│ │ │ ├── industreal_franka_finger_rubber_coll.mtl
│ │ │ ├── industreal_franka_finger_coll_subdiv_6x.mtl
│ │ │ └── industreal_franka_finger_rubber_viz.mtl
│ │ ├── industreal_pegs
│ │ │ ├── industreal_tray_insert_round_peg_12mm.mtl
│ │ │ ├── industreal_tray_insert_round_peg_16mm.mtl
│ │ │ ├── industreal_tray_insert_round_peg_4mm.mtl
│ │ │ ├── industreal_tray_insert_round_peg_8mm.mtl
│ │ │ ├── industreal_tray_pick_round_peg_12mm.mtl
│ │ │ ├── industreal_tray_pick_round_peg_16mm.mtl
│ │ │ ├── industreal_tray_pick_round_peg_4mm.mtl
│ │ │ ├── industreal_tray_pick_round_peg_8mm.mtl
│ │ │ ├── industreal_tray_insert_rectangular_peg_12mm.mtl
│ │ │ ├── industreal_tray_insert_rectangular_peg_16mm.mtl
│ │ │ ├── industreal_tray_insert_rectangular_peg_4mm.mtl
│ │ │ ├── industreal_tray_insert_rectangular_peg_8mm.mtl
│ │ │ ├── industreal_tray_pick_rectangular_peg_12mm.mtl
│ │ │ ├── industreal_tray_pick_rectangular_peg_16mm.mtl
│ │ │ ├── industreal_tray_pick_rectangular_peg_4mm.mtl
│ │ │ └── industreal_tray_pick_rectangular_peg_8mm.mtl
│ │ └── industreal_gears
│ │ │ ├── industreal_gear_base.mtl
│ │ │ ├── industreal_gear_large.mtl
│ │ │ ├── industreal_gear_medium.mtl
│ │ │ └── industreal_gear_small.mtl
│ │ └── urdf
│ │ ├── industreal_franka_finray_finger_changelog.txt
│ │ ├── industreal_gear_base.urdf
│ │ ├── industreal_gear_large.urdf
│ │ ├── industreal_gear_small.urdf
│ │ ├── industreal_gear_medium.urdf
│ │ ├── industreal_round_peg_4mm.urdf
│ │ ├── industreal_round_peg_8mm.urdf
│ │ ├── industreal_round_peg_12mm.urdf
│ │ ├── industreal_round_peg_16mm.urdf
│ │ ├── industreal_rectangular_peg_4mm.urdf
│ │ ├── industreal_rectangular_peg_8mm.urdf
│ │ ├── industreal_rectangular_peg_12mm.urdf
│ │ ├── industreal_rectangular_peg_16mm.urdf
│ │ ├── industreal_round_hole_4mm.urdf
│ │ ├── industreal_round_hole_8mm.urdf
│ │ ├── industreal_round_hole_12mm.urdf
│ │ ├── industreal_round_hole_16mm.urdf
│ │ ├── industreal_rectangular_hole_4mm.urdf
│ │ ├── industreal_rectangular_hole_8mm.urdf
│ │ ├── industreal_rectangular_hole_12mm.urdf
│ │ ├── industreal_rectangular_hole_16mm.urdf
│ │ └── industreal_franka_urdf_changelog.txt
├── config
│ ├── dagger
│ │ ├── pick.yaml
│ │ ├── open.yaml
│ │ ├── close.yaml
│ │ ├── pick_cube.yaml
│ │ ├── place.yaml
│ │ ├── place_cube.yaml
│ │ ├── grasp_handle.yaml
│ │ └── robomimic
│ │ │ ├── base_pcd.json
│ │ │ ├── base_depth.json
│ │ │ ├── bc_transformer.json
│ │ │ ├── bc_transformer_gmm.json
│ │ │ ├── bc_gmm.json
│ │ │ ├── bc_rnn.json
│ │ │ ├── bc_mlp.json
│ │ │ └── bc_rnn_gmm.json
│ ├── real
│ │ ├── place.yaml
│ │ ├── open.yaml
│ │ ├── close.yaml
│ │ ├── grasp_handle.yaml
│ │ ├── pick.yaml
│ │ └── perception.yaml
│ ├── train
│ │ ├── open.yaml
│ │ ├── pick.yaml
│ │ ├── close.yaml
│ │ ├── place.yaml
│ │ ├── reach.yaml
│ │ ├── place_cube.yaml
│ │ ├── grasp_handle.yaml
│ │ └── pick_cube.yaml
│ ├── task
│ │ ├── pick_cube.yaml
│ │ ├── reach.yaml
│ │ ├── place_cube.yaml
│ │ ├── grasp_handle.yaml
│ │ ├── open.yaml
│ │ ├── close.yaml
│ │ ├── pick.yaml
│ │ ├── place.yaml
│ │ └── IndustRealBase.yaml
│ ├── config_test.yaml
│ ├── config_train.yaml
│ └── config_sample.yaml
├── utils
│ ├── policy_testers
│ │ ├── reach_test.py
│ │ ├── __init__.py
│ │ ├── grasp_handle_tester.py
│ │ ├── place_cube_tester.py
│ │ ├── open_tester.py
│ │ ├── pick_cube_tester.py
│ │ └── place_tester.py
│ ├── initial_state_samplers
│ │ └── __init__.py
│ └── robomimic_utils.py
├── scripts
│ ├── download_checkpoints.sh
│ ├── download_datasets.sh
│ └── urdf_templates
│ │ └── pseudo_articulated_object.urdf
├── envs
│ ├── __init__.py
│ └── franka_close.py
├── object_lists
│ └── articulated
│ │ └── 0.txt
├── test_policy.py
├── multitask_dagger_loop.py
└── train.py
├── imgs
├── manipgen.jpg
├── mechanical_data.jpeg
└── example_wrist_view.gif
├── setup.py
├── requirements.txt
├── install.sh
└── .gitmodules
/manipgen/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/manipgen/real_world/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/manipgen/real_world/vlm_planning/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/imgs/manipgen.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mihdalal/manipgen/HEAD/imgs/manipgen.jpg
--------------------------------------------------------------------------------
/imgs/mechanical_data.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mihdalal/manipgen/HEAD/imgs/mechanical_data.jpeg
--------------------------------------------------------------------------------
/imgs/example_wrist_view.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mihdalal/manipgen/HEAD/imgs/example_wrist_view.gif
--------------------------------------------------------------------------------
/manipgen/assets/umi/franka_finger_holder.stl:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mihdalal/manipgen/HEAD/manipgen/assets/umi/franka_finger_holder.stl
--------------------------------------------------------------------------------
/manipgen/assets/umi/soft_gripper_finger.stl:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mihdalal/manipgen/HEAD/manipgen/assets/umi/soft_gripper_finger.stl
--------------------------------------------------------------------------------
/manipgen/assets/urdf/franka_description/meshes/collision/hand.stl:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mihdalal/manipgen/HEAD/manipgen/assets/urdf/franka_description/meshes/collision/hand.stl
--------------------------------------------------------------------------------
/manipgen/assets/urdf/franka_description/meshes/collision/finger.stl:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mihdalal/manipgen/HEAD/manipgen/assets/urdf/franka_description/meshes/collision/finger.stl
--------------------------------------------------------------------------------
/manipgen/assets/urdf/franka_description/meshes/collision/link0.stl:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mihdalal/manipgen/HEAD/manipgen/assets/urdf/franka_description/meshes/collision/link0.stl
--------------------------------------------------------------------------------
/manipgen/assets/urdf/franka_description/meshes/collision/link1.stl:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mihdalal/manipgen/HEAD/manipgen/assets/urdf/franka_description/meshes/collision/link1.stl
--------------------------------------------------------------------------------
/manipgen/assets/urdf/franka_description/meshes/collision/link2.stl:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mihdalal/manipgen/HEAD/manipgen/assets/urdf/franka_description/meshes/collision/link2.stl
--------------------------------------------------------------------------------
/manipgen/assets/urdf/franka_description/meshes/collision/link3.stl:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mihdalal/manipgen/HEAD/manipgen/assets/urdf/franka_description/meshes/collision/link3.stl
--------------------------------------------------------------------------------
/manipgen/assets/urdf/franka_description/meshes/collision/link4.stl:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mihdalal/manipgen/HEAD/manipgen/assets/urdf/franka_description/meshes/collision/link4.stl
--------------------------------------------------------------------------------
/manipgen/assets/urdf/franka_description/meshes/collision/link5.stl:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mihdalal/manipgen/HEAD/manipgen/assets/urdf/franka_description/meshes/collision/link5.stl
--------------------------------------------------------------------------------
/manipgen/assets/urdf/franka_description/meshes/collision/link6.stl:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mihdalal/manipgen/HEAD/manipgen/assets/urdf/franka_description/meshes/collision/link6.stl
--------------------------------------------------------------------------------
/manipgen/assets/urdf/franka_description/meshes/collision/link7.stl:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mihdalal/manipgen/HEAD/manipgen/assets/urdf/franka_description/meshes/collision/link7.stl
--------------------------------------------------------------------------------
/manipgen/assets/urdf/franka_description/meshes/visual/daetoobj.mlx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/manipgen/assets/industreal/yaml/industreal_asset_info_gears.yaml:
--------------------------------------------------------------------------------
1 | base:
2 | height: 0.005
3 | density: 2700.0
4 | gears:
5 | height: 0.025
6 | density: 1000.0
7 | grasp_offset: 0.017
8 | shafts:
9 | height: 0.020
--------------------------------------------------------------------------------
/manipgen/assets/industreal/mesh/industreal_franka_table/industreal_franka_finger_rubber_coll.mtl:
--------------------------------------------------------------------------------
1 | newmtl 0.752941_0.752941_0.752941_0.000000_0.000000
2 | Ka 0.0000 0.0000 0.0000
3 | Kd 0.7529 0.7529 0.7529
4 | Ks 0.0000 0.0000 0.0000
5 | Tf 0.0000 0.0000 0.0000
6 | d 1
7 | Ns 0
8 |
--------------------------------------------------------------------------------
/setup.py:
--------------------------------------------------------------------------------
1 | from distutils.core import setup
2 |
3 | setup(
4 | name="manipgen",
5 | version="1.0.0",
6 | install_requires=[],
7 | author="Murtaza Dalal",
8 | author_email="mdalal@andrew.cmu.edu",
9 | url="none",
10 | packages=["manipgen"],
11 | )
12 |
13 |
--------------------------------------------------------------------------------
/manipgen/assets/urdf/franka_description/meshes/visual/daetoobj.bat:
--------------------------------------------------------------------------------
1 | SET PATH=%PATH%;C:/Tools/Assimp/bin/x64/
2 | forfiles /m *.dae /c "cmd /c assimp export @file @fname.obj --verbose --show-log -ptv"
3 |
4 | REM SET PATH=%PATH%;C:/Program Files/VCG/MeshLab/
5 | REM forfiles /m *.dae /c "cmd /c meshlabserver -i @file -o @fname.obj -m vn vt
--------------------------------------------------------------------------------
/manipgen/assets/industreal/urdf/industreal_franka_finray_finger_changelog.txt:
--------------------------------------------------------------------------------
1 | Changes to industreal_franka.urdf:
2 | 1. replace industreal finger with finray finger
3 | 2. offset fingertip and fingertip centered position by 0.0959 along z-axis
4 | 3. offset panda hand position by 0.004 along z-axis
5 | 4. add camera mount visual mesh to urdf
6 |
--------------------------------------------------------------------------------
/manipgen/assets/urdf/franka_description/meshes/collision/stltoobj.bat:
--------------------------------------------------------------------------------
1 | REM SET PATH=%PATH%;C:/Tools/Assimp/bin/x64/
2 | REM forfiles /m *.dae /c "cmd /c assimp export @file @fname.obj --verbose --show-log -ptv"
3 |
4 | SET PATH=%PATH%;C:/Program Files/VCG/MeshLab/
5 | forfiles /m *.stl /c "cmd /c meshlabserver -i @file -o @fname.obj -m vn -s stltoobj.mlx"
--------------------------------------------------------------------------------
/manipgen/assets/urdf/franka_description/meshes/visual/link1.mtl:
--------------------------------------------------------------------------------
1 | # Blender MTL File: 'None'
2 | # Material Count: 1
3 |
4 | newmtl Part__Feature_001
5 | Ns -1.960784
6 | Ka 1.000000 1.000000 1.000000
7 | Kd 1.000000 1.000000 1.000000
8 | Ks 0.062500 0.062500 0.062500
9 | Ke 0.000000 0.000000 0.000000
10 | Ni 1.000000
11 | d 1.000000
12 | illum 2
13 |
--------------------------------------------------------------------------------
/manipgen/assets/urdf/franka_description/meshes/visual/link2.mtl:
--------------------------------------------------------------------------------
1 | # Blender MTL File: 'None'
2 | # Material Count: 1
3 |
4 | newmtl Part__Feature024
5 | Ns -1.960784
6 | Ka 1.000000 1.000000 1.000000
7 | Kd 1.000000 1.000000 1.000000
8 | Ks 0.125000 0.125000 0.125000
9 | Ke 0.000000 0.000000 0.000000
10 | Ni 1.000000
11 | d 1.000000
12 | illum 2
13 |
--------------------------------------------------------------------------------
/manipgen/assets/industreal/mesh/industreal_pegs/industreal_tray_insert_round_peg_12mm.mtl:
--------------------------------------------------------------------------------
1 | # Blender 3.5.1 MTL File: 'None'
2 | # www.blender.org
3 |
4 | newmtl Material.007
5 | Ns 250.000000
6 | Ka 1.000000 1.000000 1.000000
7 | Kd 0.955973 0.871366 0.791298
8 | Ks 0.500000 0.500000 0.500000
9 | Ke 0.000000 0.000000 0.000000
10 | Ni 1.450000
11 | d 1.000000
12 | illum 2
13 |
--------------------------------------------------------------------------------
/manipgen/assets/industreal/mesh/industreal_pegs/industreal_tray_insert_round_peg_16mm.mtl:
--------------------------------------------------------------------------------
1 | # Blender 3.5.1 MTL File: 'None'
2 | # www.blender.org
3 |
4 | newmtl Material.008
5 | Ns 250.000000
6 | Ka 1.000000 1.000000 1.000000
7 | Kd 0.955973 0.871366 0.791298
8 | Ks 0.500000 0.500000 0.500000
9 | Ke 0.000000 0.000000 0.000000
10 | Ni 1.450000
11 | d 1.000000
12 | illum 2
13 |
--------------------------------------------------------------------------------
/manipgen/assets/industreal/mesh/industreal_pegs/industreal_tray_insert_round_peg_4mm.mtl:
--------------------------------------------------------------------------------
1 | # Blender 3.5.1 MTL File: 'None'
2 | # www.blender.org
3 |
4 | newmtl Material.005
5 | Ns 250.000000
6 | Ka 1.000000 1.000000 1.000000
7 | Kd 0.955973 0.871366 0.791298
8 | Ks 0.500000 0.500000 0.500000
9 | Ke 0.000000 0.000000 0.000000
10 | Ni 1.450000
11 | d 1.000000
12 | illum 2
13 |
--------------------------------------------------------------------------------
/manipgen/assets/industreal/mesh/industreal_pegs/industreal_tray_insert_round_peg_8mm.mtl:
--------------------------------------------------------------------------------
1 | # Blender 3.5.1 MTL File: 'None'
2 | # www.blender.org
3 |
4 | newmtl Material.006
5 | Ns 250.000000
6 | Ka 1.000000 1.000000 1.000000
7 | Kd 0.955973 0.871366 0.791298
8 | Ks 0.500000 0.500000 0.500000
9 | Ke 0.000000 0.000000 0.000000
10 | Ni 1.450000
11 | d 1.000000
12 | illum 2
13 |
--------------------------------------------------------------------------------
/manipgen/assets/industreal/mesh/industreal_pegs/industreal_tray_pick_round_peg_12mm.mtl:
--------------------------------------------------------------------------------
1 | # Blender 3.5.1 MTL File: 'None'
2 | # www.blender.org
3 |
4 | newmtl Material.015
5 | Ns 250.000000
6 | Ka 1.000000 1.000000 1.000000
7 | Kd 0.955973 0.871366 0.791298
8 | Ks 0.500000 0.500000 0.500000
9 | Ke 0.000000 0.000000 0.000000
10 | Ni 1.450000
11 | d 1.000000
12 | illum 2
13 |
--------------------------------------------------------------------------------
/manipgen/assets/industreal/mesh/industreal_pegs/industreal_tray_pick_round_peg_16mm.mtl:
--------------------------------------------------------------------------------
1 | # Blender 3.5.1 MTL File: 'None'
2 | # www.blender.org
3 |
4 | newmtl Material.016
5 | Ns 250.000000
6 | Ka 1.000000 1.000000 1.000000
7 | Kd 0.955973 0.871366 0.791298
8 | Ks 0.500000 0.500000 0.500000
9 | Ke 0.000000 0.000000 0.000000
10 | Ni 1.450000
11 | d 1.000000
12 | illum 2
13 |
--------------------------------------------------------------------------------
/manipgen/assets/industreal/mesh/industreal_pegs/industreal_tray_pick_round_peg_4mm.mtl:
--------------------------------------------------------------------------------
1 | # Blender 3.5.1 MTL File: 'None'
2 | # www.blender.org
3 |
4 | newmtl Material.013
5 | Ns 250.000000
6 | Ka 1.000000 1.000000 1.000000
7 | Kd 0.955973 0.871366 0.791298
8 | Ks 0.500000 0.500000 0.500000
9 | Ke 0.000000 0.000000 0.000000
10 | Ni 1.450000
11 | d 1.000000
12 | illum 2
13 |
--------------------------------------------------------------------------------
/manipgen/assets/industreal/mesh/industreal_pegs/industreal_tray_pick_round_peg_8mm.mtl:
--------------------------------------------------------------------------------
1 | # Blender 3.5.1 MTL File: 'None'
2 | # www.blender.org
3 |
4 | newmtl Material.014
5 | Ns 250.000000
6 | Ka 1.000000 1.000000 1.000000
7 | Kd 0.955973 0.871366 0.791298
8 | Ks 0.500000 0.500000 0.500000
9 | Ke 0.000000 0.000000 0.000000
10 | Ni 1.450000
11 | d 1.000000
12 | illum 2
13 |
--------------------------------------------------------------------------------
/manipgen/assets/industreal/mesh/industreal_pegs/industreal_tray_insert_rectangular_peg_12mm.mtl:
--------------------------------------------------------------------------------
1 | # Blender 3.5.1 MTL File: 'None'
2 | # www.blender.org
3 |
4 | newmtl Material.003
5 | Ns 250.000000
6 | Ka 1.000000 1.000000 1.000000
7 | Kd 0.955973 0.871366 0.791298
8 | Ks 0.500000 0.500000 0.500000
9 | Ke 0.000000 0.000000 0.000000
10 | Ni 1.450000
11 | d 1.000000
12 | illum 2
13 |
--------------------------------------------------------------------------------
/manipgen/assets/industreal/mesh/industreal_pegs/industreal_tray_insert_rectangular_peg_16mm.mtl:
--------------------------------------------------------------------------------
1 | # Blender 3.5.1 MTL File: 'None'
2 | # www.blender.org
3 |
4 | newmtl Material.004
5 | Ns 250.000000
6 | Ka 1.000000 1.000000 1.000000
7 | Kd 0.955973 0.871366 0.791298
8 | Ks 0.500000 0.500000 0.500000
9 | Ke 0.000000 0.000000 0.000000
10 | Ni 1.450000
11 | d 1.000000
12 | illum 2
13 |
--------------------------------------------------------------------------------
/manipgen/assets/industreal/mesh/industreal_pegs/industreal_tray_insert_rectangular_peg_4mm.mtl:
--------------------------------------------------------------------------------
1 | # Blender 3.5.1 MTL File: 'None'
2 | # www.blender.org
3 |
4 | newmtl Material.001
5 | Ns 250.000000
6 | Ka 1.000000 1.000000 1.000000
7 | Kd 0.955973 0.871366 0.791298
8 | Ks 0.500000 0.500000 0.500000
9 | Ke 0.000000 0.000000 0.000000
10 | Ni 1.450000
11 | d 1.000000
12 | illum 2
13 |
--------------------------------------------------------------------------------
/manipgen/assets/industreal/mesh/industreal_pegs/industreal_tray_insert_rectangular_peg_8mm.mtl:
--------------------------------------------------------------------------------
1 | # Blender 3.5.1 MTL File: 'None'
2 | # www.blender.org
3 |
4 | newmtl Material.002
5 | Ns 250.000000
6 | Ka 1.000000 1.000000 1.000000
7 | Kd 0.955973 0.871366 0.791298
8 | Ks 0.500000 0.500000 0.500000
9 | Ke 0.000000 0.000000 0.000000
10 | Ni 1.450000
11 | d 1.000000
12 | illum 2
13 |
--------------------------------------------------------------------------------
/manipgen/assets/industreal/mesh/industreal_pegs/industreal_tray_pick_rectangular_peg_12mm.mtl:
--------------------------------------------------------------------------------
1 | # Blender 3.5.1 MTL File: 'None'
2 | # www.blender.org
3 |
4 | newmtl Material.011
5 | Ns 250.000000
6 | Ka 1.000000 1.000000 1.000000
7 | Kd 0.955973 0.871366 0.791298
8 | Ks 0.500000 0.500000 0.500000
9 | Ke 0.000000 0.000000 0.000000
10 | Ni 1.450000
11 | d 1.000000
12 | illum 2
13 |
--------------------------------------------------------------------------------
/manipgen/assets/industreal/mesh/industreal_pegs/industreal_tray_pick_rectangular_peg_16mm.mtl:
--------------------------------------------------------------------------------
1 | # Blender 3.5.1 MTL File: 'None'
2 | # www.blender.org
3 |
4 | newmtl Material.012
5 | Ns 250.000000
6 | Ka 1.000000 1.000000 1.000000
7 | Kd 0.955973 0.871366 0.791298
8 | Ks 0.500000 0.500000 0.500000
9 | Ke 0.000000 0.000000 0.000000
10 | Ni 1.450000
11 | d 1.000000
12 | illum 2
13 |
--------------------------------------------------------------------------------
/manipgen/assets/industreal/mesh/industreal_pegs/industreal_tray_pick_rectangular_peg_4mm.mtl:
--------------------------------------------------------------------------------
1 | # Blender 3.5.1 MTL File: 'None'
2 | # www.blender.org
3 |
4 | newmtl Material.009
5 | Ns 250.000000
6 | Ka 1.000000 1.000000 1.000000
7 | Kd 0.955973 0.871366 0.791298
8 | Ks 0.500000 0.500000 0.500000
9 | Ke 0.000000 0.000000 0.000000
10 | Ni 1.450000
11 | d 1.000000
12 | illum 2
13 |
--------------------------------------------------------------------------------
/manipgen/assets/industreal/mesh/industreal_pegs/industreal_tray_pick_rectangular_peg_8mm.mtl:
--------------------------------------------------------------------------------
1 | # Blender 3.5.1 MTL File: 'None'
2 | # www.blender.org
3 |
4 | newmtl Material.010
5 | Ns 250.000000
6 | Ka 1.000000 1.000000 1.000000
7 | Kd 0.955973 0.871366 0.791298
8 | Ks 0.500000 0.500000 0.500000
9 | Ke 0.000000 0.000000 0.000000
10 | Ni 1.450000
11 | d 1.000000
12 | illum 2
13 |
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | numpy==1.23.5
2 | rtree==1.1.0
3 | imageio==2.33.1
4 | moviepy==1.0.3
5 | meson
6 | ray
7 | submitit
8 | open3d
9 | wandb
10 | torch==2.1.1
11 | torchvision==0.16.1
12 | pyrealsense2
13 | h5py
14 | lxml
15 | geometrout==0.0.3.4
16 | kornia
17 | meshcat
18 | opencv-python
19 | pycocotools
20 | matplotlib
21 | autolab_core
22 | pytorch-kinematics
23 | hydra-core>=1.2
24 |
--------------------------------------------------------------------------------
/manipgen/assets/industreal/mesh/industreal_gears/industreal_gear_base.mtl:
--------------------------------------------------------------------------------
1 | # Blender 3.5.1 MTL File: 'None'
2 | # www.blender.org
3 |
4 | newmtl 0.615686_0.811765_0.929412_0.000000_0.000000
5 | Ns 0.000000
6 | Ka 1.000000 1.000000 1.000000
7 | Kd 0.015996 0.258183 0.015996
8 | Ks 0.000000 0.000000 0.000000
9 | Ke 0.000000 0.000000 0.000000
10 | Ni 1.450000
11 | d 1.000000
12 | illum 1
13 |
--------------------------------------------------------------------------------
/manipgen/assets/industreal/mesh/industreal_gears/industreal_gear_large.mtl:
--------------------------------------------------------------------------------
1 | # Blender 3.5.1 MTL File: 'None'
2 | # www.blender.org
3 |
4 | newmtl 0.752941_0.752941_0.752941_0.000000_0.000000
5 | Ns 0.000000
6 | Ka 1.000000 1.000000 1.000000
7 | Kd 0.955973 0.871366 0.791298
8 | Ks 0.000000 0.000000 0.000000
9 | Ke 0.000000 0.000000 0.000000
10 | Ni 1.450000
11 | d 1.000000
12 | illum 1
13 |
--------------------------------------------------------------------------------
/manipgen/assets/industreal/mesh/industreal_franka_table/industreal_franka_finger_coll_subdiv_6x.mtl:
--------------------------------------------------------------------------------
1 | # Blender MTL File: 'None'
2 | # Material Count: 1
3 |
4 | newmtl 0.980392_0.713725_0.003922_0.000000_0.000000
5 | Ns 0.000000
6 | Ka 1.000000 1.000000 1.000000
7 | Kd 0.980400 0.713700 0.003922
8 | Ks 0.000000 0.000000 0.000000
9 | Ke 0.000000 0.000000 0.000000
10 | Ni 1.450000
11 | d 1.000000
12 | illum 1
13 |
--------------------------------------------------------------------------------
/manipgen/real_world/utils/constants.py:
--------------------------------------------------------------------------------
1 | import numpy as np
2 |
3 |
4 | FRANKA_LOWER_LIMITS = np.array([-2.8973, -1.7628, -2.8973, -3.0718, -2.8973, 0.05, -2.8973])
5 | FRANKA_UPPER_LIMITS = np.array([2.8973, 1.7628, 2.8973, -0.0698, 2.8973, 3.75, 2.8973])
6 | FRANKA_VELOCITY_LIMIT = np.array([2.1750, 2.1750, 2.1750, 2.1750, 2.6100, 2.6100, 2.6100])
7 | FRANKA_ACCELERATION_LIMIT = np.array([15.0, 7.5, 10.0, 12.5, 15.0, 20.0, 20.0])
--------------------------------------------------------------------------------
/manipgen/config/dagger/pick.yaml:
--------------------------------------------------------------------------------
1 | dataset_path: datasets/pick_depth
2 | batch_size: None # defaults to value in student robomimic cfg
3 | lr: None # defaults to value in student robomimic cfg
4 | deterministic_expert: True
5 | buffer_size: 1000
6 | num_learning_iterations: 2000
7 | num_learning_epochs: 5
8 | num_transitions_per_iter: 32
9 | student_cfg_path: config/dagger/robomimic/template.json
10 | visual_obs_type: depth # 'depth' or 'pcd'
11 | use_seg_obs: True # include segmantation mask of first frame in obs
12 | multitask: False
--------------------------------------------------------------------------------
/manipgen/config/dagger/open.yaml:
--------------------------------------------------------------------------------
1 | dataset_path: datasets/open_depth
2 | batch_size: None # defaults to value in student robomimic cfg
3 | lr: None # defaults to value in student robomimic cfg
4 | deterministic_expert: True
5 | buffer_size: 1000
6 | num_learning_iterations: 2000
7 | num_learning_epochs: 5
8 | num_transitions_per_iter: 32
9 | student_cfg_path: config/dagger/robomimic/template.json
10 | visual_obs_type: depth # 'depth' or 'pcd'
11 | use_seg_obs: False # include segmantation mask of first frame in obs
12 | multitask: False
13 |
--------------------------------------------------------------------------------
/manipgen/config/dagger/close.yaml:
--------------------------------------------------------------------------------
1 | dataset_path: datasets/close_depth
2 | batch_size: None # defaults to value in student robomimic cfg
3 | lr: None # defaults to value in student robomimic cfg
4 | deterministic_expert: True
5 | buffer_size: 1000
6 | num_learning_iterations: 2000
7 | num_learning_epochs: 5
8 | num_transitions_per_iter: 32
9 | student_cfg_path: config/dagger/robomimic/template.json
10 | visual_obs_type: depth # 'depth' or 'pcd'
11 | use_seg_obs: False # include segmantation mask of first frame in obs
12 | multitask: False
13 |
--------------------------------------------------------------------------------
/manipgen/config/dagger/pick_cube.yaml:
--------------------------------------------------------------------------------
1 | dataset_path: datasets/pick_cube_depth
2 | batch_size: None # defaults to value in student robomimic cfg
3 | lr: None # defaults to value in student robomimic cfg
4 | deterministic_expert: True
5 | buffer_size: 1000
6 | num_learning_iterations: 2000
7 | num_learning_epochs: 5
8 | num_transitions_per_iter: 32
9 | student_cfg_path: config/dagger/robomimic/template.json
10 | visual_obs_type: depth # 'depth' or 'pcd'
11 | use_seg_obs: False # include segmantation mask of first frame in obs
12 | multitask: False
--------------------------------------------------------------------------------
/manipgen/config/dagger/place.yaml:
--------------------------------------------------------------------------------
1 | dataset_path: datasets/place_depth
2 | batch_size: None # defaults to value in student robomimic cfg
3 | lr: None # defaults to value in student robomimic cfg
4 | deterministic_expert: True
5 | buffer_size: 1000
6 | num_learning_iterations: 2000
7 | num_learning_epochs: 5
8 | num_transitions_per_iter: 32
9 | student_cfg_path: config/dagger/robomimic/template.json
10 | visual_obs_type: depth # 'depth' or 'pcd'
11 | use_seg_obs: False # include segmantation mask of first frame in obs
12 | multitask: False
13 |
--------------------------------------------------------------------------------
/manipgen/config/dagger/place_cube.yaml:
--------------------------------------------------------------------------------
1 | dataset_path: datasets/place_cube_depth
2 | batch_size: None # defaults to value in student robomimic cfg
3 | lr: None # defaults to value in student robomimic cfg
4 | deterministic_expert: True
5 | buffer_size: 1000
6 | num_learning_iterations: 2000
7 | num_learning_epochs: 5
8 | num_transitions_per_iter: 32
9 | student_cfg_path: config/dagger/robomimic/template.json
10 | visual_obs_type: depth # 'depth' or 'pcd'
11 | use_seg_obs: False # include segmantation mask of first frame in obs
12 | multitask: False
--------------------------------------------------------------------------------
/manipgen/config/dagger/grasp_handle.yaml:
--------------------------------------------------------------------------------
1 | dataset_path: datasets/grasp_handle_depth
2 | batch_size: None # defaults to value in student robomimic cfg
3 | lr: None # defaults to value in student robomimic cfg
4 | deterministic_expert: True
5 | buffer_size: 1000
6 | num_learning_iterations: 2000
7 | num_learning_epochs: 5
8 | num_transitions_per_iter: 32
9 | student_cfg_path: config/dagger/robomimic/template.json
10 | visual_obs_type: depth # 'depth' or 'pcd'
11 | use_seg_obs: False # include segmantation mask of first frame in obs
12 | multitask: False
13 |
--------------------------------------------------------------------------------
/manipgen/assets/industreal/yaml/industreal_asset_info_franka_table.yaml:
--------------------------------------------------------------------------------
1 | franka_hand_length: 0.0584 # distance from origin of hand to origin of finger
2 | franka_finger_length: 0.053671 # distance from origin of finger to bottom of fingerpad
3 | franka_fingerpad_length: 0.017608 # distance from top of inner surface of fingerpad to bottom of inner surface of fingerpad
4 | franka_gripper_width_max: 0.080 # maximum opening width of gripper
5 |
6 | table_depth: 1.40 # depth of table
7 | table_width: 1.40 # width of table
8 | table_height: 1.04 # height of table
9 |
--------------------------------------------------------------------------------
/manipgen/utils/policy_testers/reach_test.py:
--------------------------------------------------------------------------------
1 | from isaacgym import gymtorch
2 |
3 | import torch
4 |
5 | from manipgen.utils.policy_testers.base_tester import BaseTester
6 |
7 |
8 | class FrankaReachTester(BaseTester):
9 | def __init__(self, env, policy, num_steps, task_name):
10 | env.init_states = None
11 | super().__init__(env, policy, num_steps, task_name)
12 | self.num_pre_steps = 0
13 |
14 | def pre_steps(self, obs, keep_runs):
15 | self.env.pre_steps(obs, keep_runs, self.num_pre_steps)
16 | return obs, keep_runs
17 |
--------------------------------------------------------------------------------
/manipgen/assets/urdf/franka_description/meshes/visual/finger.mtl:
--------------------------------------------------------------------------------
1 | # Blender MTL File: 'None'
2 | # Material Count: 2
3 |
4 | newmtl Part__Feature001_006
5 | Ns -1.960784
6 | Ka 1.000000 1.000000 1.000000
7 | Kd 0.901961 0.921569 0.929412
8 | Ks 0.250000 0.250000 0.250000
9 | Ke 0.000000 0.000000 0.000000
10 | Ni 1.000000
11 | d 1.000000
12 | illum 2
13 |
14 | newmtl Part__Feature_007
15 | Ns -1.960784
16 | Ka 1.000000 1.000000 1.000000
17 | Kd 0.250980 0.250980 0.250980
18 | Ks 0.250000 0.250000 0.250000
19 | Ke 0.000000 0.000000 0.000000
20 | Ni 1.000000
21 | d 1.000000
22 | illum 2
23 |
--------------------------------------------------------------------------------
/manipgen/assets/industreal/urdf/industreal_gear_base.urdf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/manipgen/assets/industreal/urdf/industreal_gear_large.urdf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/manipgen/assets/industreal/urdf/industreal_gear_small.urdf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/manipgen/assets/industreal/urdf/industreal_gear_medium.urdf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/manipgen/assets/industreal/mesh/industreal_gears/industreal_gear_medium.mtl:
--------------------------------------------------------------------------------
1 | # Blender 3.5.1 MTL File: 'None'
2 | # www.blender.org
3 |
4 | newmtl 0.752941_0.752941_0.752941_0.000000_0.000000
5 | Ns 0.000000
6 | Ka 1.000000 1.000000 1.000000
7 | Kd 0.955973 0.871366 0.791298
8 | Ks 0.000000 0.000000 0.000000
9 | Ke 0.000000 0.000000 0.000000
10 | Ni 1.450000
11 | d 1.000000
12 | illum 1
13 |
14 | newmtl 0.752941_0.752941_0.752941_0.000000_0.001
15 | Ns 0.000000
16 | Ka 1.000000 1.000000 1.000000
17 | Kd 0.955973 0.871366 0.791298
18 | Ks 0.000000 0.000000 0.000000
19 | Ke 0.000000 0.000000 0.000000
20 | Ni 1.450000
21 | d 1.000000
22 | illum 1
23 |
--------------------------------------------------------------------------------
/manipgen/assets/industreal/mesh/industreal_gears/industreal_gear_small.mtl:
--------------------------------------------------------------------------------
1 | # Blender 3.5.1 MTL File: 'None'
2 | # www.blender.org
3 |
4 | newmtl 0.752941_0.752941_0.752941_0.000000_0.000000
5 | Ns 0.000000
6 | Ka 1.000000 1.000000 1.000000
7 | Kd 0.955973 0.871366 0.791298
8 | Ks 0.000000 0.000000 0.000000
9 | Ke 0.000000 0.000000 0.000000
10 | Ni 1.450000
11 | d 1.000000
12 | illum 1
13 |
14 | newmtl 0.752941_0.752941_0.752941_0.000000_0.002
15 | Ns 0.000000
16 | Ka 1.000000 1.000000 1.000000
17 | Kd 0.955973 0.871366 0.791298
18 | Ks 0.000000 0.000000 0.000000
19 | Ke 0.000000 0.000000 0.000000
20 | Ni 1.450000
21 | d 1.000000
22 | illum 1
23 |
--------------------------------------------------------------------------------
/manipgen/assets/industreal/urdf/industreal_round_peg_4mm.urdf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/manipgen/assets/industreal/urdf/industreal_round_peg_8mm.urdf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/manipgen/assets/industreal/mesh/industreal_franka_table/industreal_franka_finger_rubber_viz.mtl:
--------------------------------------------------------------------------------
1 | newmtl 0.301961_0.301961_0.301961_0.000000_0.000000
2 | Ka 0.0000 0.0000 0.0000
3 | Kd 0.302 0.302 0.302
4 | Ks 0.0000 0.0000 0.0000
5 | Tf 0.0000 0.0000 0.0000
6 | d 1
7 | Ns 0
8 | newmtl 0.752941_0.752941_0.752941_0.000000_0.000000
9 | Ka 0.0000 0.0000 0.0000
10 | Kd 0.7529 0.7529 0.7529
11 | Ks 0.0000 0.0000 0.0000
12 | Tf 0.0000 0.0000 0.0000
13 | d 1
14 | Ns 0
15 | newmtl 0.917647_0.917647_0.917647_0.000000_0.000000
16 | Ka 0.0000 0.0000 0.0000
17 | Kd 0.9176 0.9176 0.9176
18 | Ks 0.0000 0.0000 0.0000
19 | Tf 0.0000 0.0000 0.0000
20 | d 1
21 | Ns 0
22 |
--------------------------------------------------------------------------------
/manipgen/assets/industreal/urdf/industreal_round_peg_12mm.urdf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/manipgen/assets/industreal/urdf/industreal_round_peg_16mm.urdf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/manipgen/assets/industreal/urdf/industreal_rectangular_peg_4mm.urdf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/manipgen/assets/industreal/urdf/industreal_rectangular_peg_8mm.urdf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/manipgen/assets/industreal/urdf/industreal_rectangular_peg_12mm.urdf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/manipgen/assets/industreal/urdf/industreal_rectangular_peg_16mm.urdf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/manipgen/config/real/place.yaml:
--------------------------------------------------------------------------------
1 | defaults:
2 | - base
3 | - _self_
4 |
5 | task_instance_config:
6 | motion:
7 | duration: 4.0
8 |
9 | control:
10 | prop_gains: [1000, 1000, 1000, 50, 50, 50]
11 | # NOTE: deriv_gains computed automatically as 2 * sqrt(prop_gains)
12 | mode:
13 | type: leaky_plai # options: nominal, plai, leaky_plai
14 | nominal:
15 | action_scale: null
16 | plai:
17 | action_scale: [0.0005, 0.0005, 0.0005, 0.001, 0.001, 0.001]
18 | leaky_plai:
19 | action_scale: [0.002, 0.002, 0.002, 0.05, 0.05, 0.05]
20 | pos_err_thresh: [0.02, 0.02, 0.02]
21 | rot_err_thresh: 4.0 # degrees
22 |
--------------------------------------------------------------------------------
/manipgen/assets/industreal/urdf/industreal_round_hole_4mm.urdf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/manipgen/assets/industreal/urdf/industreal_round_hole_8mm.urdf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/manipgen/assets/industreal/urdf/industreal_round_hole_12mm.urdf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/manipgen/assets/industreal/urdf/industreal_round_hole_16mm.urdf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/manipgen/config/real/open.yaml:
--------------------------------------------------------------------------------
1 | defaults:
2 | - base
3 | - _self_
4 |
5 | task_instance_config:
6 | motion:
7 | duration: 8.0
8 |
9 | control:
10 | prop_gains: [1500, 1500, 1000, 50, 50, 50]
11 | # NOTE: deriv_gains computed automatically as 2 * sqrt(prop_gains)
12 | mode:
13 | type: leaky_plai # options: nominal, plai, leaky_plai
14 | nominal:
15 | action_scale: [0.01, 0.01, 0.01, 0.01, 0.01, 0.01]
16 | plai:
17 | action_scale: [0.001, 0.001, 0.001, 0.004, 0.004, 0.004]
18 | leaky_plai:
19 | action_scale: [0.003, 0.003, 0.003, 0.0005, 0.0005, 0.0005]
20 | pos_err_thresh: [0.02, 0.02, 0.003]
21 | rot_err_thresh: 0.005 # degrees
22 |
--------------------------------------------------------------------------------
/manipgen/assets/industreal/urdf/industreal_rectangular_hole_4mm.urdf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/manipgen/assets/industreal/urdf/industreal_rectangular_hole_8mm.urdf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/manipgen/config/real/close.yaml:
--------------------------------------------------------------------------------
1 | defaults:
2 | - base
3 | - _self_
4 |
5 | task_instance_config:
6 | motion:
7 | duration: 6.0
8 |
9 | control:
10 | prop_gains: [1000, 1000, 1000, 50, 50, 50]
11 | # NOTE: deriv_gains computed automatically as 2 * sqrt(prop_gains)
12 | mode:
13 | type: leaky_plai # options: nominal, plai, leaky_plai
14 | nominal:
15 | action_scale: [0.01, 0.01, 0.01, 0.01, 0.01, 0.01]
16 | plai:
17 | action_scale: [0.001, 0.001, 0.001, 0.004, 0.004, 0.004]
18 | leaky_plai:
19 | action_scale: [0.005, 0.005, 0.003, 0.0005, 0.0005, 0.0005]
20 | pos_err_thresh: [0.03, 0.03, 0.003]
21 | rot_err_thresh: 0.005 # degrees
22 |
--------------------------------------------------------------------------------
/manipgen/config/real/grasp_handle.yaml:
--------------------------------------------------------------------------------
1 | defaults:
2 | - base
3 | - _self_
4 |
5 | task_instance_config:
6 | motion:
7 | duration: 6.0
8 |
9 | control:
10 | prop_gains: [1000, 1000, 1000, 50, 50, 50]
11 | # NOTE: deriv_gains computed automatically as 2 * sqrt(prop_gains)
12 | mode:
13 | type: leaky_plai # options: nominal, plai, leaky_plai
14 | nominal:
15 | action_scale: [0.01, 0.01, 0.01, 0.01, 0.01, 0.01]
16 | plai:
17 | action_scale: [0.001, 0.001, 0.001, 0.004, 0.004, 0.004]
18 | leaky_plai:
19 | action_scale: [0.002, 0.002, 0.002, 0.004, 0.004, 0.004]
20 | pos_err_thresh: [0.02, 0.02, 0.02]
21 | rot_err_thresh: 2.0 # degrees
22 |
--------------------------------------------------------------------------------
/manipgen/assets/industreal/urdf/industreal_rectangular_hole_12mm.urdf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/manipgen/assets/industreal/urdf/industreal_rectangular_hole_16mm.urdf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/manipgen/config/real/pick.yaml:
--------------------------------------------------------------------------------
1 | defaults:
2 | - base
3 | - _self_
4 |
5 | policy_config:
6 | dagger:
7 | use_seg_obs: True
8 |
9 | task_instance_config:
10 | motion:
11 | duration: 5.0
12 |
13 | control:
14 | prop_gains: [1000, 1000, 1000, 50, 50, 50]
15 | # NOTE: deriv_gains computed automatically as 2 * sqrt(prop_gains)
16 | mode:
17 | type: leaky_plai # options: nominal, plai, leaky_plai
18 | nominal:
19 | action_scale: null
20 | plai:
21 | action_scale: [0.0005, 0.0005, 0.0005, 0.001, 0.001, 0.001]
22 | leaky_plai:
23 | action_scale: [0.002, 0.002, 0.002, 0.05, 0.05, 0.05]
24 | pos_err_thresh: [0.02, 0.02, 0.02]
25 | rot_err_thresh: 4.0 # degrees
26 |
--------------------------------------------------------------------------------
/manipgen/scripts/download_checkpoints.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | mkdir real_world/checkpoints/
4 |
5 | wget https://huggingface.co/minliu01/ManipGen/resolve/main/pick.pth -O real_world/checkpoints/pick.pth
6 | wget https://huggingface.co/minliu01/ManipGen/resolve/main/place.pth -O real_world/checkpoints/place.pth
7 | wget https://huggingface.co/minliu01/ManipGen/resolve/main/grasp_handle.pth -O real_world/checkpoints/grasp_handle.pth
8 | wget https://huggingface.co/minliu01/ManipGen/resolve/main/close.pth -O real_world/checkpoints/close.pth
9 | wget https://huggingface.co/minliu01/ManipGen/resolve/main/open.pth -O real_world/checkpoints/open.pth
10 | wget https://huggingface.co/minliu01/ManipGen/resolve/main/neural_mp.pth -O real_world/checkpoints/neural_mp.pth
11 |
--------------------------------------------------------------------------------
/manipgen/assets/urdf/franka_description/meshes/hande/finger_1-collision-simple.obj:
--------------------------------------------------------------------------------
1 | # cube.obj
2 | #
3 | o cube
4 | v -0.0105 0.025 0.047
5 | v 0.0105 0.025 0.047
6 | v -0.0105 0.035 0.047
7 | v 0.0105 0.035 0.047
8 | v -0.0105 0.035 0.000
9 | v 0.0105 0.035 0.000
10 | v -0.0105 0.025 0.000
11 | v 0.0105 0.025 0.000
12 | vn 0.000000 0.000000 1.000000
13 | vn 0.000000 1.000000 0.000000
14 | vn 0.000000 0.000000 -1.000000
15 | vn 0.000000 -1.000000 0.000000
16 | vn 1.000000 0.000000 0.000000
17 | vn -1.000000 0.000000 0.000000
18 | f 1//1 2//1 3//1
19 | f 3//1 2//1 4//1
20 | f 3//2 4//2 5//2
21 | f 5//2 4//2 6//2
22 | f 5//3 6//3 7//3
23 | f 7//3 6//3 8//3
24 | f 7//4 8//4 1//4
25 | f 1//4 8//4 2//4
26 | f 2//5 8//5 4//5
27 | f 4//5 8//5 6//5
28 | f 7//6 1//6 5//6
29 | f 5//6 1//6 3//6
--------------------------------------------------------------------------------
/manipgen/assets/urdf/franka_description/meshes/hande/finger_2-collision-simple.obj:
--------------------------------------------------------------------------------
1 | # cube.obj
2 | #
3 | o cube
4 | v -0.0105 -0.035 0.047
5 | v 0.0105 -0.035 0.047
6 | v -0.0105 -0.025 0.047
7 | v 0.0105 -0.025 0.047
8 | v -0.0105 -0.025 0.000
9 | v 0.0105 -0.025 0.000
10 | v -0.0105 -0.035 0.000
11 | v 0.0105 -0.035 0.000
12 | vn 0.000000 0.000000 1.000000
13 | vn 0.000000 1.000000 0.000000
14 | vn 0.000000 0.000000 -1.000000
15 | vn 0.000000 -1.000000 0.000000
16 | vn 1.000000 0.000000 0.000000
17 | vn -1.000000 0.000000 0.000000
18 | f 1//1 2//1 3//1
19 | f 3//1 2//1 4//1
20 | f 3//2 4//2 5//2
21 | f 5//2 4//2 6//2
22 | f 5//3 6//3 7//3
23 | f 7//3 6//3 8//3
24 | f 7//4 8//4 1//4
25 | f 1//4 8//4 2//4
26 | f 2//5 8//5 4//5
27 | f 4//5 8//5 6//5
28 | f 7//6 1//6 5//6
29 | f 5//6 1//6 3//6
--------------------------------------------------------------------------------
/manipgen/config/real/perception.yaml:
--------------------------------------------------------------------------------
1 | calibrate_extrinsics:
2 | camera:
3 | image_width: 1920
4 | image_height: 1080
5 | tag:
6 | type: tagStandard52h13
7 | length: 0.050 # [meters]
8 | active_pixel_ratio: 0.6 # For details, see https://github.com/AprilRobotics/apriltag/wiki/AprilTag-User-Guide
9 | robot:
10 | home_joint_angles: [0.02550676, -0.25173378, -0.3518326, -2.5239587, -0.11268669, 2.2990525, 0.5429185]
11 | num_goals: 1024
12 | goal_pos_bounds:
13 | x: [0.4, 0.6] # 0.35 can cause self-collision
14 | y: [-0.15, 0.15]
15 | z: [0.2, 0.45]
16 | pos_to_point_at: [0.5069, 0.0, 0.0]
17 | tag_detection:
18 | num_detections: 16
19 | display_images: True
20 | output:
21 | file_name: extrinsics_industreallib.json
22 |
23 |
--------------------------------------------------------------------------------
/install.sh:
--------------------------------------------------------------------------------
1 | wget https://github.com/git-lfs/git-lfs/releases/download/v3.4.1/git-lfs-linux-amd64-v3.4.1.tar.gz
2 | tar -xvf git-lfs-linux-amd64-v3.4.1.tar.gz
3 | ./git-lfs-3.4.1/install.sh
4 | rm -rf git-lfs-linux-amd64-v3.4.1.tar.gz
5 | rm -rf git-lfs-3.4.1
6 | git lfs install
7 | git lfs track "*.plugin"
8 | ./isaacgym/create_conda_env_rlgpu.sh # make sure you have mamba, this will build your conda env very fast
9 | pip install -e isaacgym/python/
10 | pip install -e IsaacGymEnvs
11 | pip install -e industreallib
12 | pip install -e rl_games
13 | pip install -e Depth-Anything
14 | pip install -e . # install manipgen
15 | pip install -r requirements.txt
16 | pip install torch==2.1.1 torchvision==0.16.1 torchaudio==2.1.1 --index-url https://download.pytorch.org/whl/cu121
17 | pip install -e robomimic
18 |
--------------------------------------------------------------------------------
/manipgen/assets/urdf/franka_description/meshes/visual/link5.mtl:
--------------------------------------------------------------------------------
1 | # Blender MTL File: 'None'
2 | # Material Count: 3
3 |
4 | newmtl Part__Feature_002_004_003
5 | Ns -1.960784
6 | Ka 1.000000 1.000000 1.000000
7 | Kd 1.000000 1.000000 1.000000
8 | Ks 0.015625 0.015625 0.015625
9 | Ke 0.000000 0.000000 0.000000
10 | Ni 1.000000
11 | d 1.000000
12 | illum 2
13 |
14 | newmtl Shell001_001_001_003
15 | Ns -1.960784
16 | Ka 1.000000 1.000000 1.000000
17 | Kd 0.250000 0.250000 0.250000
18 | Ks 0.015625 0.015625 0.015625
19 | Ke 0.000000 0.000000 0.000000
20 | Ni 1.000000
21 | d 1.000000
22 | illum 2
23 |
24 | newmtl Shell_001_001_003
25 | Ns -1.960784
26 | Ka 1.000000 1.000000 1.000000
27 | Kd 1.000000 1.000000 1.000000
28 | Ks 0.015625 0.015625 0.015625
29 | Ke 0.000000 0.000000 0.000000
30 | Ni 1.000000
31 | d 1.000000
32 | illum 2
33 |
--------------------------------------------------------------------------------
/manipgen/envs/__init__.py:
--------------------------------------------------------------------------------
1 | from manipgen.envs.franka_pick_cube import FrankaPickCube
2 | from manipgen.envs.franka_place_cube import FrankaPlaceCube
3 | from manipgen.envs.franka_pick import FrankaPick
4 | from manipgen.envs.franka_place import FrankaPlace
5 | from manipgen.envs.franka_grasp_handle import FrankaGraspHandle
6 | from manipgen.envs.franka_open import FrankaOpen
7 | from manipgen.envs.franka_close import FrankaClose
8 | from manipgen.envs.franka_reach import FrankaReach
9 |
10 | environments = {}
11 |
12 | environments["pick_cube"] = FrankaPickCube
13 | environments["place_cube"] = FrankaPlaceCube
14 | environments["pick"] = FrankaPick
15 | environments["place"] = FrankaPlace
16 | environments["grasp_handle"] = FrankaGraspHandle
17 | environments["open"] = FrankaOpen
18 | environments["close"] = FrankaClose
19 | environments['reach'] = FrankaReach
20 |
--------------------------------------------------------------------------------
/manipgen/utils/policy_testers/__init__.py:
--------------------------------------------------------------------------------
1 | from manipgen.utils.policy_testers.base_tester import BaseTester
2 | from manipgen.utils.policy_testers.reach_test import FrankaReachTester
3 | from manipgen.utils.policy_testers.pick_cube_tester import FrankaPickCubeTester
4 | from manipgen.utils.policy_testers.place_cube_tester import FrankaPlaceCubeTester
5 | from manipgen.utils.policy_testers.place_tester import FrankaPlaceTester
6 | from manipgen.utils.policy_testers.grasp_handle_tester import FrankaGraspHandleTester
7 | from manipgen.utils.policy_testers.open_tester import FrankaOpenTester
8 |
9 | testers = {
10 | "pick_cube": FrankaPickCubeTester,
11 | "place_cube": FrankaPlaceCubeTester,
12 | "pick": FrankaPickCubeTester,
13 | "place": FrankaPlaceTester,
14 | "grasp_handle": FrankaGraspHandleTester,
15 | "open": FrankaOpenTester,
16 | "close": FrankaOpenTester,
17 | "reach": FrankaReachTester,
18 | }
19 |
--------------------------------------------------------------------------------
/manipgen/utils/initial_state_samplers/__init__.py:
--------------------------------------------------------------------------------
1 | from manipgen.utils.initial_state_samplers.pick_cube_sampler import (
2 | FrankaPickCubePoseSampler,
3 | )
4 | from manipgen.utils.initial_state_samplers.place_cube_sampler import (
5 | FrankaPlaceCubePoseSampler,
6 | )
7 | from manipgen.utils.initial_state_samplers.pick_sampler import (
8 | FrankaPickPoseSampler,
9 | )
10 | from manipgen.utils.initial_state_samplers.place_sampler import (
11 | FrankaPlacePoseSampler,
12 | )
13 | from manipgen.utils.initial_state_samplers.grasp_handle_sampler import (
14 | FrankaGraspHandlePoseSampler,
15 | )
16 | from manipgen.utils.initial_state_samplers.open_sampler import (
17 | FrankaOpenPoseSampler,
18 | )
19 |
20 | samplers = {
21 | "pick_cube": FrankaPickCubePoseSampler,
22 | "place_cube": FrankaPlaceCubePoseSampler,
23 | "pick": FrankaPickPoseSampler,
24 | "place": FrankaPlacePoseSampler,
25 | "grasp_handle": FrankaGraspHandlePoseSampler,
26 | "open": FrankaOpenPoseSampler,
27 | "close": FrankaOpenPoseSampler,
28 | }
29 |
--------------------------------------------------------------------------------
/manipgen/assets/urdf/franka_description/meshes/visual/link4.mtl:
--------------------------------------------------------------------------------
1 | # Blender MTL File: 'None'
2 | # Material Count: 4
3 |
4 | newmtl Part__Feature001_001_003_001
5 | Ns -1.960784
6 | Ka 1.000000 1.000000 1.000000
7 | Kd 1.000000 1.000000 1.000000
8 | Ks 0.007812 0.007812 0.007812
9 | Ke 0.000000 0.000000 0.000000
10 | Ni 1.000000
11 | d 1.000000
12 | illum 2
13 |
14 | newmtl Part__Feature002_001_003_001
15 | Ns -1.960784
16 | Ka 1.000000 1.000000 1.000000
17 | Kd 0.250980 0.250980 0.250980
18 | Ks 0.007812 0.007812 0.007812
19 | Ke 0.000000 0.000000 0.000000
20 | Ni 1.000000
21 | d 1.000000
22 | illum 2
23 |
24 | newmtl Part__Feature003_001_003_001
25 | Ns -1.960784
26 | Ka 1.000000 1.000000 1.000000
27 | Kd 1.000000 1.000000 1.000000
28 | Ks 0.007812 0.007812 0.007812
29 | Ke 0.000000 0.000000 0.000000
30 | Ni 1.000000
31 | d 1.000000
32 | illum 2
33 |
34 | newmtl Part__Feature_002_003_001
35 | Ns -1.960784
36 | Ka 1.000000 1.000000 1.000000
37 | Kd 1.000000 1.000000 1.000000
38 | Ks 0.007812 0.007812 0.007812
39 | Ke 0.000000 0.000000 0.000000
40 | Ni 1.000000
41 | d 1.000000
42 | illum 2
43 |
--------------------------------------------------------------------------------
/manipgen/assets/urdf/franka_description/meshes/visual/link3.mtl:
--------------------------------------------------------------------------------
1 | # Blender MTL File: 'None'
2 | # Material Count: 4
3 |
4 | newmtl Part__Feature001_010_001_002.001
5 | Ns -1.960784
6 | Ka 1.000000 1.000000 1.000000
7 | Kd 1.000000 1.000000 1.000000
8 | Ks 0.007812 0.007812 0.007812
9 | Ke 0.000000 0.000000 0.000000
10 | Ni 1.000000
11 | d 1.000000
12 | illum 2
13 |
14 | newmtl Part__Feature002_007_001_002.001
15 | Ns -1.960784
16 | Ka 1.000000 1.000000 1.000000
17 | Kd 1.000000 1.000000 1.000000
18 | Ks 0.007812 0.007812 0.007812
19 | Ke 0.000000 0.000000 0.000000
20 | Ni 1.000000
21 | d 1.000000
22 | illum 2
23 |
24 | newmtl Part__Feature003_004_001_002.001
25 | Ns -1.960784
26 | Ka 1.000000 1.000000 1.000000
27 | Kd 1.000000 1.000000 1.000000
28 | Ks 0.007812 0.007812 0.007812
29 | Ke 0.000000 0.000000 0.000000
30 | Ni 1.000000
31 | d 1.000000
32 | illum 2
33 |
34 | newmtl Part__Feature_001_001_001_002.001
35 | Ns -1.960784
36 | Ka 1.000000 1.000000 1.000000
37 | Kd 0.250980 0.250980 0.250980
38 | Ks 0.007812 0.007812 0.007812
39 | Ke 0.000000 0.000000 0.000000
40 | Ni 1.000000
41 | d 1.000000
42 | illum 2
43 |
--------------------------------------------------------------------------------
/manipgen/real_world/vlm_planning/prompts/planning_examples.py:
--------------------------------------------------------------------------------
1 | """
2 | ### Plan examples ###
3 | Here are some examples of input tasks and the corresponding plans that you should generate and the type of format we are looking for.
4 | MAKE SURE YOU USE THE SAME FORMAT AS THE EXAMPLES BELOW FOR YOUR OUTPUT PLANS.
5 | Example 1:
6 | Task: Put away all remaining items on the table in the shelf.
7 | Output:
8 | [
9 | ("spoon", "pick"),
10 | ("shelf", "place"),
11 | ("turquoise pot", "pick"),
12 | ("shelf", "place"),
13 | ("plastic bottle", "pick"),
14 | ("shelf", "place"),
15 | ]
16 |
17 | Example 2:
18 | Task: Clean up the table by putting everything that is not in the bin into the bin.
19 | Output:
20 | [
21 | ("yellow plastic bottle", "pick"),
22 | ("bin", "place"),
23 | ("spoon", "pick"),
24 | ("bin", "place"),
25 | ("turquoise pot", "pick"),
26 | ("bin", "place"),
27 | ("blue plastic bottle", "pick"),
28 | ("bin", "place"),
29 | ("white toy kettle", "pick"),
30 | ("bin", "place"),
31 | ("white roll of tape", "pick"),
32 | ("bin", "place"),
33 | ]
34 | """
--------------------------------------------------------------------------------
/manipgen/assets/urdf/franka_description/meshes/visual/hand.mtl:
--------------------------------------------------------------------------------
1 | # Blender MTL File: 'None'
2 | # Material Count: 5
3 |
4 | newmtl Part__Feature001_008_005
5 | Ns -1.960784
6 | Ka 1.000000 1.000000 1.000000
7 | Kd 0.250980 0.250980 0.250980
8 | Ks 0.007812 0.007812 0.007812
9 | Ke 0.000000 0.000000 0.000000
10 | Ni 1.000000
11 | d 1.000000
12 | illum 2
13 |
14 | newmtl Part__Feature002_005_005
15 | Ns -1.960784
16 | Ka 1.000000 1.000000 1.000000
17 | Kd 0.901961 0.921569 0.929412
18 | Ks 0.015625 0.015625 0.015625
19 | Ke 0.000000 0.000000 0.000000
20 | Ni 1.000000
21 | d 1.000000
22 | illum 2
23 |
24 | newmtl Part__Feature005_001_005
25 | Ns -1.960784
26 | Ka 1.000000 1.000000 1.000000
27 | Kd 1.000000 1.000000 1.000000
28 | Ks 0.015625 0.015625 0.015625
29 | Ke 0.000000 0.000000 0.000000
30 | Ni 1.000000
31 | d 1.000000
32 | illum 2
33 |
34 | newmtl Part__Feature005_001_005_001
35 | Ns -1.960784
36 | Ka 1.000000 1.000000 1.000000
37 | Kd 0.901961 0.921569 0.929412
38 | Ks 0.015625 0.015625 0.015625
39 | Ke 0.000000 0.000000 0.000000
40 | Ni 1.000000
41 | d 1.000000
42 | illum 2
43 |
44 | newmtl Part__Feature_009_005
45 | Ns -1.960784
46 | Ka 1.000000 1.000000 1.000000
47 | Kd 0.250980 0.250980 0.250980
48 | Ks 0.015625 0.015625 0.015625
49 | Ke 0.000000 0.000000 0.000000
50 | Ni 1.000000
51 | d 1.000000
52 | illum 2
53 |
--------------------------------------------------------------------------------
/manipgen/scripts/download_datasets.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Download ManipGen-UniDexGrasp
4 | if [ ! -d "assets/unidexgrasp" ]; then
5 | wget https://huggingface.co/datasets/minliu01/ManipGen-UniDexGrasp/resolve/main/manipgen-unidexgrasp_part_aa
6 | wget https://huggingface.co/datasets/minliu01/ManipGen-UniDexGrasp/resolve/main/manipgen-unidexgrasp_part_ab
7 | wget https://huggingface.co/datasets/minliu01/ManipGen-UniDexGrasp/resolve/main/manipgen-unidexgrasp_part_ac
8 | wget https://huggingface.co/datasets/minliu01/ManipGen-UniDexGrasp/resolve/main/manipgen-unidexgrasp_part_ad
9 | wget https://huggingface.co/datasets/minliu01/ManipGen-UniDexGrasp/resolve/main/manipgen-unidexgrasp_part_ae
10 | wget https://huggingface.co/datasets/minliu01/ManipGen-UniDexGrasp/resolve/main/manipgen-unidexgrasp_part_af
11 |
12 | cat manipgen-unidexgrasp_part_a* > manipgen-unidexgrasp.tar.gz
13 | tar -xvf manipgen-unidexgrasp.tar.gz -C assets/
14 |
15 | rm manipgen-unidexgrasp_part_a*
16 | rm manipgen-unidexgrasp.tar.gz
17 | fi
18 |
19 | # Download ManipGen-PartNet
20 | if [ ! -d "assets/partnet" ]; then
21 | wget https://huggingface.co/datasets/minliu01/ManipGen-PartNet/resolve/main/manipgen-partnet.tar.gz
22 | tar -xvf manipgen-partnet.tar.gz -C assets/
23 | rm manipgen-partnet.tar.gz
24 | fi
25 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "IsaacGymEnvs"]
2 | path = IsaacGymEnvs
3 | url = https://github.com/mihdalal/IsaacGymEnvs
4 | branch = skills_planning
5 | [submodule "rl_games"]
6 | path = rl_games
7 | url = https://github.com/mihdalal/rl_games
8 | branch = skills_planning
9 | [submodule "vkdevicechooser"]
10 | path = vkdevicechooser
11 | url = https://github.com/aejsmith/vkdevicechooser.git
12 | [submodule "Grounded-Segment-Anything"]
13 | path = Grounded-Segment-Anything
14 | url = https://github.com/IDEA-Research/Grounded-Segment-Anything.git
15 | [submodule "industreallib"]
16 | path = industreallib
17 | url = git@github.com:mihdalal/industreallib.git
18 | [submodule "pointnet2_ops"]
19 | path = pointnet2_ops
20 | url = git@github.com:upriyam-cmu/pointnet2_ops.git
21 | [submodule "tracikpy"]
22 | path = tracikpy
23 | url = git@github.com:mjd3/tracikpy.git
24 | [submodule "manipgen_robomimic"]
25 | path = manipgen_robomimic
26 | url = https://github.com/mihdalal/robomimic
27 | branch = manipgen_robomimic
28 | [submodule "robofin"]
29 | path = robofin
30 | url = https://github.com/mihdalal/robofin
31 | branch = manipgen
32 | [submodule "frankapy"]
33 | path = frankapy
34 | url = https://github.com/mihdalal/frankapy.git
35 | branch = skills_planning
36 | [submodule "robomimic"]
37 | path = robomimic
38 | url = git@github.com:mihdalal/robomimic.git
39 | branch = neural_mp_skills_planning
40 |
--------------------------------------------------------------------------------
/manipgen/assets/industreal/urdf/industreal_franka_urdf_changelog.txt:
--------------------------------------------------------------------------------
1 | Command to generate original xacro:
2 | xacro $(rospack find franka_description)/robots/panda/panda.urdf.xacro arm:=panda hand:=true gazebo:=true
3 |
4 | Changes:
5 | - Removed dummy sub-links
6 | - Removed Gazebo fields, safety fields, and mimic fields
7 | - For dynamics fields, kept only damping and friction parameters, which were set to 0.0
8 | - Verified that joint limits, joint velocity limits, and torque limits match Franka spec sheet
9 | - Reduced joint effort limits on hand to 70 (max continuous force according to Franka spec sheet)
10 | - Reduced joint velocity limits on hand to 0.050 (max velocity according to spec sheet)
11 | - Removed joint limit on joint 7 to allow continuous rotation for screwing tasks
12 | - Removed link 8 (dummy link), removed joint 8 (connects joint 7 to joint 8), and modified panda_hand_joint
13 | (connected joint 7 to hand instead of joint 8 to hand; updated transform to include offset of original joint 8)
14 | - Renamed panda_hand_tcp joint and panda_hand_tcp link (dummy link); added finite mass and inertia
15 | - Replaced *.dae* with *.obj*, as *.dae* files are actually never used by Gym
16 | - Updated visual geometry (original fingers) and collision geometry (boxes) on fingers to match our custom fingertips;
17 | updated mass, COM, and inertia based on mass measurements and Onshape COM and inertia calculations
18 | - Added friction to gripper joints to mitigate non-mirroring artifact
--------------------------------------------------------------------------------
/manipgen/assets/urdf/franka_description/meshes/collision/stltoobj.mlx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/manipgen/config/dagger/robomimic/base_pcd.json:
--------------------------------------------------------------------------------
1 | {
2 | "train": {
3 | "num_data_workers": 0,
4 | "hdf5_cache_mode": null,
5 | "hdf5_use_swmr": true,
6 | "hdf5_load_next_obs": false,
7 | "hdf5_normalize_obs": false,
8 | "hdf5_filter_key": null,
9 | "hdf5_validation_filter_key": null,
10 | "dataset_keys": [
11 | "actions"
12 | ],
13 | "goal_mode": null
14 | },
15 | "observation": {
16 | "modalities": {
17 | "obs": {
18 | "low_dim": [
19 | "state"
20 | ],
21 | "pcd": [
22 | "visual"
23 | ]
24 | }
25 | },
26 | "encoder": {
27 | "low_dim": {
28 | "core_class": null,
29 | "core_kwargs": {},
30 | "obs_randomizer_class": null,
31 | "obs_randomizer_kwargs": {}
32 | },
33 | "rgb": {
34 | "core_class": "VisualCore",
35 | "core_kwargs": {},
36 | "obs_randomizer_class": null,
37 | "obs_randomizer_kwargs": {}
38 | },
39 | "pcd": {
40 | "core_class": "PCDCore",
41 | "core_kwargs": {
42 | "backbone_kwargs": {
43 | "encoder_size": "transic",
44 | "n_features": 1
45 | }
46 | },
47 | "obs_randomizer_class": null,
48 | "obs_randomizer_kwargs": {}
49 | }
50 | }
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/manipgen/envs/franka_close.py:
--------------------------------------------------------------------------------
1 | from manipgen.envs.franka_open import FrankaOpen
2 | from manipgen.envs.franka_grasp_handle import FrankaGraspHandle
3 | from isaacgymenvs.utils.torch_jit_utils import quat_conjugate, quat_rotate
4 | import torch
5 | import numpy as np
6 |
7 | class FrankaClose(FrankaOpen):
8 | """We only need to change the initial and target object dof positions for close task.
9 | """
10 | def _set_object_init_and_target_dof_pos(self):
11 | """ Set initial and target object dof positions for close task """
12 | self.rest_object_dof_pos = self.object_dof_upper_limits.clone()
13 | self.target_object_dof_pos = self.object_dof_lower_limits.clone()
14 |
15 | def reset_idx(self, env_ids: torch.Tensor, validation_set: bool = False, switch_object: bool = False, init_states = None):
16 | FrankaGraspHandle.reset_idx(self, env_ids, validation_set, switch_object, init_states)
17 |
18 | # record position of fingertip center in the handle frame
19 | self.init_fingertip_centered_pos_local[:] = quat_rotate(
20 | quat_conjugate(self.handle_quat), self.fingertip_centered_pos - self.handle_pos
21 | )
22 | self.prev_fingertip_centered_pos_local = quat_rotate(
23 | quat_conjugate(self.handle_quat), self.fingertip_centered_pos - self.handle_pos
24 | )
25 |
26 | if not self.sample_mode and self.object_meta["type"] == "door" and self.cfg_env.rl.partial_close_for_door:
27 | self.target_object_dof_pos = self.init_object_dof_pos - np.deg2rad(self.cfg_env.rl.partial_close_degree)
28 | self.target_object_dof_pos = torch.clamp(self.target_object_dof_pos, self.object_dof_lower_limits, self.object_dof_upper_limits)
29 |
--------------------------------------------------------------------------------
/manipgen/config/train/open.yaml:
--------------------------------------------------------------------------------
1 | params:
2 | seed: ${...seed}
3 | algo:
4 | name: a2c_continuous_sp
5 |
6 | model:
7 | name: continuous_a2c_logstd
8 |
9 | network:
10 | name: actor_critic
11 | separate: False
12 |
13 | space:
14 | continuous:
15 | mu_activation: None
16 | sigma_activation: None
17 | mu_init:
18 | name: default
19 | sigma_init:
20 | name: const_initializer
21 | val: 0
22 | fixed_sigma: True
23 | mlp:
24 | units: [256, 128, 64]
25 | activation: elu
26 | d2rl: False
27 |
28 | initializer:
29 | name: default
30 | regularizer:
31 | name: None
32 |
33 | load_checkpoint: ${if:${...checkpoint},True,False} # flag which sets whether to load the checkpoint
34 | load_path: ${...checkpoint} # path to the checkpoint to load
35 |
36 | config:
37 | name: franka_open
38 | full_experiment_name: franka_open
39 | env_name: rlgpu
40 | ppo: True
41 | mixed_precision: True
42 | normalize_input: True
43 | normalize_value: True
44 | value_bootstrap: True
45 | num_actors: ${....task.env.numEnvs}
46 | reward_shaper:
47 | scale_value: 1.0
48 | normalize_advantage: True
49 | gamma: 0.99
50 | tau: 0.95
51 | learning_rate: 5e-4
52 | lr_schedule: adaptive
53 | schedule_type: standard
54 | kl_threshold: 0.008
55 | score_to_win: 10000
56 | max_epochs: ${resolve_default:500,${....max_iterations}}
57 | early_stop: 100
58 | save_best_after: 100
59 | save_frequency: 50
60 | print_stats: True
61 | grad_norm: 1.0
62 | entropy_coef: 0.000
63 | truncate_grads: True
64 | e_clip: 0.2
65 | horizon_length: 32
66 | minibatch_size: 16384
67 | mini_epochs: 5
68 | critic_coef: 4
69 | clip_value: True
70 | seq_len: 4
71 | bounds_loss_coef: 0.0001
72 |
--------------------------------------------------------------------------------
/manipgen/config/train/pick.yaml:
--------------------------------------------------------------------------------
1 | params:
2 | seed: ${...seed}
3 | algo:
4 | name: a2c_continuous_sp
5 |
6 | model:
7 | name: continuous_a2c_logstd
8 |
9 | network:
10 | name: actor_critic
11 | separate: False
12 |
13 | space:
14 | continuous:
15 | mu_activation: None
16 | sigma_activation: None
17 | mu_init:
18 | name: default
19 | sigma_init:
20 | name: const_initializer
21 | val: 0
22 | fixed_sigma: True
23 | mlp:
24 | units: [256, 128, 64]
25 | activation: elu
26 | d2rl: False
27 |
28 | initializer:
29 | name: default
30 | regularizer:
31 | name: None
32 |
33 | load_checkpoint: ${if:${...checkpoint},True,False} # flag which sets whether to load the checkpoint
34 | load_path: ${...checkpoint} # path to the checkpoint to load
35 |
36 | config:
37 | name: franka_pick
38 | full_experiment_name: franka_pick
39 | env_name: rlgpu
40 | ppo: True
41 | mixed_precision: True
42 | normalize_input: True
43 | normalize_value: True
44 | value_bootstrap: True
45 | num_actors: ${....task.env.numEnvs}
46 | reward_shaper:
47 | scale_value: 1.0
48 | normalize_advantage: True
49 | gamma: 0.99
50 | tau: 0.95
51 | learning_rate: 5e-4
52 | lr_schedule: adaptive
53 | schedule_type: standard
54 | kl_threshold: 0.008
55 | score_to_win: 10000
56 | max_epochs: ${resolve_default:800,${....max_iterations}}
57 | early_stop: 200
58 | save_best_after: 100
59 | save_frequency: 50
60 | print_stats: True
61 | grad_norm: 1.0
62 | entropy_coef: 0.000
63 | truncate_grads: True
64 | e_clip: 0.2
65 | horizon_length: 32
66 | minibatch_size: 16384
67 | mini_epochs: 5
68 | critic_coef: 4
69 | clip_value: True
70 | seq_len: 4
71 | bounds_loss_coef: 0.0001
72 |
--------------------------------------------------------------------------------
/manipgen/config/train/close.yaml:
--------------------------------------------------------------------------------
1 | params:
2 | seed: ${...seed}
3 | algo:
4 | name: a2c_continuous_sp
5 |
6 | model:
7 | name: continuous_a2c_logstd
8 |
9 | network:
10 | name: actor_critic
11 | separate: False
12 |
13 | space:
14 | continuous:
15 | mu_activation: None
16 | sigma_activation: None
17 | mu_init:
18 | name: default
19 | sigma_init:
20 | name: const_initializer
21 | val: 0
22 | fixed_sigma: True
23 | mlp:
24 | units: [256, 128, 64]
25 | activation: elu
26 | d2rl: False
27 |
28 | initializer:
29 | name: default
30 | regularizer:
31 | name: None
32 |
33 | load_checkpoint: ${if:${...checkpoint},True,False} # flag which sets whether to load the checkpoint
34 | load_path: ${...checkpoint} # path to the checkpoint to load
35 |
36 | config:
37 | name: franka_close
38 | full_experiment_name: franka_close
39 | env_name: rlgpu
40 | ppo: True
41 | mixed_precision: True
42 | normalize_input: True
43 | normalize_value: True
44 | value_bootstrap: True
45 | num_actors: ${....task.env.numEnvs}
46 | reward_shaper:
47 | scale_value: 1.0
48 | normalize_advantage: True
49 | gamma: 0.99
50 | tau: 0.95
51 | learning_rate: 5e-4
52 | lr_schedule: adaptive
53 | schedule_type: standard
54 | kl_threshold: 0.008
55 | score_to_win: 10000
56 | max_epochs: ${resolve_default:300,${....max_iterations}}
57 | early_stop: 100
58 | save_best_after: 100
59 | save_frequency: 50
60 | print_stats: True
61 | grad_norm: 1.0
62 | entropy_coef: 0.000
63 | truncate_grads: True
64 | e_clip: 0.2
65 | horizon_length: 32
66 | minibatch_size: 16384
67 | mini_epochs: 5
68 | critic_coef: 4
69 | clip_value: True
70 | seq_len: 4
71 | bounds_loss_coef: 0.0001
72 |
--------------------------------------------------------------------------------
/manipgen/config/train/place.yaml:
--------------------------------------------------------------------------------
1 | params:
2 | seed: ${...seed}
3 | algo:
4 | name: a2c_continuous_sp
5 |
6 | model:
7 | name: continuous_a2c_logstd
8 |
9 | network:
10 | name: actor_critic
11 | separate: False
12 |
13 | space:
14 | continuous:
15 | mu_activation: None
16 | sigma_activation: None
17 | mu_init:
18 | name: default
19 | sigma_init:
20 | name: const_initializer
21 | val: 0
22 | fixed_sigma: True
23 | mlp:
24 | units: [256, 128, 64]
25 | activation: elu
26 | d2rl: False
27 |
28 | initializer:
29 | name: default
30 | regularizer:
31 | name: None
32 |
33 | load_checkpoint: ${if:${...checkpoint},True,False} # flag which sets whether to load the checkpoint
34 | load_path: ${...checkpoint} # path to the checkpoint to load
35 |
36 | config:
37 | name: franka_place
38 | full_experiment_name: franka_place
39 | env_name: rlgpu
40 | ppo: True
41 | mixed_precision: True
42 | normalize_input: True
43 | normalize_value: True
44 | value_bootstrap: True
45 | num_actors: ${....task.env.numEnvs}
46 | reward_shaper:
47 | scale_value: 1.0
48 | normalize_advantage: True
49 | gamma: 0.99
50 | tau: 0.95
51 | learning_rate: 5e-4
52 | lr_schedule: adaptive
53 | schedule_type: standard
54 | kl_threshold: 0.008
55 | score_to_win: 10000
56 | max_epochs: ${resolve_default:500,${....max_iterations}}
57 | early_stop: 200
58 | save_best_after: 100
59 | save_frequency: 50
60 | print_stats: True
61 | grad_norm: 1.0
62 | entropy_coef: 0.000
63 | truncate_grads: True
64 | e_clip: 0.2
65 | horizon_length: 32
66 | minibatch_size: 16384
67 | mini_epochs: 5
68 | critic_coef: 4
69 | clip_value: True
70 | seq_len: 4
71 | bounds_loss_coef: 0.0001
72 |
--------------------------------------------------------------------------------
/manipgen/config/train/reach.yaml:
--------------------------------------------------------------------------------
1 | params:
2 | seed: ${...seed}
3 | algo:
4 | name: a2c_continuous_sp
5 |
6 | model:
7 | name: continuous_a2c_logstd
8 |
9 | network:
10 | name: actor_critic
11 | separate: False
12 |
13 | space:
14 | continuous:
15 | mu_activation: None
16 | sigma_activation: None
17 | mu_init:
18 | name: default
19 | sigma_init:
20 | name: const_initializer
21 | val: 0
22 | fixed_sigma: True
23 | mlp:
24 | units: [256, 128, 64]
25 | activation: elu
26 | d2rl: False
27 |
28 | initializer:
29 | name: default
30 | regularizer:
31 | name: None
32 |
33 | load_checkpoint: ${if:${...checkpoint},True,False} # flag which sets whether to load the checkpoint
34 | load_path: ${...checkpoint} # path to the checkpoint to load
35 |
36 | config:
37 | name: franka_reach
38 | full_experiment_name: franka_reach
39 | env_name: rlgpu
40 | ppo: True
41 | mixed_precision: True
42 | normalize_input: True
43 | normalize_value: True
44 | value_bootstrap: True
45 | num_actors: ${....task.env.numEnvs}
46 | reward_shaper:
47 | scale_value: 1.0
48 | normalize_advantage: True
49 | gamma: 0.99
50 | tau: 0.95
51 | learning_rate: 5e-4
52 | lr_schedule: adaptive
53 | schedule_type: standard
54 | kl_threshold: 0.008
55 | score_to_win: 10000
56 | max_epochs: ${resolve_default:1000,${....max_iterations}}
57 | early_stop: 1000
58 | save_best_after: 100
59 | save_frequency: 50
60 | print_stats: True
61 | grad_norm: 1.0
62 | entropy_coef: 0.000
63 | truncate_grads: True
64 | e_clip: 0.2
65 | horizon_length: 32
66 | minibatch_size: 16384
67 | mini_epochs: 5
68 | critic_coef: 4
69 | clip_value: True
70 | seq_len: 4
71 | bounds_loss_coef: 0.0001
72 |
--------------------------------------------------------------------------------
/manipgen/config/train/place_cube.yaml:
--------------------------------------------------------------------------------
1 | params:
2 | seed: ${...seed}
3 | algo:
4 | name: a2c_continuous_sp
5 |
6 | model:
7 | name: continuous_a2c_logstd
8 |
9 | network:
10 | name: actor_critic
11 | separate: False
12 |
13 | space:
14 | continuous:
15 | mu_activation: None
16 | sigma_activation: None
17 | mu_init:
18 | name: default
19 | sigma_init:
20 | name: const_initializer
21 | val: 0
22 | fixed_sigma: True
23 | mlp:
24 | units: [256, 128, 64]
25 | activation: elu
26 | d2rl: False
27 |
28 | initializer:
29 | name: default
30 | regularizer:
31 | name: None
32 |
33 | load_checkpoint: ${if:${...checkpoint},True,False} # flag which sets whether to load the checkpoint
34 | load_path: ${...checkpoint} # path to the checkpoint to load
35 |
36 | config:
37 | name: franka_place_cube
38 | full_experiment_name: franka_place_cube
39 | env_name: rlgpu
40 | ppo: True
41 | mixed_precision: False
42 | normalize_input: True
43 | normalize_value: True
44 | value_bootstrap: True
45 | num_actors: ${....task.env.numEnvs}
46 | reward_shaper:
47 | scale_value: 1.0
48 | normalize_advantage: True
49 | gamma: 0.99
50 | tau: 0.95
51 | learning_rate: 5e-4
52 | lr_schedule: adaptive
53 | schedule_type: standard
54 | kl_threshold: 0.008
55 | score_to_win: 10000
56 | max_epochs: ${resolve_default:400,${....max_iterations}}
57 | early_stop: 200
58 | save_best_after: 100
59 | save_frequency: 50
60 | print_stats: True
61 | grad_norm: 1.0
62 | entropy_coef: 0.0
63 | truncate_grads: True
64 | e_clip: 0.2
65 | horizon_length: 32
66 | minibatch_size: 16384
67 | mini_epochs: 5
68 | critic_coef: 4
69 | clip_value: True
70 | seq_len: 4
71 | bounds_loss_coef: 0.0001
72 |
--------------------------------------------------------------------------------
/manipgen/scripts/urdf_templates/pseudo_articulated_object.urdf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/manipgen/config/train/grasp_handle.yaml:
--------------------------------------------------------------------------------
1 | params:
2 | seed: ${...seed}
3 | algo:
4 | name: a2c_continuous_sp
5 |
6 | model:
7 | name: continuous_a2c_logstd
8 |
9 | network:
10 | name: actor_critic
11 | separate: False
12 |
13 | space:
14 | continuous:
15 | mu_activation: None
16 | sigma_activation: None
17 | mu_init:
18 | name: default
19 | sigma_init:
20 | name: const_initializer
21 | val: 0
22 | fixed_sigma: True
23 | mlp:
24 | units: [256, 128, 64]
25 | activation: elu
26 | d2rl: False
27 |
28 | initializer:
29 | name: default
30 | regularizer:
31 | name: None
32 |
33 | load_checkpoint: ${if:${...checkpoint},True,False} # flag which sets whether to load the checkpoint
34 | load_path: ${...checkpoint} # path to the checkpoint to load
35 |
36 | config:
37 | name: franka_grasp_handle
38 | full_experiment_name: franka_grasp_handle
39 | env_name: rlgpu
40 | ppo: True
41 | mixed_precision: True
42 | normalize_input: True
43 | normalize_value: True
44 | value_bootstrap: True
45 | num_actors: ${....task.env.numEnvs}
46 | reward_shaper:
47 | scale_value: 1.0
48 | normalize_advantage: True
49 | gamma: 0.99
50 | tau: 0.95
51 | learning_rate: 5e-4
52 | lr_schedule: adaptive
53 | schedule_type: standard
54 | kl_threshold: 0.008
55 | score_to_win: 10000
56 | max_epochs: ${resolve_default:500,${....max_iterations}}
57 | early_stop: 100
58 | save_best_after: 100
59 | save_frequency: 50
60 | print_stats: True
61 | grad_norm: 1.0
62 | entropy_coef: 0.000
63 | truncate_grads: True
64 | e_clip: 0.2
65 | horizon_length: 32
66 | minibatch_size: 16384
67 | mini_epochs: 5
68 | critic_coef: 4
69 | clip_value: True
70 | seq_len: 4
71 | bounds_loss_coef: 0.0001
72 |
--------------------------------------------------------------------------------
/manipgen/config/train/pick_cube.yaml:
--------------------------------------------------------------------------------
1 | name: 'pick_cube'
2 | params:
3 | seed: ${...seed}
4 | algo:
5 | name: a2c_continuous_sp
6 |
7 | model:
8 | name: continuous_a2c_logstd
9 |
10 | network:
11 | name: actor_critic
12 | separate: False
13 |
14 | space:
15 | continuous:
16 | mu_activation: None
17 | sigma_activation: None
18 | mu_init:
19 | name: default
20 | sigma_init:
21 | name: const_initializer
22 | val: 0
23 | fixed_sigma: True
24 | mlp:
25 | units: [256, 128, 64]
26 | activation: elu
27 | d2rl: False
28 |
29 | initializer:
30 | name: default
31 | regularizer:
32 | name: None
33 |
34 | load_checkpoint: ${if:${...checkpoint},True,False} # flag which sets whether to load the checkpoint
35 | load_path: ${...checkpoint} # path to the checkpoint to load
36 |
37 | config:
38 | name: franka_pick_cube
39 | full_experiment_name: franka_pick_cube
40 | env_name: rlgpu
41 | ppo: True
42 | mixed_precision: True
43 | normalize_input: True
44 | normalize_value: True
45 | value_bootstrap: True
46 | num_actors: ${....task.env.numEnvs}
47 | reward_shaper:
48 | scale_value: 1.0
49 | normalize_advantage: True
50 | gamma: 0.99
51 | tau: 0.95
52 | learning_rate: 5e-4
53 | lr_schedule: adaptive
54 | schedule_type: standard
55 | kl_threshold: 0.008
56 | score_to_win: 10000
57 | max_epochs: ${resolve_default:300,${....max_iterations}}
58 | early_stop: 200
59 | save_best_after: 100
60 | save_frequency: 50
61 | print_stats: True
62 | grad_norm: 1.0
63 | entropy_coef: 0.0
64 | truncate_grads: True
65 | e_clip: 0.2
66 | horizon_length: 32
67 | minibatch_size: 16384
68 | mini_epochs: 5
69 | critic_coef: 4
70 | clip_value: True
71 | seq_len: 4
72 | bounds_loss_coef: 0.0001
73 |
--------------------------------------------------------------------------------
/manipgen/assets/urdf/franka_description/meshes/visual/link7.mtl:
--------------------------------------------------------------------------------
1 | # Blender MTL File: 'None'
2 | # Material Count: 8
3 |
4 | newmtl Part__Mirroring001_004_002
5 | Ns -1.960784
6 | Ka 1.000000 1.000000 1.000000
7 | Kd 0.250980 0.250980 0.250980
8 | Ks 0.015625 0.015625 0.015625
9 | Ke 0.000000 0.000000 0.000000
10 | Ni 1.000000
11 | d 1.000000
12 | illum 2
13 |
14 | newmtl Part__Mirroring002_004_001
15 | Ns -1.960784
16 | Ka 1.000000 1.000000 1.000000
17 | Kd 0.250980 0.250980 0.250980
18 | Ks 0.031250 0.031250 0.031250
19 | Ke 0.000000 0.000000 0.000000
20 | Ni 1.000000
21 | d 1.000000
22 | illum 2
23 |
24 | newmtl Part__Mirroring003_004_001
25 | Ns -1.960784
26 | Ka 1.000000 1.000000 1.000000
27 | Kd 0.250980 0.250980 0.250980
28 | Ks 0.031250 0.031250 0.031250
29 | Ke 0.000000 0.000000 0.000000
30 | Ni 1.000000
31 | d 1.000000
32 | illum 2
33 |
34 | newmtl Part__Mirroring004_004_002
35 | Ns -1.960784
36 | Ka 1.000000 1.000000 1.000000
37 | Kd 1.000000 1.000000 1.000000
38 | Ks 0.031250 0.031250 0.031250
39 | Ke 0.000000 0.000000 0.000000
40 | Ni 1.000000
41 | d 1.000000
42 | illum 2
43 |
44 | newmtl Part__Mirroring005_004_001
45 | Ns -1.960784
46 | Ka 1.000000 1.000000 1.000000
47 | Kd 0.250980 0.250980 0.250980
48 | Ks 0.031250 0.031250 0.031250
49 | Ke 0.000000 0.000000 0.000000
50 | Ni 1.000000
51 | d 1.000000
52 | illum 2
53 |
54 | newmtl Part__Mirroring006_004_001
55 | Ns -1.960784
56 | Ka 1.000000 1.000000 1.000000
57 | Kd 0.250980 0.250980 0.250980
58 | Ks 0.031250 0.031250 0.031250
59 | Ke 0.000000 0.000000 0.000000
60 | Ni 1.000000
61 | d 1.000000
62 | illum 2
63 |
64 | newmtl Part__Mirroring007_004_001
65 | Ns -1.960784
66 | Ka 1.000000 1.000000 1.000000
67 | Kd 0.250980 0.250980 0.250980
68 | Ks 0.031250 0.031250 0.031250
69 | Ke 0.000000 0.000000 0.000000
70 | Ni 1.000000
71 | d 1.000000
72 | illum 2
73 |
74 | newmtl Part__Mirroring_004_001
75 | Ns -1.960784
76 | Ka 1.000000 1.000000 1.000000
77 | Kd 0.898039 0.917647 0.929412
78 | Ks 0.031250 0.031250 0.031250
79 | Ke 0.000000 0.000000 0.000000
80 | Ni 1.000000
81 | d 1.000000
82 | illum 2
83 |
--------------------------------------------------------------------------------
/manipgen/utils/policy_testers/grasp_handle_tester.py:
--------------------------------------------------------------------------------
1 | from isaacgym import gymtorch
2 |
3 | import torch
4 |
5 | from manipgen.utils.rlgames_utils import get_actions
6 | from manipgen.utils.policy_testers.base_tester import BaseTester
7 |
8 |
9 | class FrankaGraspHandleTester(BaseTester):
10 | def __init__(self, env, policy, num_steps, task_name):
11 | super().__init__(env, policy, num_steps, task_name)
12 |
13 | def run_steps(self, run_pre_steps=True, is_deterministic=True):
14 | """
15 | Args:
16 | run_pre_steps: if true, teleport franka to easy initial poses or take actions with hand-engineering code before running the test
17 | Returns:
18 | keep_runs: a tensor of shape (num_envs,) indicating whether the run is kept. A run might fail in pre_steps, which should not be counted
19 | success: a tensor of shape (num_envs,) indicating whether the run is successful
20 | images: a list of lists of images, each list of images is for one environment
21 | """
22 | obs = self.env.reset()
23 | keep_runs = torch.ones(self.num_envs, device=self.device).bool()
24 | if run_pre_steps:
25 | assert False, "`pre_steps` is not implemented for this testers. Please specify initial states."
26 |
27 | images = []
28 | for step in range(self.num_steps):
29 | actions = get_actions(obs, self.policy, is_deterministic=is_deterministic)
30 | obs, reward, done, info = self.env.step(actions)
31 |
32 | if step % 3 == 2:
33 | images.append(info["camera_images"])
34 |
35 | hit_joint_limits = info["hit_joint_limits"]
36 | keep_runs = keep_runs & ~hit_joint_limits
37 |
38 | teleportation_images = self.env.hardcode_control(get_camera_images=True)
39 | teleportation_images = [teleportation_images[i] for i in range(0, len(teleportation_images), 3)]
40 | images.extend(teleportation_images)
41 |
42 | success = self.env._check_grasp_success()
43 |
44 | self.env.reset_idx(torch.arange(self.num_envs, device=self.device))
45 |
46 | return keep_runs, success, images
--------------------------------------------------------------------------------
/manipgen/real_world/scripts/get_camera_intrinsics.py:
--------------------------------------------------------------------------------
1 | """
2 | Get device serial number and intrinsics matrix for RealSense cameras.
3 | """
4 |
5 | import numpy as np
6 | import pyrealsense2 as rs
7 | from argparse import ArgumentParser
8 |
9 | def get_camera_intrinsics(serial_number):
10 | # Initialize the RealSense pipeline
11 | pipeline = rs.pipeline()
12 | config = rs.config()
13 |
14 | # Enable depth and color streams with the specified serial number
15 | config.enable_device(serial_number)
16 | config.enable_stream(rs.stream.depth, 640, 480, rs.format.z16, 30)
17 | config.enable_stream(rs.stream.color, 640, 480, rs.format.bgr8, 30)
18 |
19 | # Start the pipeline
20 | pipeline.start(config)
21 |
22 | try:
23 | # Wait for the first frame
24 | frames = pipeline.wait_for_frames()
25 |
26 | # Get the depth and color intrinsics
27 | depth_intrinsics = frames.get_depth_frame().profile.as_video_stream_profile().intrinsics
28 |
29 | # Construct the camera intrinsics matrix
30 | intrinsics_matrix = np.array(
31 | [
32 | [depth_intrinsics.fx, 0, depth_intrinsics.ppx],
33 | [0, depth_intrinsics.fy, depth_intrinsics.ppy],
34 | [0, 0, 1],
35 | ]
36 | )
37 |
38 | finally:
39 | # Stop the pipeline and release resources
40 | pipeline.stop()
41 |
42 | return intrinsics_matrix
43 |
44 |
45 | if __name__ == "__main__":
46 | parser = ArgumentParser()
47 | args = parser.parse_args()
48 | device_ls = []
49 | for cam in rs.context().query_devices():
50 | device_ls.append(cam.get_info(rs.camera_info(1)))
51 | device_ls.sort()
52 |
53 | for i, device in enumerate(device_ls):
54 | try:
55 | intrinsics = get_camera_intrinsics(device)
56 | # print intrinsics matrix as proper numpy array with commas
57 | print()
58 | print(f"Device {i}: {device}")
59 | print(f"Intrinsics:\n", repr(intrinsics))
60 | print()
61 | except:
62 | print(f"Failed to get intrinsics for device {i}: {device}")
63 | continue
64 |
--------------------------------------------------------------------------------
/manipgen/object_lists/articulated/0.txt:
--------------------------------------------------------------------------------
1 | drawer-00001-0-0
2 | door-00000-0-0
3 | drawer-00000-0-0
4 | door-47227-4-0
5 | drawer-46619-12-0
6 | door-38340-23-0
7 | drawer-12045-7-0
8 | door-45653-16-0
9 | drawer-45194-19-0
10 | door-48000-16-0
11 | drawer-46102-63-0
12 | door-40339-17-0
13 | drawer-44781-23-0
14 | door-40826-13-0
15 | drawer-3472-6-0
16 | door-7261-6-0
17 | drawer-45664-13-0
18 | door-46146-21-0
19 | drawer-46113-34-0
20 | door-47847-13-0
21 | drawer-48859-4-0
22 | door-48254-20-0
23 | drawer-7163-7-0
24 | door-10716-5-0
25 | drawer-47163-4-0
26 | door-7147-5-0
27 | drawer-47183-23-0
28 | door-46202-26-0
29 | drawer-46033-4-0
30 | door-46189-16-0
31 | drawer-46486-10-0
32 | door-11304-5-0
33 | drawer-46808-19-0
34 | door-45428-29-0
35 | drawer-11211-4-0
36 | door-46976-23-0
37 | drawer-48170-10-0
38 | door-45910-19-0
39 | drawer-21238-17-0
40 | door-45213-4-0
41 | drawer-46571-16-0
42 | door-47701-4-0
43 | drawer-7319-6-0
44 | door-47327-21-0
45 | drawer-49016-3-0
46 | door-46754-10-0
47 | drawer-23040-10-0
48 | door-47853-4-0
49 | drawer-45440-10-0
50 | door-10147-5-0
51 | drawer-25648-14-0
52 | door-45913-21-0
53 | drawer-46955-18-0
54 | door-46480-22-0
55 | drawer-47293-4-0
56 | door-46313-19-0
57 | drawer-46017-10-0
58 | door-45703-4-0
59 | drawer-8874-5-0
60 | door-45909-5-0
61 | drawer-47126-13-0
62 | door-11712-7-0
63 | drawer-45803-11-0
64 | door-47808-4-0
65 | drawer-34219-8-0
66 | door-46117-16-0
67 | drawer-45607-16-0
68 | door-46663-20-0
69 | drawer-48499-4-0
70 | door-46486-10-0
71 | drawer-12254-5-0
72 | door-46949-15-0
73 | drawer-46573-10-0
74 | door-8982-4-0
75 | drawer-45855-19-0
76 | door-46699-30-0
77 | drawer-46191-21-0
78 | door-40951-23-0
79 | drawer-45238-25-0
80 | door-47524-12-0
81 | drawer-45423-17-0
82 | door-46524-15-0
83 | drawer-49188-15-0
84 | door-45951-20-0
85 | drawer-10147-5-0
86 | door-10467-5-0
87 | drawer-34834-32-0
88 | door-20979-10-0
89 | drawer-45325-16-0
90 | door-33543-22-0
91 | drawer-47188-25-0
92 | door-45233-10-0
93 | drawer-7356-6-0
94 | door-47669-4-0
95 | drawer-9209-4-0
96 | door-46401-17-0
97 | drawer-10720-5-0
98 | door-24323-12-0
99 | drawer-7355-6-0
100 | door-48618-4-0
101 |
--------------------------------------------------------------------------------
/manipgen/utils/policy_testers/place_cube_tester.py:
--------------------------------------------------------------------------------
1 | from isaacgym import gymtorch
2 |
3 | import torch
4 |
5 | from manipgen.utils.policy_testers.base_tester import BaseTester
6 | from manipgen.utils.rlgames_utils import get_actions
7 |
8 | class FrankaPlaceCubeTester(BaseTester):
9 | def __init__(self, env, policy, num_steps, task_name):
10 | super().__init__(env, policy, num_steps, task_name)
11 |
12 | self.num_pre_steps = 200
13 |
14 | def pre_steps(self, obs, keep_runs):
15 | self.env.pre_steps(obs, keep_runs, self.num_pre_steps)
16 | return obs, keep_runs
17 |
18 | def run_steps(self, run_pre_steps=True, is_deterministic=True):
19 | """
20 | Args:
21 | run_pre_steps: if true, teleport franka to easy initial poses or take actions with hand-engineering code before running the test
22 | Returns:
23 | keep_runs: a tensor of shape (num_envs,) indicating whether the run is kept. A run might fail in pre_steps, which should not be counted
24 | success: a tensor of shape (num_envs,) indicating whether the run is successful
25 | images: a list of lists of images, each list of images is for one environment
26 | """
27 | obs = self.env.reset()
28 | keep_runs = torch.ones(self.num_envs, device=self.device).bool()
29 | if run_pre_steps:
30 | obs, keep_runs = self.pre_steps(obs, keep_runs)
31 | self.env.progress_buf[:] = 0
32 |
33 | images = []
34 | for step in range(self.num_steps):
35 | self.env.progress_buf[:] = 0
36 | actions = get_actions(obs, self.policy, is_deterministic=is_deterministic)
37 | obs, reward, done, info = self.env.step(actions)
38 |
39 | if step % 3 == 2:
40 | images.append(info["camera_images"])
41 |
42 | teleportation_images = self.env.hardcode_control(get_camera_images=True)
43 | teleportation_images = [teleportation_images[i] for i in range(0, len(teleportation_images), 3)]
44 | images.extend(teleportation_images)
45 |
46 | success = self.env._check_place_success()
47 |
48 | self.env.reset_idx(torch.arange(self.num_envs, device=self.device))
49 |
50 | return keep_runs, success, images
51 |
--------------------------------------------------------------------------------
/manipgen/config/task/pick_cube.yaml:
--------------------------------------------------------------------------------
1 | defaults:
2 | - IndustRealBase
3 | - _self_
4 |
5 | name: 'pick_cube'
6 | use_init_states: True
7 | headless: True # open viewer with render=True instead
8 | physics_engine: "physx"
9 |
10 | env:
11 | numEnvs: ${resolve_default:8192,${...num_envs}}
12 | numObservations: 22
13 | numActions: 6
14 | episode_length: 120
15 |
16 | val_ratio: ${resolve_default:0.0,${...val_ratio}}
17 |
18 | # camera properties
19 | camera:
20 | width: 1440
21 | height: 960
22 |
23 | object_friction: 1.0
24 | cube_size: 0.0385
25 |
26 | sampler:
27 | # inverse kinematics coefficient
28 | damping: 0.10
29 |
30 | # threshold for accepting IK results
31 | ik_solver_pos_tolerance: 0.05
32 | ik_solver_rot_tolerance: 0.04
33 |
34 | # max number of IK iterations
35 | max_ik_iters: 15
36 |
37 | # max number of backtrack iterations
38 | max_backtrack_iters: 20
39 |
40 | # noise for sampling object position:
41 | # for x and y axis, uniformly sample from [center-object_pos_noise, center+object_pos_noise]
42 | object_pos_noise: 0.2
43 |
44 | # noise for sampling eef position:
45 | # eef position is sampled from a half-sphere with radius target_eef_radius centered at target object position
46 | target_eef_radius: 0.08
47 |
48 | # minimum distance to table of target eef position
49 | target_eef_z_offset: 0.01
50 |
51 | rl:
52 | pos_action_scale: [0.05, 0.05, 0.05]
53 | rot_action_scale: [0.05, 0.05, 0.05]
54 | force_action_scale: [1.0, 1.0, 1.0]
55 | torque_action_scale: [1.0, 1.0, 1.0]
56 |
57 | clamp_rot: True
58 | clamp_rot_thresh: 1.0e-6
59 |
60 | max_episode_length: ${..env.episode_length}
61 |
62 | dist_gripper_reward_temp: -1.0
63 | dist_xy_reward_temp: -3.0
64 |
65 | gripper_keypoint_scale: 0.5
66 | success_bonus: 0.0
67 |
68 | enable_object_in_view_reward: False
69 | object_in_view_reward_temp: -0.8
70 | object_in_view_reward_threshold: 0.27
71 |
72 | randomize:
73 | franka_arm_initial_dof_pos: [0, 0.1963, 0, -2.0, 0, 2.3416, 0.7854]
74 | franka_gripper_initial_state: 1.0
75 |
76 | ctrl:
77 | task_space_impedance:
78 | motion_ctrl_axes: [1, 1, 1, 1, 1, 1]
79 | task_prop_gains: [300, 300, 300, 50, 50, 50]
80 | task_deriv_gains: [34, 34, 34, 1.4, 1.4, 1.4]
81 |
--------------------------------------------------------------------------------
/manipgen/utils/policy_testers/open_tester.py:
--------------------------------------------------------------------------------
1 | from isaacgym import gymtorch
2 |
3 | import torch
4 |
5 | from manipgen.utils.rlgames_utils import get_actions
6 | from manipgen.utils.policy_testers.base_tester import BaseTester
7 |
8 |
9 | class FrankaOpenTester(BaseTester):
10 | def __init__(self, env, policy, num_steps, task_name):
11 | super().__init__(env, policy, num_steps, task_name)
12 |
13 | def pre_steps(self, obs, keep_runs):
14 | assert False, "`pre_steps` is not implemented for this testers. Please specify initial states."
15 |
16 | def run_steps(self, run_pre_steps=True, is_deterministic=True):
17 | """
18 | Args:
19 | run_pre_steps: if true, teleport franka to easy initial poses or take actions with hand-engineering code before running the test
20 | Returns:
21 | keep_runs: a tensor of shape (num_envs,) indicating whether the run is kept. A run might fail in pre_steps, which should not be counted
22 | success: a tensor of shape (num_envs,) indicating whether the run is successful
23 | images: a list of lists of images, each list of images is for one environment
24 | """
25 | obs = self.env.reset()
26 | keep_runs = torch.ones(self.num_envs, device=self.device).bool()
27 | if run_pre_steps:
28 | obs, keep_runs = self.pre_steps(obs, keep_runs)
29 | self.env.progress_buf[:] = 0
30 |
31 | # check whether the initial states are valid
32 | self.env.ctrl_target_fingertip_midpoint_pos[:] = self.env.fingertip_centered_pos
33 | self.env.ctrl_target_fingertip_midpoint_quat[:] = self.env.fingertip_centered_quat
34 | self.env.move_gripper_to_target_pose(gripper_dof_pos=-0.04, sim_steps=60)
35 | keep_runs &= self.env.gripper_dof_pos.sum(dim=1) > 0.002
36 |
37 | images = []
38 | for step in range(self.num_steps):
39 | actions = get_actions(obs, self.policy, is_deterministic=is_deterministic)
40 | obs, reward, done, info = self.env.step(actions)
41 |
42 | if step % 3 == 2:
43 | images.append(info["camera_images"])
44 |
45 | success = torch.clamp(self.env.relative_dof_completeness, max=1.0)
46 |
47 | self.env.reset_idx(torch.arange(self.num_envs, device=self.device))
48 |
49 | return keep_runs, success, images
50 |
--------------------------------------------------------------------------------
/manipgen/utils/policy_testers/pick_cube_tester.py:
--------------------------------------------------------------------------------
1 | from isaacgym import gymtorch
2 |
3 | import torch
4 |
5 | from manipgen.utils.rlgames_utils import get_actions
6 | from manipgen.utils.policy_testers.base_tester import BaseTester
7 |
8 |
9 | class FrankaPickCubeTester(BaseTester):
10 | def __init__(self, env, policy, num_steps, task_name):
11 | super().__init__(env, policy, num_steps, task_name)
12 |
13 | self.num_pre_steps = 100
14 |
15 | def pre_steps(self, obs, keep_runs):
16 | self.env.pre_steps(obs, keep_runs, self.num_pre_steps)
17 | return obs, keep_runs
18 |
19 | def run_steps(self, run_pre_steps=True, is_deterministic=True):
20 | """
21 | Args:
22 | run_pre_steps: if true, teleport franka to easy initial poses or take actions with hand-engineering code before running the test
23 | Returns:
24 | keep_runs: a tensor of shape (num_envs,) indicating whether the run is kept. A run might fail in pre_steps, which should not be counted
25 | success: a tensor of shape (num_envs,) indicating whether the run is successful
26 | images: a list of lists of images, each list of images is for one environment
27 | """
28 | obs = self.env.reset()
29 | keep_runs = torch.ones(self.num_envs, device=self.device).bool()
30 | if run_pre_steps:
31 | obs, keep_runs = self.pre_steps(obs, keep_runs)
32 | self.env.progress_buf[:] = 0
33 |
34 | images = []
35 | for step in range(self.num_steps):
36 | self.env.progress_buf[:] = 0
37 | actions = get_actions(obs, self.policy, is_deterministic=is_deterministic)
38 | obs, reward, done, info = self.env.step(actions)
39 |
40 | if step % 3 == 2:
41 | images.append(info["camera_images"])
42 |
43 | hit_joint_limits = info["hit_joint_limits"]
44 | keep_runs = keep_runs & ~hit_joint_limits
45 |
46 | teleportation_images = self.env.hardcode_control(get_camera_images=True)
47 | teleportation_images = [teleportation_images[i] for i in range(0, len(teleportation_images), 3)]
48 | images.extend(teleportation_images)
49 |
50 | success = self.env._check_lift_success().bool()
51 |
52 | self.env.reset_idx(torch.arange(self.num_envs, device=self.device))
53 |
54 | return keep_runs, success, images
--------------------------------------------------------------------------------
/manipgen/config/dagger/robomimic/base_depth.json:
--------------------------------------------------------------------------------
1 | {
2 | "train": {
3 | "num_data_workers": 0,
4 | "hdf5_cache_mode": null,
5 | "hdf5_use_swmr": true,
6 | "hdf5_load_next_obs": false,
7 | "hdf5_normalize_obs": false,
8 | "hdf5_filter_key": null,
9 | "hdf5_validation_filter_key": null,
10 | "dataset_keys": [
11 | "actions"
12 | ],
13 | "goal_mode": null
14 | },
15 | "observation": {
16 | "modalities": {
17 | "obs": {
18 | "low_dim": [
19 | "state"
20 | ],
21 | "rgb": [],
22 | "depth": [
23 | "visual"
24 | ]
25 | }
26 | },
27 | "encoder": {
28 | "low_dim": {
29 | "core_class": null,
30 | "core_kwargs": {},
31 | "obs_randomizer_class": null,
32 | "obs_randomizer_kwargs": {}
33 | },
34 | "rgb": {
35 | "core_class": "VisualCore",
36 | "core_kwargs": {},
37 | "obs_randomizer_class": null,
38 | "obs_randomizer_kwargs": {}
39 | },
40 | "depth": {
41 | "core_class": "VisualCore",
42 | "core_kwargs": {
43 | "feature_dimension": 64,
44 | "flatten": true,
45 | "backbone_class": "ResNet18Conv",
46 | "backbone_kwargs": {
47 | "pretrained": false,
48 | "input_coord_conv": false
49 | },
50 | "pool_class": "SpatialSoftmax",
51 | "pool_kwargs": {
52 | "num_kp": 32,
53 | "learnable_temperature": false,
54 | "temperature": 1.0,
55 | "noise_std": 0.0,
56 | "output_variance": false
57 | }
58 | },
59 | "obs_randomizer_class": "CropRandomizer",
60 | "obs_randomizer_kwargs": {
61 | "crop_height": 76,
62 | "crop_width": 76,
63 | "num_crops": 1,
64 | "pos_enc": false
65 | }
66 | }
67 | }
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/manipgen/real_world/vlm_planning/prompts/tagging_prompt.py:
--------------------------------------------------------------------------------
1 | SYSTEM_PROMPT ="""
2 | ### System Description ###
3 | You are an expert at identifying objects in images. You will see images of the scene and output a list of every single object that is present in the scene in JSON format.
4 | We provide additional details specifying the task below.
5 |
6 |
7 | ### Task Description ###
8 | Task: You will return a comma-separated list of all the objects that are on the table only.
9 | The table is defined as the flat surface that the robot is on - it has a floral tablecloth.
10 | Also, return objects that are inside shelves, drawers, and microwaves.
11 | Also return sub-objects of objects that are on the table, for example, drawers, etc.
12 | We want the superset of objects in both images, so make sure you get all the objects.
13 |
14 | ### Helpful Hints ###
15 | 1. If possible describe the object with a color, for example, "black bin" or "orange carrot".
16 | 2. DO NOT return sub-objects of the robot. It should be considered as a single object.
17 | 3. DO NOT describe objects with text labels on them, for example, "Coca Cola" or "HARRY'S".
18 | 4. Each object tag SHOULD NOT be more than 3 words, including words separated by "-".
19 | 5. Use information from all input images to make sure you dont miss any objects, and make sure you get the right answer.
20 | 6. Pay attention to objects such as shelves and microwaves, and makes sure to include objects that are inside them.
21 |
22 | ### Formatting ###
23 | 0. The input will only be image(s) of the scene.
24 | 1. Each individual object should be mentioned separately in the list.
25 | 2. For object names, please be descriptive, this helps SAM figure out which object you are referring to.
26 | This means, color, material, texture etc. Any of these can help Grounded SAM understand the object you are referring to.
27 | Give detailed descriptions, give clear 3+ length word descriptions of the object.
28 | For example,