Prior work on Neural Contact Fields (NCF) use intrinsic tactile sensing between gripper and object to estimate extrinsic contacts in simulation. However, its effectiveness and utility in real-world tasks remains unknown.
In this work, we improve NCF to enable sim-to-real transfer and use it to train policies for mug-in-cupholder and bowl-in-dishrack insertion tasks.
Our work builds on Neural Contact Fields (NCF-v1) and improves it on several fronts to enable sim-to-real transfer.
Our NCF-v2 is able to track extrinsic contacts from touch, generalizing to unseen shapes and environments.
We explore the effectiveness of estimating extrinsic contacts in downstream tasks of mug-in-cupholder and bowl-in-dishrack, which involve contact-rich interactions between object and environment.
We recommend using a conda environment to install the dependencies. You can create a new environment with the following command:
conda create -n ncf python=3.8
conda activate ncf
Download the Isaac Gym Preview 4 release from this link. Then, install it with the following command:
cd IsaacGym_Preview_4_Package/isaacgym/python # Go to the python folder of the Isaac Gym package
pip install -e .
Install TACTO from this repository link
cd tacto # Go to the tacto folder
pip install -r requirements/requirements.txt
pip install -e .
pip install numpy==1.23 # TACTO requires numpy 1.23
Install additional dependencies:
pip install submitit
pip install pytorch-lightning
pip install open3d
pip install trimesh
pip install vedo
Install this repo:
cd NCF_policies
pip install -e .
We made modifications to key componentes on the NCF pipeline to enable sim2real transfer.
You can find the code of NCF-v2 in:
NCF-policy/
algo2/
ncf/
vae/
ndf/
contact_regressor/
pipeline.py
For data generation and training procedures, you can follow the same steps for (NCF-v1).
-
Download the checkpoints for NCF_v2 and the trained policies
. download_checkpoints.sh
-
Edit in
run_test_cupholder.sh
orrun_test_dishrack.sh
the path to the checkpoint of the policy you want to evaluate.These files are located in
NCF_policies/isaacgymenvs/run_test_cupholder.sh
andNCF_policies/isaacgymenvs/run_test_dishrack.sh
-
To run a policy for the mug-in-cupholder task:
NCF_policies/isaacgymenvs/run_test_cupholder.sh <GPU ID> <SEED> <FOLDER NAME> POLICY NAME>
For example, for testing the policy with ground truth extrinsic contacts:
NCF_policies/isaacgymenvs/run_test_cupholder.sh 0 42 v1 proprio_gt
Testing the policy with proprioception + ncf:
NCF_policies/isaacgymenvs/run_test_cupholder.sh 0 42 v1 proprio_ncf
Testing the policy with proprioception + tactile:
NCF_policies/isaacgymenvs/run_test_cupholder.sh 0 42 v1 tactile
Testing the policy with proprioception only:
NCF_policies/isaacgymenvs/run_test_cupholder.sh 0 42 v1 proprio
-
Similarly, for testing a policy on the bowl-in-dishrack task:
NCF_policies/isaacgymenvs/run_test_dishrack.sh <GPU ID> <SEED> <FOLDER NAME> POLICY NAME>
If you find NCF-v2 or this codebase helpful in your research, please consider citing:
@misc{higuera2023perceiving,
title={Perceiving Extrinsic Contacts from Touch Improves Learning Insertion Policies},
author={Carolina Higuera and Joseph Ortiz and Haozhi Qi and Luis Pineda and Byron Boots and Mustafa Mukadam},
year={2023},
eprint={2309.16652},
archivePrefix={arXiv},
primaryClass={cs.RO}
}
The majority of NCF-v2 is licensed under MIT license, however portions of the project are available under separate license terms. Pytorch-lightning is under Apache License 2.0. IsaacGymEnvs is licensed under the BSD 3-clause license. See LICENSE for details.
We use the implementation provided in the neural descriptor fields repo. For implementing the insertion tasks, we use as reference the Factory environments available in the IsaacGymEnvs repo. As for the RL method, we use the PPO implementation available in the codebase of the Hora project.
For TACTO intergration, we reference from the Hora-Tactile and MidasTouch projects.
We encourage you to check out all these projects!