[go: up one dir, main page]

Skip to content

A General-Purpose Trajectory Optimizer for Multicopters

License

Notifications You must be signed in to change notification settings

ChanJoon/GCOPTER

 
 

Repository files navigation

GCOPTER

Based on Example 1, plan a global trajectory with GCOPTER and control Iris in PX4 simulation.

How to use

#1 Trajectory Planning in mockamap

Like as Example 1, plan your trajectory with 2D Nav Goal in rviz or calling Command.srv. In multi_points_planning, you can configure the number of waypoint in the YAML and select them in rviz.

roslaunch px4_controller mockamap_env.launch
roslaunch px4_controller multi_points_planning.launch # simple or multi_points
roslaunch px4_controller position_controller.launch # position or geometric

#2 Trajectory Planning in race track

In #1, there are no obstacles in Gazebo; it only features a virtual map in rviz for trajectory planning.

This example has a race track and corresponding ground-truth pointcloud map. So you can check whether planned trajectory is actually feasible for avoiding obstacles in Gazebo.

roslaunch px4_controller race_track_env.launch
roslaunch px4_controller geometric_controller.launch # position or geometric
roslaunch px4_controller race_track_planning.launch

NOTE: Launch race_track_planning.launch after loading Gazebo, rviz and offboarding Iris.

References


Original README

GCOPTER is an efficient and versatile multicopter trajectory optimizer built upon a novel sparse trajectory representation named MINCO. User-defined state-input constraints for dynamics involving nonlinear drag effects are supported.

Updates

  • July 20, 2022 - Released my thesis in chinese with detailed and up-to-dated methodology about corridor generation, multicopter dynamics, trajectory planning, and so on.

  • Mar 11, 2022 - A minimal but non-trivial example for global kinodynamic planning is released. Modules for trajectory optimization, quadcopter dynamics with nonlinear drags, fast iterative region inflation for corridor generation, non-uniform MINCO (s=3), etc., are released.

  • Mar 15, 2022 - Released non-uniform MINCO for s=2 and s=4.

  • May 19, 2022 - Released a doc to detail differential flatness for multicopters under nonlinear drag effects. Add code links for all projects powered by MINCO.

  • Plan - More examples are on the way, including uniform MINCO (s=2,3,4), trajectory generation for tube-shaped and sphere-shaped corridors, local replanner, whole-body SE(3) planner, interfaces for external constraints, augmented Lagrangian, and so on.

About

If our repo helps your academic projects, please cite our paper. Thank you!

Author: Zhepei Wang and Fei Gao from ZJU FAST Lab.

Paper: Geometrically Constrained Trajectory Optimization for Multicopters, Zhepei Wang, Xin Zhou, Chao Xu, and Fei Gao, IEEE Transactions on Robotics (T-RO), Regular Paper.

@article{WANG2022GCOPTER,
    title={Geometrically Constrained Trajectory Optimization for Multicopters}, 
    author={Wang, Zhepei and Zhou, Xin and Xu, Chao and Gao, Fei}, 
    journal={IEEE Transactions on Robotics}, 
    year={2022}, 
    volume={38}, 
    number={5}, 
    pages={3259-3278}, 
    doi={10.1109/TRO.2022.3160022}
}

Applications

Example 1: Global Trajectory Planning

This is a minimal yet non-trivial example of our trajectory optimizer for real-time high-quality corridor and global trajectory generation subject to dynamic constraints. For installation, the following terminal commands are helpful.

sudo apt update
sudo apt install cpufrequtils
sudo apt install libompl-dev
sudo cpufreq-set -g performance
mkdir ROS; cd ROS; mkdir src; cd src
git clone https://github.com/ZJU-FAST-Lab/GCOPTER.git
cd ..
catkin_make
source devel/setup.bash
roslaunch gcopter global_planning.launch

After conduct the command, you will see the windows for rviz and rqt_plot. Please follow the gif below for global trajectory planning in a random map.

The angle between the arrow of 2D Nav Goal and positive x-axis (red axis) decides the relative height. You can repeat choosing the start and goal to trigger the global planning. The solution trajectory considers spatial-temporal optimality and vehicle dynamics with drag effects. Some states for trajectories, like net thrust, tilt angle, body rate are all available. The magnitudes for some of them are shown in the rqt_plot. Corridor and trajectory generation are computed in real-time. Physical parameters in standard units are all modifiable in a config file. If you only wants a point-mass model to achieve a faster computing, please modify the penalty-functional-relevant code.

Projects Supported by GCOPTER or MINCO

Powerful Submodules

About

A General-Purpose Trajectory Optimizer for Multicopters

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 83.2%
  • Python 12.6%
  • CMake 3.3%
  • C 0.9%