Skip to content

Commit 090f59b

Browse files
Merge pull request #3 from nobleo/feature/update_for_tutorial
Feature/update for tutorial
2 parents 18268b3 + c332910 commit 090f59b

File tree

10 files changed

+163
-224
lines changed

10 files changed

+163
-224
lines changed

README.md

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Full Coverage Path Planner (fcpp)
1+
# Full Coverage Path Planner (FCPP)
22

33
## Overview
44

5-
This package provides an implementation of a Full Coverage Path Planner (fcpp) using the Backtracking Spiral Algorithm (BSA), see [1].
5+
This package provides an implementation of a Full Coverage Path Planner (FCPP) using the Backtracking Spiral Algorithm (BSA), see [1].
66

77
This packages acts as a global planner plugin to the Move Base Flex package (http://wiki.ros.org/move_base_flex).
88

@@ -52,7 +52,7 @@ To build from source, clone the latest version from this repository into your wo
5252

5353
All tests can be run using:
5454

55-
catkin build tracking_pid --catkin-make-args run_tests
55+
catkin build full_coverage_path_planner --catkin-make-args run_tests
5656

5757
#### test_common
5858
Unit test that checks the basic functions used by the repository
@@ -89,8 +89,6 @@ Mobile_robot_simulator is used to integrate cmd_vel output into TF and odometry.
8989

9090
Arguments:
9191

92-
* **`navigation`**: move_base_flex. Default: `move_base_flex`
93-
* **`tracking_pid_mode`**: node / plugin. Default: `node`
9492
* **`map`**: path to a global costmap. Default: `$(find full_coverage_path_planner)/maps/basement.yaml)`
9593
* **`target_x_vel`**: target x velocity for use in interpolator. Default: `0.2`
9694
* **`target_yaw_vel`**: target yaw velocity for use in interpolator. Default: `0.2`
@@ -154,3 +152,24 @@ Please report bugs and request features using the [Issue Tracker](https://github
154152
[ROS]: http://www.ros.org
155153
[rviz]: http://wiki.ros.org/rviz
156154
[MBF]: http://wiki.ros.org/move_base_flex
155+
156+
## Acknowledgments
157+
158+
<!--
159+
ROSIN acknowledgement from the ROSIN press kit
160+
@ https://github.com/rosin-project/press_kit
161+
-->
162+
163+
<a href="http://rosin-project.eu">
164+
<img src="http://rosin-project.eu/wp-content/uploads/rosin_ack_logo_wide.png"
165+
alt="rosin_logo" height="60" >
166+
</a>
167+
168+
Supported by ROSIN - ROS-Industrial Quality-Assured Robot Software Components.
169+
More information: <a href="http://rosin-project.eu">rosin-project.eu</a>
170+
171+
<img src="http://rosin-project.eu/wp-content/uploads/rosin_eu_flag.jpg"
172+
alt="eu_flag" height="45" align="left" >
173+
174+
This project has received funding from the European Union’s Horizon 2020
175+
research and innovation programme under grant agreement no. 732287.

examples/move_base.launch

Lines changed: 0 additions & 42 deletions
This file was deleted.

examples/turtlebot_in_stage.launch

Lines changed: 0 additions & 93 deletions
This file was deleted.

maps/grid.png

1 Byte
Loading

maps/grid.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
image: grid.png
22
resolution: 0.05
3-
origin: [-2.5, -2.5, 0.0]
3+
origin: [-5, -5, 0.0]
44
negate: 0
55
occupied_thresh: 0.65
66
free_thresh: 0.196

test/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Test for Full coverage path planner
33

44
The full coverage path planner consists of several parts that are each tested separately.
55

6-
The move_base plugin consists of several parts, each unit-tested separately:
6+
The move_base_flex plugin consists of several parts, each unit-tested separately:
77
- test_common: tests common.h
88
- test_spiral_stc: tests static functions of spiral_stc.h
99

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
11
planners:
22
- name: 'SpiralSTC'
33
type: 'full_coverage_path_planner/SpiralSTC'
4-
planner:
5-
allow_unknown: true
6-
default_tolerance: 0.0
7-
visualize_potential: true
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
<?xml version="1.0"?>
2+
3+
<launch>
4+
<arg name="map" default="$(find full_coverage_path_planner)/maps/grid.yaml"/>
5+
<arg name="coverage_area_offset" default="-2.5 -2.5 0 0 0 0"/>
6+
<arg name="coverage_area_size_x" default="10"/>
7+
<arg name="coverage_area_size_y" default="10"/>
8+
<arg name="target_x_vel" default="0.5"/>
9+
<arg name="target_yaw_vel" default="0.4"/>
10+
<arg name="robot_radius" default="0.3"/>
11+
<arg name="tool_radius" default="0.3"/>
12+
<arg name="rviz" default="true"/>
13+
14+
<!--Move base flex, using the full_coverage_path_planner-->
15+
<node pkg="mbf_costmap_nav" type="mbf_costmap_nav" respawn="false" name="move_base_flex" output="screen" required="true">
16+
<param name="tf_timeout" value="1.5"/>
17+
<rosparam file="$(find full_coverage_path_planner)/test/full_coverage_path_planner/param/planners.yaml" command="load" />
18+
<rosparam file="$(find full_coverage_path_planner)/test/full_coverage_path_planner/param/local_costmap_params.yaml" command="load" />
19+
<param name="SpiralSTC/robot_radius" value="$(arg robot_radius)"/>
20+
<param name="SpiralSTC/tool_radius" value="$(arg tool_radius)"/>
21+
<param name="global_costmap/robot_radius" value="$(arg robot_radius)"/>
22+
<remap from="odom" to="/odom"/>
23+
<remap from="scan" to="/scan"/>
24+
25+
<remap from="/move_base_flex/SpiralSTC/plan" to="/move_base/SpiralSTC/plan"/>
26+
<remap from="/move_base_flex/tracking_pid/interpolator" to="/move_base/TrackingPidLocalPlanner/interpolator"/>
27+
</node>
28+
<!-- Move Base backwards compatibility -->
29+
<node pkg="mbf_costmap_nav" type="move_base_legacy_relay.py" name="move_base"/>
30+
31+
<!-- Mobile robot simulator -->
32+
<node pkg="mobile_robot_simulator" type="mobile_robot_simulator_node" name="mobile_robot_simulator" output="screen">
33+
<param name="publish_map_transform" value="true"/>
34+
<param name="publish_rate" value="10.0"/>
35+
<param name="velocity_topic" value="/move_base/cmd_vel"/>
36+
<param name="odometry_topic" value="/odom"/>
37+
</node>
38+
39+
<!--We need a map to fully cover-->
40+
<node name="grid_server" pkg="map_server" type="map_server" args="$(arg map)">
41+
<param name="frame_id" value="/map"/>
42+
</node>
43+
44+
<!--Tracking_pid cannot just accept a nav_msgs/Path, it can only go to a PoseStamped,
45+
so the path_interpolator drags a PoseStamped over a Path at a given speed-->
46+
<node name="interpolator" pkg="tracking_pid" type="path_interpolator">
47+
<param name="target_x_vel" value="$(arg target_x_vel)"/>
48+
<param name="target_yaw_vel" value="$(arg target_yaw_vel)"/>
49+
<remap from="path" to="/move_base/SpiralSTC/plan"/>
50+
</node>
51+
52+
<!--Tracking_pid tries to get the robot as close to it's goal point as possible-->
53+
<node name="controller" pkg="tracking_pid" type="controller" output="screen">
54+
<remap from="move_base/cmd_vel" to="/move_base/cmd_vel"/>
55+
<remap from="local_trajectory" to="trajectory"/>
56+
<param name="controller_debug_enabled" value="True"/>
57+
<param name="track_base_link" value="true"/>
58+
<param name="l" value="0.5"/>
59+
<param name="Ki_long" value="0.0"/>
60+
<param name="Kp_long" value="2.0"/>
61+
<param name="Kd_long" value="0.5"/>
62+
<param name="Ki_lat" value="0.0"/>
63+
<param name="Kp_lat" value="4.0"/>
64+
<param name="Kd_lat" value="0.3"/>
65+
</node>
66+
67+
<!-- Launch coverage progress tracking -->
68+
<node pkg="tf" type="static_transform_publisher" name="map_to_coveragemap" args="$(arg coverage_area_offset) map coverage_map 100" />
69+
<node pkg="full_coverage_path_planner" type="coverage_progress" name="coverage_progress">
70+
<param name="~target_area/x" value="$(arg coverage_area_size_x)" />
71+
<param name="~target_area/y" value="$(arg coverage_area_size_y)" />
72+
<param name="~coverage_radius" value="$(arg tool_radius)" />
73+
<remap from="reset" to="coverage_progress/reset" />
74+
<param name="~map_frame" value="/coverage_map"/>
75+
</node>
76+
77+
<!-- Trigger planner by publishing a move_base goal -->
78+
<node name="publish_simple_goal" pkg="rostopic" type="rostopic" launch-prefix="bash -c 'sleep 1.0; $0 $@' "
79+
args="pub --latch /move_base/goal move_base_msgs/MoveBaseActionGoal --file=$(find full_coverage_path_planner)/test/simple_goal.yaml"/>
80+
81+
<!-- rviz -->
82+
<node if="$(eval rviz)" name="rviz" pkg="rviz" type="rviz" args="-d $(find full_coverage_path_planner)/test/full_coverage_path_planner/fcpp.rviz" />
83+
</launch>
Lines changed: 13 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,85 +1,20 @@
11
<?xml version="1.0"?>
22

33
<launch>
4-
<arg name="map" default="$(find full_coverage_path_planner)/maps/basement.yaml"/>
5-
<arg name="target_x_vel" default="0.5"/>
6-
<arg name="target_yaw_vel" default="0.4"/>
7-
<arg name="robot_radius" default="0.5"/>
8-
<arg name="tool_radius" default="0.5"/>
9-
<arg name="launch_rviz" default="false"/>
10-
11-
<!--Move base flex, using the full_coverage_path_planner-->
12-
<node pkg="mbf_costmap_nav" type="mbf_costmap_nav" respawn="false" name="move_base_flex" output="screen" required="true">
13-
<param name="tf_timeout" value="1.5"/>
14-
<param name="planner_max_retries" value="3"/>
15-
<rosparam file="$(find full_coverage_path_planner)/test/full_coverage_path_planner/param/planners.yaml" command="load" />
16-
<rosparam file="$(find full_coverage_path_planner)/test/full_coverage_path_planner/param/local_costmap_params.yaml" command="load" />
17-
18-
<param name="SpiralSTC/robot_radius" value="$(arg robot_radius)"/>
19-
<param name="SpiralSTC/tool_radius" value="$(arg tool_radius)"/>
20-
<param name="global_costmap/robot_radius" value="$(arg robot_radius)"/>
21-
<remap from="odom" to="/odom"/>
22-
<remap from="scan" to="/scan"/>
23-
24-
<remap from="/move_base_flex/SpiralSTC/plan" to="/move_base/SpiralSTC/plan"/>
25-
<remap from="/move_base_flex/tracking_pid/interpolator" to="/move_base/TrackingPidLocalPlanner/interpolator"/>
26-
</node>
27-
<!-- Move Base backwards compatibility -->
28-
<node pkg="mbf_costmap_nav" type="move_base_legacy_relay.py" name="move_base"/>
29-
30-
<!--Rather than running Gazebo to simulate a robot, just use cmd_vel to calculate odom and TF-->
31-
<node pkg="mobile_robot_simulator" type="mobile_robot_simulator_node" name="mobile_robot_simulator" output="screen">
32-
<param name="publish_map_transform" value="true"/>
33-
<param name="publish_rate" value="10.0"/>
34-
<param name="velocity_topic" value="/move_base/cmd_vel"/>
35-
<param name="odometry_topic" value="/odom"/>
36-
</node>
37-
38-
<!--We need a map to fully cover-->
39-
<node name="grid_server" pkg="map_server" type="map_server" args="$(arg map)">
40-
<param name="frame_id" value="/map"/>
41-
</node>
42-
43-
<!--Tracking_pid cannot just accept a nav_msgs/Path, it can only go to a PoseStamped,
44-
so the path_interpolator drags a PoseStamped over a Path at a given speed-->
45-
<node name="interpolator" pkg="tracking_pid" type="path_interpolator">
46-
<param name="target_x_vel" value="$(arg target_x_vel)"/>
47-
<param name="target_yaw_vel" value="$(arg target_yaw_vel)"/>
48-
<remap from="path" to="/move_base/SpiralSTC/plan"/>
49-
</node>
50-
51-
<!--Tracking_pid tries to get the robot as close to it's goal point as possible-->
52-
<node name="controller" pkg="tracking_pid" type="controller" output="screen">
53-
<remap from="move_base/cmd_vel" to="/move_base/cmd_vel"/>
54-
<remap from="local_trajectory" to="trajectory"/>
55-
<param name="controller_debug_enabled" value="True"/>
56-
<param name="track_base_link" value="true"/>
57-
<param name="l" value="0.5"/>
58-
<param name="Ki_long" value="0.0"/>
59-
<param name="Kp_long" value="2.0"/>
60-
<param name="Kd_long" value="0.5"/>
61-
<param name="Ki_lat" value="0.0"/>
62-
<param name="Kp_lat" value="4.0"/>
63-
<param name="Kd_lat" value="0.3"/>
64-
</node>
65-
66-
<!-- Launch coverage progress tracking -->
67-
<node pkg="tf" type="static_transform_publisher" name="map_to_coveragemap" args="3 -0.25 0 1.57 0 0 map coverage_map 100" />
68-
<node pkg="full_coverage_path_planner" type="coverage_progress" name="coverage_progress">
69-
<param name="~target_area/x" value="3.0" /> <!--20-->
70-
<param name="~target_area/y" value="5" /> <!--30-->
71-
<param name="~coverage_radius" value="$(arg tool_radius)" />
72-
<remap from="reset" to="coverage_progress/reset" />
73-
<param name="~map_frame" value="/coverage_map"/>
74-
</node>
75-
76-
<!--Tracking_pid can be paused and it must be actively unpaused-->
77-
<node name="publish_enable" pkg="rostopic" type="rostopic" args="pub --latch /enable_control std_msgs/Bool 'data: true'"/>
78-
79-
<node name="publish_simple_goal" pkg="rostopic" type="rostopic" launch-prefix="bash -c 'sleep 1.0; $0 $@' "
80-
args="pub --latch /move_base/goal move_base_msgs/MoveBaseActionGoal --file=$(find full_coverage_path_planner)/test/simple_goal.yaml"/>
4+
<arg name="rviz" default="false"/>
5+
6+
<include file="$(find full_coverage_path_planner)/test/full_coverage_path_planner/test_full_coverage_path_planner.launch" >
7+
<arg name="map" value="$(find full_coverage_path_planner)/maps/basement.yaml"/>
8+
<arg name="coverage_area_offset" value="3 -0.25 0 1.57 0 0"/>
9+
<arg name="coverage_area_size_x" value="3.0"/>
10+
<arg name="coverage_area_size_y" value="5.0"/>
11+
<arg name="target_x_vel" value="0.5"/>
12+
<arg name="target_yaw_vel" value="0.4"/>
13+
<arg name="robot_radius" value="0.5"/>
14+
<arg name="tool_radius" value="0.5"/>
15+
<arg name="rviz" value="$(eval rviz)"/>
16+
</include>
8117

8218
<test test-name="rostest_full_coverage_path_planner_node" pkg="full_coverage_path_planner" type="test_full_coverage_path_planner_system.py" time-limit="300.0" />
8319

84-
<node if="$(eval launch_rviz)" name="rviz" pkg="rviz" type="rviz" args="-d $(find full_coverage_path_planner)/test/full_coverage_path_planner/fcpp.rviz" />
8520
</launch>

0 commit comments

Comments
 (0)