Skip to content

Primitive-Planner: An Ultra Lightweight Quadrotor Planner with Time-optimal Primitives

License

Notifications You must be signed in to change notification settings

ZJU-FAST-Lab/Primitive-Planner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Primitive_Planner

Requirements

The code is tested on clean Ubuntu 20.04 with ROS noetic installation.

Install the required package toppra:

sudo pip3 install toppra

Run the code

1. Download and compile the code

git clone https://github.com/ZJU-FAST-Lab/Primitive-Planner.git
cd Primitive-Planner
catkin_make -DCMAKE_BUILD_TYPE=Release

2. Generate the motion primitive library

cd src/scripts
python3 swarm_path.py

The generated motion primitive library is stored in "src/planner/plan_manage/primitive_library/".

3. Run the planner

In the "Primitive-Planner/" directory:

source devel/setup.bash # or setup.zsh
cd src/scripts
python3 gen_position_swap.py 20 # It will generate the swarm.launch with 20 drones
roslaunch primitive_planner swarm.launch

Wait until all the nodes have their launch process finished and keep printing "[FSM]: state: WAIT_TARGET. Waiting for trigger".

Open another terminal, publish the trigger

cd src/scripts
bash pub_trigger.sh

Then the drones (drone number is 40) will start to fly like this

Change the drone number when executing "python3 gen_position_swap.py <drone_number>".

Before starting the "roslaunch" command, please open another terminal and run "htop" to monitor the Memory usage and CPU usage. Each drone requires about 200 MB memory. Keep the htop opened for entire flight.

The computation time is printed on the terminal in blue text, named as "plan_time". To get the accurate computation time, please fix the CPU frequency to its maximum by

sudo apt install cpufrequtils
sudo cpufreq-set -g performance

Otherwise the CPU will run in powersave mode with low frequency.

About

Primitive-Planner: An Ultra Lightweight Quadrotor Planner with Time-optimal Primitives

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published