Skip to content

A differentiable collision-free corridor generator.

Notifications You must be signed in to change notification settings

jonarriza96/corrgen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CorrGen

CorrGen — A Differentiable Collision-Free Corridor Generator.

Camera Point cloud with corridors
camera 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}
}

Quickstart

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 and CPPFLAGS 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

Usage

KITTI dataset

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) or g (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)

Toy example

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).

Corridor 2D

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.

2D cross section comparison

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.

Related repositories

For a discrete representation of the collision-free space via convex decomposition, check out pydecomp!

About

A differentiable collision-free corridor generator.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages