This package contains implementations to compute coverage patterns and shortest paths in general polygon with holes. Please cite our accompanying publication when using it.
Bähnemann, Rik, et al.
"Revisiting Boustrophedon Coverage Path Planning as a Generalized Traveling Salesman Problem."
Field and Service Robotics. Springer, Cham, 2019.
Video: https://youtu.be/u1UOqdJoK9s
Install ROS melodic.
Install catkin and wstool build dependencies.
sudo apt-get install python-wstool python-catkin-tools ros-melodic-cmake-modules
Create a workspace.
cd ~
mkdir -p catkin_ws/src
cd catkin_ws
catkin init
catkin config --extend /opt/ros/melodic
Download package dependencies from dependencies.rosinstall. Note: If you have not setup SSH keys in GitHub use dependencies_https.rosinstall.
cd ~/catkin_ws/src
git clone git@github.com:ethz-asl/polygon_coverage_planning.git
wstool init
wstool merge polygon_coverage_planning/install/dependencies.rosinstall
wstool update
Install CGAL dependencies for catkinized package cgal_catkin.
sudo apt-get install libgmp-dev libmpfr-dev
Install GTSP solver's Mono dependency.
sudo apt install gnupg ca-certificates
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb https://download.mono-project.com/repo/ubuntu stable-bionic main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt update
sudo apt install mono-devel
After installing all dependencies, build the workspace.
catkin build
The package has a ROS interface for shortest path planning and coverage planning. First source your workspace to execute any of the nodes.
source ~/catkin_ws/devel/setup.bash
roslaunch polygon_coverage_ros coverage_planner.launch
The polygon can be set via
- ROS service call
rosservice call /coverage_planner/set_polygon
- ROS parameter
/coverage_planner/polygon
or - RVIZ Polygon Tool as in the video above.
The plan is generated via
- ROS service call 'rosservice call /coverage_planner/plan_path' or
- clicking start and goal points using the RVIZ clicked_point tool as in the video above.
roslaunch polygon_coverage_ros shortest_path_planner.launch
Setting the polygon and planning the path is the same as for Coverage Planning.
This repository is subject to GNU General Public License version 3 or later due to its dependencies.
The underlying (exact) geometric operations rely on CGAL which is restricted by GNU General Public License version 3 or later.
The underlying optimization the memetic solver presented in
Gutin, Gregory, and Daniel Karapetyan.
"A memetic algorithm for the generalized traveling salesman problem."
Natural Computing 9.1 (2010): 47-60.
is free of charge for non-commercial purposes only.