Skip to content

Commit ec54d9a

Browse files
committed
Public release
1 parent 14bec27 commit ec54d9a

38 files changed

+4037
-0
lines changed

.github/workflows/main.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
2+
name: CI
3+
4+
on: [push, pull_request]
5+
6+
jobs:
7+
industrial_ci:
8+
strategy:
9+
matrix:
10+
env:
11+
- {ROS_DISTRO: melodic, ROS_REPO: main, UPSTREAM_WORKSPACE: 'github:nobleo/mobile_robot_simulator#fix/install github:nobleo/tracking_pid#master'}
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v1
15+
- uses: 'ros-industrial/industrial_ci@master'
16+
env: ${{matrix.env}}

CMakeLists.txt

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
cmake_minimum_required(VERSION 2.8.3)
2+
project(full_coverage_path_planner)
3+
add_compile_options(-std=c++11)
4+
5+
find_package(catkin REQUIRED
6+
COMPONENTS
7+
base_local_planner
8+
costmap_2d
9+
nav_core
10+
pluginlib
11+
roscpp
12+
roslint
13+
rostest
14+
tf
15+
)
16+
17+
include_directories(
18+
include
19+
test/include
20+
${catkin_INCLUDE_DIRS}
21+
)
22+
add_definitions(${EIGEN3_DEFINITIONS})
23+
24+
catkin_package(
25+
INCLUDE_DIRS include
26+
LIBRARIES ${PROJECT_NAME}
27+
CATKIN_DEPENDS
28+
base_local_planner
29+
costmap_2d
30+
nav_core
31+
pluginlib
32+
roscpp
33+
)
34+
35+
add_library(${PROJECT_NAME}
36+
src/common.cpp
37+
src/${PROJECT_NAME}.cpp
38+
src/spiral_stc.cpp
39+
)
40+
add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
41+
target_link_libraries(${PROJECT_NAME}
42+
${catkin_LIBRARIES}
43+
)
44+
45+
install(TARGETS
46+
${PROJECT_NAME}
47+
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
48+
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
49+
)
50+
51+
install(DIRECTORY include/${PROJECT_NAME}
52+
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
53+
)
54+
55+
install(FILES fcpp_plugin.xml
56+
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
57+
)
58+
59+
catkin_install_python(
60+
PROGRAMS
61+
nodes/coverage_progress
62+
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
63+
)
64+
65+
if (CATKIN_ENABLE_TESTING)
66+
catkin_add_gtest(test_common test/src/test_common.cpp test/src/util.cpp src/common.cpp)
67+
68+
catkin_add_gtest(test_spiral_stc test/src/test_spiral_stc.cpp test/src/util.cpp src/spiral_stc.cpp src/common.cpp src/${PROJECT_NAME}.cpp)
69+
add_dependencies(test_spiral_stc ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
70+
target_link_libraries(test_spiral_stc ${catkin_LIBRARIES})
71+
72+
find_package(OpenCV)
73+
include_directories(${OpenCV_INCLUDE_DIRS})
74+
target_link_libraries(test_spiral_stc ${OpenCV_LIBRARIES})
75+
76+
add_rostest(test/${PROJECT_NAME}/test_${PROJECT_NAME}.test)
77+
78+
endif()
79+
80+
roslint_cpp()

README.md

Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
# Full Coverage Path Planner (fcpp)
2+
3+
## Overview
4+
5+
This package provides an implementation of a Full Coverage Path Planner (fcpp) using the Backtracking Spiral Algorithm (BSA), see [1].
6+
7+
This packages acts as a global planner plugin to the Move Base Flex package (http://wiki.ros.org/move_base_flex).
8+
9+
![BSA](doc/fcpp_robot_0_5m_plus_tool_0_2m.png)
10+
11+
The user can configure robot radius and tool radius separately:
12+
13+
![robot_plus_tool](doc/robot_plus_tool.png)
14+
15+
16+
**Keywords:** coverage path planning, move base
17+
18+
### License
19+
20+
Apache 2.0
21+
22+
**Author(s): Yury Brodskiy, Ferry Schoenmakers, Tim Clephas, Jerrel Unkel, Loy van Beek, Cesar lopez**
23+
24+
**Maintainer: Cesar Lopez, cesar.lopez@nobleo.nl**
25+
26+
**Affiliation: Nobleo Projects BV, Eindhoven, the Netherlands**
27+
28+
The Full Coverage Path Planner package has been tested under [ROS] Melodic and Ubuntu 18.04.
29+
30+
[Build status](https://bitbucket.org/nobleo/full_coverage_path_planner/addon/pipelines/home#!/results)
31+
32+
## Installation
33+
34+
35+
### Building from Source
36+
37+
38+
#### Dependencies
39+
40+
- [Robot Operating System (ROS)](http://wiki.ros.org) (middleware for robotics),
41+
- [Move Base Flex (MBF)](http://wiki.ros.org/move_base_flex) (Move base flex node)
42+
43+
44+
#### Building
45+
46+
To build from source, clone the latest version from this repository into your workspace and compile the package using
47+
48+
cd catkin_workspace/src
49+
git clone https://bitbucket.org/nobleo/full_coverage_path_planner.git
50+
cd ../
51+
catkin_make
52+
53+
### Unit Tests
54+
55+
All tests can be run using:
56+
57+
catkin build tracking_pid --catkin-make-args run_tests
58+
59+
#### test_common
60+
Unit test that checks the basic functions used by the repository
61+
62+
#### test_spiral_stc
63+
Unit test that checks the basis spiral algorithm for full coverage. The test is performed for different situations to check that the algorithm coverage the accessible map cells. A test is also performed in randomly generated maps.
64+
65+
#### test_full_coverage_path_planner.test
66+
ROS system test that checks the full coverage path planner together with a tracking pid. A simulation is run such that a robot moves to fully cover the accessible cells in a given map.
67+
68+
69+
## Usage
70+
71+
Run a full navigation example using:
72+
73+
roslaunch full_coverage_path_planner test_full_coverage_path_planner.launch
74+
75+
Give a 2D-goal in rviz to start path planning algorithm
76+
77+
Depends on:
78+
79+
[mobile_robot_simulator](https://github.com/mrath/mobile_robot_simulator.git) that integrates /cmd_vel into a /base_link TF-frame and an odometry publisher
80+
81+
[tracking_pid](https://bitbucket.org/nobleo/tracking_pid/) Global path tracking controller
82+
83+
84+
## Launch files
85+
86+
### test/full_coverage_path_planner/test_full_coverage_path_planner.launch
87+
88+
Runs the full_coverage_path_planner global planner in combination with tracking PID local planner.
89+
Moreover a coverage progress tracking node is launched to monitor the coverage progress.
90+
Mobile_robot_simulator is used to integrate cmd_vel output into TF and odometry.
91+
92+
Arguments:
93+
94+
* **`navigation`**: move_base_flex. Default: `move_base_flex`
95+
* **`tracking_pid_mode`**: node / plugin. Default: `node`
96+
* **`map`**: path to a global costmap. Default: `$(find full_coverage_path_planner)/maps/basement.yaml)`
97+
* **`target_x_vel`**: target x velocity for use in interpolator. Default: `0.2`
98+
* **`target_yaw_vel`**: target yaw velocity for use in interpolator. Default: `0.2`
99+
* **`robot_radius`**: radius of the robot for use in the global planner. Default: `0.6`
100+
* **`tool_radius`**: radius of the tool for use in the global planner. Default: `0.2`
101+
102+
103+
Start planning and tracking by giving a 2D nav goal.
104+
105+
106+
## Nodes
107+
108+
### coverage_progress
109+
The CoverageProgressNode keeps track of coverage progress. It does this by periodically looking up the position of the coverage disk in an occupancy grid. Cells within a radius from this position are 'covered'
110+
111+
#### Subscribed Topics
112+
113+
* **`/tf`** ([tf2_msgs/TFMessage])
114+
ros tf dynamic transformations
115+
* **`/tf_static`** ([tf2_msgs/TFMessage])
116+
ros tf static transformations
117+
#### Published Topics
118+
119+
* **`/coverage_grid`** ([nav_msgs/OccupancyGrid])
120+
occupancy grid to visualize coverage progress
121+
* **`/coverage_progress`** ([std_msgs/Float32])
122+
monitors coverage (from 0 none to 1 full) on the given area
123+
124+
#### Services
125+
126+
* **`/coverage_progress/reset`** ([std_srvs/SetBool])
127+
resets coverage_progress node. For instance when robot position needs to be manually updated
128+
129+
130+
#### Parameters
131+
132+
* **`target_area/x`**: size in x of the target area to monitor
133+
* **`target_area/y`**: size in y of the target area to monitor
134+
* **`coverage_radius`**: radius of the tool to compute coverage progress
135+
136+
137+
## Plugins
138+
### full_coverage_path_planner/SpiralSTC
139+
For use in move_base(\_flex) as "base_global_planner"="full_coverage_path_planner/SpiralSTC". It uses global_cost_map and global_costmap/robot_radius.
140+
141+
#### Parameters
142+
143+
* **`robot_radius`**: robot radius, which is used by the CPP algorithm to check for collisions with static map
144+
* **`tool_radius`**: tool radius, which is used by the CPP algorithm to discretize the space and find a full coverage plan
145+
146+
147+
## References
148+
149+
[1] GONZALEZ, Enrique, et al. BSA: A complete coverage algorithm. In: Proceedings of the 2005 IEEE International Conference on Robotics and Automation. IEEE, 2005. p. 2040-2044.
150+
151+
## Bugs & Feature Requests
152+
153+
Please report bugs and request features using the [Issue Tracker](https://bitbucket.org/nobleo/full_coverage_path_planner/src/develop/).
154+
155+
156+
[ROS]: http://www.ros.org
157+
[rviz]: http://wiki.ros.org/rviz
158+
[MBF]: http://wiki.ros.org/move_base_flex

bitbucket-pipelines.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
image: docker:18-git
2+
3+
pipelines:
4+
default:
5+
- step:
6+
services:
7+
- docker
8+
script:
9+
- apk add --update bash coreutils tar
10+
- git clone --quiet --depth 1 https://github.com/ros-industrial/industrial_ci .industrial_ci -b master
11+
- .industrial_ci/bitbucket.sh ROS_DISTRO=melodic UPSTREAM_WORKSPACE='github:nobleo/mobile_robot_simulator#fix/install github:nobleo/tracking_pid#master'
12+
13+
definitions:
14+
services:
15+
docker:
16+
memory: 2048

doc/bsa.png

63.1 KB
Loading
23.3 KB
Loading
15.6 KB
Loading

0 commit comments

Comments
 (0)