🟥 [05/30/2023] First notebook tutorial available! Check out trajectory_optimization_tutorial.ipynb
(A few upgrades to optimization setup as well.)
This is the codebase for our paper DiffCo: Auto-Differentiable Proxy Collision Detection with Multi-class Labels for Safety-Aware Trajectory Optimization, Yuheng Zhi, Nikhil Das, Michael Yip. [arxiv][IEEE T-Ro]
RRT-Connect | Optimized |
---|---|
It is recommended to use Conda for virtual environment management.
pip install -r requirements.txt
pip install -e .
- Install MoveIt.
- To install Baxter configurations, refer to this tutorial but change the versions of ros according to the one you installed. Note: Ubuntu 20.04 only has ros noetic supported AFAIK, so please do modify command lines from the Baxter tutorial according to the ros version that you installed.
The best entry point is the notebook tutorial under notebook_tutorials/
. (More to come)
This is a library of a relatively easy implementation of the differentiable collision checker itself (under the directory diffco
) and some scripts to reproduce experiments in the paper (under the directory script
)
speed_compare.py
includes comprehensive examples of using DiffCo to do trajectory optimization. Besides the experiment in the paper, we also included an implementation of using DiffCo with Adam to optimize trajectories under constraints.motion_planner.py
shows how we use OMPL (as initial point for optimization).[2,3]d_data_generation.py
implements how to use MoveIt and FCL to generate the initial dataset for Baxter and Plannar robots, respectively. You may use any of your favourite collision detection library to do this. In the tutorial, we also tried roboticstoolbox-python.active.py
contains code of the active learning experiment.test_correlation.py
contains code to evaluate the correlation between DiffCo output and FCL.escape.py
andcompare_sampling.py
contain code to do the free-space sampling speed comparison.diffco/optim.py
now contains our code for trajectory optimization. The code inscirpts/trajectory_optimization.py
are going to be deprecated.diffco/routines.py
contains a few convenient subroutines that appear often enough that we decided to write them into functions.
For more info on how to get started with these scripts (to, e.g., reproduce our experiments), see experiments.md
.