Skip to content

Motion planning and Navigation of AGV/AMR:ROS planner plugin implementation of A*, JPS, D*, LPA*, D* Lite, Theta*, RRT, RRT*, RRT-Connect, Informed RRT*, ACO, PSO, Voronoi, PID, LQR, MPC, DWA, APF, Pure Pursuit etc.

License

Notifications You must be signed in to change notification settings

ai-winter/ros_motion_planning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ubuntu ROS

ROS Motion Planning

Robot Motion planning is a computational problem that involves finding a sequence of valid configurations to move the robot from the source to the destination. Generally, it includes Path Searching and Trajectory Optimization.

  • Path Searching: Based on path constraints (e.g., avoiding obstacles), to find the optimal sequence for the robot to travel from the source to the destination without collision.

  • Trajectory Optimization: Based on kinematics, dynamics and obstacles, to optimize the trajectory of the motion state from the source to the destination according to the path.

This repository provides the implementation of common Motion Planning algorithms. The theory analysis can be found at motion-planning. Furthermore, we provide Python and MATLAB version.

Your stars, forks and PRs are welcome!

Contents

0. Quick Start within 3 Minutes

Tested on ubuntu 20.04 LTS with ROS Noetic.

  1. Install ROS (Desktop-Full Install Recommended).

  2. Install git.

    sudo apt install git
  3. Install dependence

    • conan

      pip install conan==1.59.0
      conan remote add conancenter https://center.conan.io
    • Other dependence.

      sudo apt install python-is-python3 \
      ros-noetic-amcl \
      ros-noetic-base-local-planner \
      ros-noetic-map-server \
      ros-noetic-move-base \
      ros-noetic-navfn \
      libgoogle-glog-dev
  4. Clone the reposity.

    git clone https://github.com/ai-winter/ros_motion_planning.git
  5. Compile the code.

    NOTE: Please refer to #48 if you meet libignition dependency error.

    cd scripts/
    ./build.sh  # you may need to install catkin-tools using: sudo apt install python-catkin-tools
  6. Execute the code.

    cd scripts/
    ./main.sh

    NOTE: Modifying launch files may not have any effect, because they are regenerated by a Python script based on src/user_config/user_config.yaml when you run main.sh. Therefore, you should modify configurations in user_config.yaml instead of launch files.

  7. Use 2D Nav Goal in RViz to select the goal.

  8. Moving!

  9. You can use the other script to shutdown them rapidly.

    cd scripts/
    ./killpro.sh
  10. Multi agents

    # 1. Replace with user_config_multi.yaml in main.sh
    # 2. Wait for initialization
    # 3. Publish goals
    rosrun sim_env goal_publisher.py

1. Document

The overall file structure is shown below.

ros_motion_planner
├── 3rd
├── docs
├── docker
├── assets
├── scripts
└── src
    ├── core
    │   ├── common
    │   ├── path_planner
    │   └── controller
    ├── sim_env             # simulation environment
    │   ├── config
    │   ├── launch
    │   ├── maps
    │   ├── meshes
    │   ├── models
    │   ├── rviz
    │   ├── urdf
    │   └── worlds
    ├── plugins
    │   ├── dynamic_rviz_config
    │   ├── dynamic_xml_config
    │   ├── gazebo_plugins
    │   ├── map_plugins
    │   └── rviz_plugins
    └── user_config         # user configure file

To better understand the project code, detailed interface documentation can be generated using the doxygen tool. First install doxygen and graphviz.

sudo apt-get install doxygen graphviz

Then start the doxygen and you can find the documentation in ./docs/html/index.html.

doxygen

For more information about the project usage, please refer to the following table.

Index Document Introduction
0 Status Introduce how to dynamically configure parameters such as robot types, planning algorithms, environmental obstacles, etc.
1 Status Introduce how to use Docker to conveniently build the project environment and simulate it.
2 Status Introduce how to build a real robot application based on the algorithms provided in this repository.
3 Status Important updates.

02. Tool Chains

For the efficient operation of the motion planning system, we provide a series of user-friendly simulation tools that allow for on-demand selection of these lightweight repositories.

Tool Version Introduction
Status This is a Gazebo plugin for pedestians with collision property. You can construct a dynamic environment in ROS easily using plugin.
Status This repository provides a ROS-based visualization Rviz plugins for path planning and curve generation algorithms.

03. Version

Global Planner

Planner Version Animation Papers
GBFS Status gbfs_ros.gif -
Dijkstra Status dijkstra_ros.gif -
A* Status a_star_ros.gif A Formal Basis for the heuristic Determination of Minimum Cost Paths
JPS Status jps_ros.gif Online Graph Pruning for Pathfinding On Grid Maps
D* Status d_star_ros.gif Optimal and Efficient Path Planning for Partially-Known Environments
LPA* Status lpa_star_ros.gif Lifelong Planning A*
D* Lite Status d_star_lite_ros.gif D* Lite
Voronoi Status voronoi_ros.gif -
Theta* Status theta_star_ros.gif Theta*: Any-Angle Path Planning on Grids, Any-angle path planning on non-uniform costmaps
Lazy Theta* Status lazy_theta_star_ros.gif Lazy Theta*: Any-Angle Path Planning and Path Length Analysis in 3D
S-Theta* Status s_theta_star_ros.gif S-Theta*: low steering path-planning algorithm
Hybrid A* Status hybrid_astar_ros.gif Practical search techniques in path planning for autonomous driving
RRT Status rrt_ros.gif Rapidly-Exploring Random Trees: A New Tool for Path Planning
RRT* Status rrt_star_ros.gif Sampling-based algorithms for optimal motion planning
Informed RRT Status informed_rrt_ros.gif Optimal Sampling-based Path Planning Focused via Direct Sampling of an Admissible Ellipsoidal heuristic
RRT-Connect Status rrt_connect_ros.gif RRT-Connect: An Efficient Approach to Single-Query Path Planning
ACO Status aco_ros.gif Ant Colony Optimization: A New Meta-Heuristic
GA Status ga_ros.gif Adaptation in Natural and Artificial Systems
PSO Status pso_ros.gif Particle Swarm Optimization

Local Planner

Planner Version Animation Paper
PID Status pid_ros.gif Mapping Single-Integrator Dynamics to Unicycle Control Commands p. 14
LQR Status lqr_ros.gif -
DWA Status dwa_ros.gif The Dynamic Window Approach to Collision Avoidance
APF Status apf_ros.gif Real-time obstacle avoidance for manipulators and mobile robots
RPP Status rpp_ros.gif Regulated Pure Pursuit for Robot Path Tracking
TEB Status Status
MPC Status mpc_ros.gif -
Lattice Status Status

Curve Generation

Planner Version Animation Paper
Polynomia Status polynomial_curve_python.gif -
Bezier Status bezier_curve_python.png -
Cubic Spline Status cubic_spline_python.png -
BSpline Status bspline_curve_python.png -
Dubins Status dubins_curve_python.png On curves of minimal length with a constraint on average curvature, and with prescribed initial and terminal positions and tangents
Reeds-Shepp Status reeds_shepp_python.png Optimal paths for a car that goes both forwards and backwards

04. Acknowledgments

05. License

The source code is released under GPLv3 license.

06. Maintenance

Feel free to contact us if you have any question.