CorrGen — A Differentiable Collision-Free Corridor Generator.
Camera | Point cloud with corridors |
---|---|
![]() |
![]() |
For the implementation details, please check the paper, watch the video and/or the conference talk.
If you use this framework please cite our work:
@article{arrizabalaga2024differentiable,
title={Differentiable Collision-Free Parametric Corridors},
author={Arrizabalaga, Jon and Manchester, Zachary and Ryll, Markus},
journal={arXiv preprint arXiv:2407.12283},
year={2024}
}
Install dependencies the following:
-
Linux:
sudo apt-get install libcdd-dev libblas3 libblas-dev liblapack3 liblapack-dev gfortran
-
Mac:
brew install cddlib gmp eigen openblas cython boost
Note: Remember to set
LDFLAGS
andCPPFLAGS
to the correct paths for the libraries.
Create a python environment with python 3.9. For example, with conda:
conda create --name corrgen python=3.9
conda activate corrgen
pip install -r requirements.txt
Update the ~/.bashrc
with
export CORRGEN_PATH=/path_to_pfdq
export PYTHONPATH=$PYTHONPATH:/$CORRGEN_PATH
To run a real-world example from the KITTI dataset (Figs 5 and 6 in the paper), run this command:
python examples/kitti.py --case p --lp --n_corrgen 6 --n_decomp 6
The options are the following ones:
--case
:p
(pink corridor) org
(green corridor).--lp
: Runs the approximated LP instead of the original SDP--n_corrgen
: Integer indicating the polynomial degree of the polynomials in corrgen.--n_decomp
: Sets the number of polygons for convex decomposition (and runs it)
To run a toy example (Fig. 4 in the paper), run this command:
python examples/toy_example.py --lp --n_corrgen 6
The options are the same as for the KITTI example (except for --case
).
To run a 2D corridor example (Fig. 4A in the paper), run this command:
python examples/corridor_2d.py
Note: This example is not properly integrated with the codebase, and therefore, its implementation is not as clean/efficient as the other examples.
To run the comparison of using different cross section parameterizations (Fig.3 in the paper), run this command:
python examples/cross_section.py
Notice that every time you run the command, the point cloud in the cross section varies. This is a great standalone script, great for conceptual prototyping.
For a discrete representation of the collision-free space via convex decomposition, check out pydecomp!