![]() |
OMPL Plannification
Path planning with OMPL
|
This project regroup tools for path planning in 2D or in 3D using OMPL (http://ompl.kavrakilab.org/index.html). It also include a ROS implementation for dynamic plannification.
Work with Ubuntu 14.04 (and ROS Indigo) or with Ubuntu 16.04 (and ROS Kinetic).
Catkin Workspace : mkdir -p ~/catkin_ws/src cd ~/catkin_ws/src catkin_init_workspace
cd ~/catkin_ws/ catkin_make
echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc source ~/.bashrc
It's possible to use the Turtlebot or the Hector Quadrotor (ROS Indigo only).
Turtlebot dependencies :
sudo apt-get install ros-kinetic-turtlebot* ros-kinetic-octomap* ros-kinetic-octovis or sudo apt-get install ros-indigo-turtlebot* ros-indigo-octomap* ros-indigo-octovis
Turtlebot install :
copy "mapping_planning_tutorial" folder (in Source Files directory) to "~/catkin_ws/src". cd ~/catkin_ws/ catkin_make (mignt need to be performed multiple times if you have error messages with "FindPathToGoal". Warning : it's possible that you won't manage to compile if you don't have enough computation power)
copy "hector_quadrotor_tutorial" folder (in Source Files directory) to "~/catkin_ws/src".
Differences with Turtlebot
Launch file : start_turtlebot_mapping_planning_control.launch "/odom" ===> "/world" <node pkg="control_turtlebot" type="controller_turtlebot.py" name="controller_turtlebot" respawn="true" output="screen" /> ===> <node pkg="control_turtlebot" type="controller_quadrotor.py" name="controller_quadrotor" respawn="true" output="screen" />
odom_sub_ = _node_hand.subscribe("/odom", 1, &ROS_OMPL_Planner::odomCallback, this); ==> odom_sub_ = node_handler_.subscribe("/ground_truth/state", 1, &ROS_OMPL_Planner::odomCallback, this); visual_result_path.header.frame_id = result_path.header.frame_id = q_init_goal.header.frame_id = visual_rrt.header.frame_id = "/odom"; ===> visual_result_path.header.frame_id = result_path.header.frame_id = q_init_goal.header.frame_id = visual_rrt.header.frame_id = "/world";
You can run HelloWorld program to understand how works OMPL_Planner alone or you can run the ROS implementation (ROS_OMPL_Planner) which will include the ROS implementation, the visual simulation, the Octomap server, etc.
copy the octomap file (.bt) (in Maps directory) you want to use from the Map folder in the project to "~/catkin_ws/devel/lib/control_turtlebot" folder. cd ~/catkin_ws/devel/lib/control_turtlebot run HelloWorld (./HelloWorld)
Enjoy !
1st terminal (Gazebo / Rviz / Controller) : Turtlebot : roslaunch control_turtlebot start_turtlebot_modules.launch Quadrotor : roslaunch hector_quadrotor_demo indoor 2nd terminal (Octomap / Planning): roslaunch control_turtlebot start_turtlebot_mapping_planning_control.launch 3rd terminal (Planning request) : rosservice call /controller_turtlebot/find_path_to_goal "goal_state_x: 0.0 goal_state_y: 0.0 goal_state_z: 0.0" rosservice call /controller_turtlebot/goto "goal_state_x: 0.0 goal_state_y: 0.0 goal_state_z: 0.0"
See launch folder for runtime configurations.
In config folder : planner_parameters.yaml
Contains all the necessary parameters for a basic use of the planner (planning dimension, collision mask, etc.).
See also start_turtlebot_mapping_planning_control.launch file and src folder for a deeper understanding of the ROS implementation.
BUG : Compilation sur certain linux : FindPathToGoal.h pb de génération avec cmake
Frontier exploration
Clean the dynmacilly allowed memory (Needed for dynamic check)
Optimisation :
prevent creation of too close state (Ex : start = goal is a problem)
path check : don't check path already done
Improving sending speed of the octomap