• Stars
    star
    187
  • Rank 206,464 (Top 5 %)
  • Language
    C++
  • License
    BSD 3-Clause "New...
  • Created over 3 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Perception-Aware Trajectory Planner in Dynamic Environments

PANTHER: Perception-Aware Trajectory Planner in Dynamic Environments

PANTHER: Perception-Aware Trajectory Planner in Dynamic Environments PANTHER: Perception-Aware Trajectory Planner in Dynamic Environments
PANTHER: Perception-Aware Trajectory Planner in Dynamic Environments PANTHER: Perception-Aware Trajectory Planner in Dynamic Environments

Citation

When using PANTHER, please cite PANTHER: Perception-Aware Trajectory Planner in Dynamic Environments (pdf and video):

@article{tordesillas2021panther,
  title={{PANTHER}: Perception-Aware Trajectory Planner in Dynamic Environments},
  author={Tordesillas, Jesus and How, Jonathan P},
  journal={arXiv preprint arXiv:2103.06372},
  year={2021}
}

If you are looking for a Planner

  • In Multi-Agent and Dynamic Environments, you may be interesed also in MADER (pdf, video):
  • In Static Unknown environments, you may be interesed also in FASTER (pdf, video)

General Setup

PANTHER has been tested with Ubuntu 20.04/ROS Noetic. Other Ubuntu/ROS version may need some minor modifications, feel free to create an issue if you have any problems.

You can use PANTHER with only open-source packages. Matlab is only needed if you want to introduce modifications to the optimization problem.

Dependencies

CGAL

These commands will install CGAL v4.12.4:

sudo apt-get install libgmp3-dev libmpfr-dev -y
mkdir -p ~/installations/cgal && cd ~/installations/cgal
wget https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-4.14.2/CGAL-4.14.2.tar.xz
tar -xf CGAL-4.14.2.tar.xz && cd CGAL-4.14.2/ && cmake . -DCMAKE_BUILD_TYPE=Release && sudo make install

CasADi and IPOPT

Install CasADi from source (see this for more details) and the solver IPOPT:

sudo apt-get install gcc g++ gfortran git cmake liblapack-dev pkg-config --install-recommends
sudo apt-get install swig
sudo apt-get install coinor-libipopt-dev
cd ~/installations #Or any other folder of your choice
git clone https://github.com/casadi/casadi.git -b master casadi
cd casadi && mkdir build && cd build
cmake . -DCMAKE_BUILD_TYPE=Release -DWITH_PYTHON=ON -DWITH_IPOPT=ON .. 
sudo make install

Linear Solvers

Go to http://www.hsl.rl.ac.uk/ipopt/, click on Personal Licence, Source to install the solver MA27 (free for everyone), and fill and submit the form. Once you receive the corresponding email, download the compressed file, uncompress it, and place it in the folder ~/installations (for example). Then execute the following commands:

Note: the instructions below follow this closely

cd ~/installations/coinhsl-2015.06.23
wget http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/OLD/metis-4.0.3.tar.gz #This is the metis version used in the configure file of coinhsl
tar xvzf metis-4.0.3.tar.gz
#sudo make uninstall && sudo make clean #Only needed if you have installed it before
./configure LIBS="-llapack" --with-blas="-L/usr/lib -lblas" CXXFLAGS="-g -O3 -fopenmp" FCFLAGS="-g -O3 -fopenmp" CFLAGS="-g -O3 -fopenmp" #the output should say `checking for metis to compile... yes`
sudo make install #(the files will go to /usr/local/lib)
cd /usr/local/lib
sudo ln -s libcoinhsl.so libhsl.so #(This creates a symbolic link `libhsl.so` pointing to `libcoinhsl.so`). See https://github.com/casadi/casadi/issues/1437
echo "export LD_LIBRARY_PATH='\${LD_LIBRARY_PATH}:/usr/local/lib'" >> ~/.bashrc
Note

We recommend to use MA27. Alternatively, you can install both MA27 and MA57 by clicking on Coin-HSL Full (Stable) Source (free for academia) in http://www.hsl.rl.ac.uk/ipopt/ and then following the instructions above. Other alternative is to use the default mumps solver (no additional installation required), but its much slower than MA27 or MA57.

Other dependencies

sudo apt-get install ros-"${ROS_DISTRO}"-rviz-visual-tools  ros-"${ROS_DISTRO}"-tf2-sensor-msgs
sudo apt-get install git-lfs ccache 

To be able to use catkin build, run:

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu `lsb_release -sc` main" > /etc/apt/sources.list.d/ros-latest.list'
wget http://packages.ros.org/ros.key -O - | sudo apt-key add -

And then

  • If you have Ubuntu 18.04, run sudo apt-get install python-catkin-tools -y
  • If you have Ubuntu 20.04 run sudo apt-get install python3-osrf-pycommon python3-catkin-tools -y

Additionally, if you have Ubuntu 20.04, you'll need sudo apt-get install python-is-python3 -y

Optional (only if you want to modify the optimization problem, or use a different solver than MA27. MATLAB needed)

The easiest way to do this is to install casadi from binaries by simply following these commands:

cd ~/installations
mkdir casadi
wget https://github.com/casadi/casadi/releases/download/3.5.5/casadi-linux-matlabR2014b-v3.5.5.tar.gz
tar xvzf casadi-linux-matlabR2014b-v3.5.5.tar.gz -C ./casadi

Open Matlab, execute the command edit(fullfile(userpath,'startup.m')), and add the line addpath(genpath('/home/YOUR_USERNAME/installations/casadi')) in that file (changing YOUR_USERNAME with your username). This file startup.m is executed every time Matlab starts.

Then you can restart Matlab (or run the file startup.m), and make sure this works:

import casadi.*
x = MX.sym('x')
disp(jacobian(sin(x),x))

Then, to use a specific linear solver, you simply need to change the name of linear_solver_name in the file main.m. You can also introduce more changes in the optimization problem in that file. After these changes, you need to run main.m twice: first with pos_is_fixed=false and then with pos_is_fixed=true. This will generate all the necessary files in the panther/matlab/casadi_generated_files folder. These files will be read by C++.

Note: When using a linear solver different from mumps, you need to start Matlab from the terminal (typing matlab).More info in this issue.

Note: Instead of the binary installation explained in this section, another (but not so straightforward) way would be to use the installation from source done above, but it requires some patches to swig, see this.

Compilation

cd ~/Desktop && mkdir ws && cd ws && mkdir src && cd src
git clone https://github.com/mit-acl/panther.git
cd panther
git lfs install
git submodule init && git submodule update
cd ../../ && catkin build
echo "source ~/Desktop/ws/devel/setup.bash" >> ~/.bashrc 
source ~/.bashrc

Running Simulations

Simply execute

roslaunch panther simulation.launch quad:=SQ01s

Now you can press G (or click the option 2D Nav Goal on the top bar of RVIZ) and click any goal for the drone.

You can also change the following arguments when executing roslaunch

Argument Description
quad Name of the drone
perfect_controller If true, the drone will track perfectly the trajectories, and the controller and physics engine of the drone will not be launched. If false, you will need to clone and compile snap_sim, snap and outer_loop
perfect_prediction If true, the drone will have access to the ground truth of the trajectories of the obstacles. If false, the drone will estimate their trajectories (it needs gazebo:=true in this case).
gui_mission If true, a gui will be launched to start the experiment
rviz If true, Rviz will be launched for visualization
gazebo If true, Gazebo will be launched
gzclient If true, the gui of Gazebo will be launched. If false, (and if gazebo:=true) only gzserver will be launched. Note: right now there is some delay in the visualization of the drone the gui of Gazebo. But this doesn't affect the point clouds generated.

You can see the default values of these arguments in simulation.launch.

NOTE: (TODO) Right now the radius of the drone plotted in Gazebo (which comes from the scale field of quadrotor_base_urdf.xacro) does not correspond with the radius specified in panther.yaml.

Credits:

This package uses some the hungarian-algorithm-cpp and some C++ classes from the DecompROS and repos (both included in the thirdparty folder), so credit to them as well.


Approval for release: This code was approved for release by The Boeing Company in March 2021.

More Repositories

1

faster

3D Trajectory Planner in Unknown Environments
C++
949
star
2

cadrl_ros

ROS package for dynamic obstacle avoidance for ground robots trained with deep RL
Python
572
star
3

mader

Trajectory Planner in Multi-Agent and Dynamic Environments
C++
479
star
4

gym-collision-avoidance

OpenEdge ABL
246
star
5

clipper

graph-theoretic framework for robust pairwise data association
C++
219
star
6

dpgo

Distributed Pose Graph Optimization
C++
181
star
7

mppi_numba

A GPU implementation of Model Predictive Path Integral (MPPI) control that uses a probabilistic traversability model for planning risk-aware trajectories.
Jupyter Notebook
179
star
8

rl_collision_avoidance

Training code for GA3C-CADRL algorithm (collision avoidance with deep RL)
Python
118
star
9

rmader

Decentralized Multiagent Trajectory Planner Robust to Communication Delay
C++
72
star
10

minvo

Simplexes with Minimum Volume Enclosing Polynomial Curves
MATLAB
71
star
11

aclswarm

MIT ACL distributed formation flying using multirotors
C++
67
star
12

nfl_veripy

Formal Verification of Neural Feedback Loops (NFLs)
Python
63
star
13

dpgo_ros

ROS wrapper for distributed pose graph optimization
C++
59
star
14

deep_panther

C++
51
star
15

clear

CLEAR algorithm for multi-view data association
MATLAB
35
star
16

planning

List of planning algorithms developed at MIT-ACL
34
star
17

puma

PUMA: Fully Decentralized Uncertainty-aware Multiagent Trajectory Planner with Real-time Image Segmentation-based Frame Alignment
C++
27
star
18

fastsam_ros

ROS wrapper for FastSAM, with docker
Python
17
star
19

separator

Linear separability (via planes) of two sets of 3D points
C++
12
star
20

dc2g

Planning Beyond the Sensing Horizon Using a Learned Context
Python
10
star
21

gym-minigrid

Python
10
star
22

SOS-Match

JavaScript
10
star
23

yolov7_ros

ROS wrapper for YOLOv7, with docker
Python
9
star
24

dc2g_public

Deep Cost-to-Go Planning Algorithm (IROS '19)
9
star
25

iscp_path_planner

Iterative sequential convex programming path planner, from Steven and Mark's ICRA 2015 paper
Python
4
star
26

panther_extra

Python
1
star
27

murp-datasets

Jupyter Notebook
1
star
28

motlee

Multiple Object Tracking with Localization Error Elimination
Python
1
star
29

mit-acl.github.io

SCSS
1
star