ROS1云课→31欢乐卷假期
案例简述:就是扫地机器人的路径规划复现一下,没了……
能不能复现别人的区域覆盖算法呢???
ROS1云课→30导航仿真演示
导航机器人摇身一变扫地机器人(只有路径规划演示没有吸尘器和拖地模块)。
一步一步做起来?
使用full_coverage_path_planner。
出现:
安装对应功能包。
代码语言:javascript复制echo "-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1
mQINBFzvJpYBEADY8l1YvO7iYW5gUESyzsTGnMvVUmlV3XarBaJz9bGRmgPXh7jc
VFrQhE0L/HV7LOfoLI9H2GWYyHBqN5ERBlcA8XxG3ZvX7t9nAZPQT2Xxe3GT3tro
u5oCR SyHN9xPnUwDuqUSvJ2eqMYb9B/Hph3OmtjG30jSNq9kOF5bBTk1hOTGPH4
K/AY0jzT6OpHfXU6ytlFsI47ZKsnTUhipGsKucQ1CXlyirndZ3V3k70YaooZ55rG
aIoAWlx2H0J7sAHmqS29N9jV9mo135d d TdLBXI0PXtiHzE9IPaX ctdSUrPnp
TwR99lxglpIG6hLuvOMAaxiqFBB/Jf3XJ8OBakfS6nHrWH2WqQxRbiITl0irkQoz
pwNEF2Bv0 Jvs1UFEdVGz5a8xexQHst/RmKrtHLct3iOCvBNqoAQRbvWvBhPjO/p
V5cYeUljZ5wpHyFkaEViClaVWqa6PIsyLqmyjsruPCWlURLsQoQxABcL8bwxX7UT
hM6CtH6tGlYZ85RIzRifIm2oudzV5l 8oRgFr9yVcwyOFT6JCioqkwldW52P1pk/
/SnuexC6LYqqDuHUs5NnokzzpfS6QaWfTY5P5tz4KHJfsjDIktly3mKVfY0fSPVV
okdGpcUzvz2hq1fqjxB6MlB/1vtk0bImfcsoxBmF7H 4E9ZN1sX/tSb0KQARAQAB
tCZPcGVuIFJvYm90aWNzIDxpbmZvQG9zcmZvdW5kYXRpb24ub3JnPokCVAQTAQgA
PgIbAwULCQgHAgYVCgkICwIEFgIDAQIeAQIXgBYhBMHPbjHmut6IaLFytPQu1vur
F8ZUBQJgsdhRBQkLTMW7AAoJEPQu1vurF8ZUTMwP/3f7EkOPIFjUdRmpNJ2db4iB
RQu5b2SJRG KIdbvQBzKUBMV6/RUhEDPjhXZI3zDevzBewvAMKkqs2Q1cWo9WV7Z
PyTkvSyey/Tjn PozcdvzkvrEjDMftIk8E1WzLGq7vnPLZ1q/b6Vq4H373Z EDWa
DaDwW72CbCBLWAVtqff80CwlI2x8fYHKr3VBUnwcXNHR4 nRABfAWnaU4k oTshC
Qucsd8vitNfsSXrKuKyz91IRHRPnJjx8UvGU4tRGfrHkw1505EZvgP02vXeRyWBR
fKiL1vGy4tCSRDdZO3ms2J2m08VPv65HsHaWYMnO rNJmMZj9d9JdL/9GRf5F6U0
quoIFL39BhUEvBynuqlrqistnyOhw8W/IQy/ymNzBMcMz6rcMjMwhkgm/LNXoSD1
1OrJu4ktQwRhwvGVarnB8ihwjsTxZFylaLmFSfaA OAlOqCLS1OkIVMzjW Ul6A6
qjiCEUOsnlf4CGlhzNMZOx3low6ixzEqKOcfECpeIj80a2fBDmWkcAAjlHu6VBhA
TUDG9e2xKLzV2Z/DLYsb3 n9QW7KO0yZKfiuUo6AYboAioQKn5jh3iRvjGh2Ujpo
22G oae3PcCc7G z12j6xIY709FQuA49dA2YpzMda0/OX4LP56STEveDRrO CnV6
WE F5FaIKwb72PL4rLi4
=i0tj
-----END PGP PUBLIC KEY BLOCK-----" >> ~/ros.asc
sudo apt-key add ros.asc
sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu/ `lsb_release -cs` main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt update
sudo apt install ros-kinetic-turtlebot-simulator ros-kinetic-move-base-flex -y
- ros-kinetic-move-base-flex
- ……
编译报错如下:
*** No rule to make target '/usr/lib/x86_64-linux-gnu/libproj.so', needed by '/home/shiyanlou/Code/demo_ws/devel/lib/libfull_coverage_path_planner.so'
安装libproj-dev功能包。
sudo apt install libproj-dev
代码语言:javascript复制$ catkin_make [19:41:02]
Base path: /home/shiyanlou/Code/demo_ws
Source space: /home/shiyanlou/Code/demo_ws/src
Build space: /home/shiyanlou/Code/demo_ws/build
Devel space: /home/shiyanlou/Code/demo_ws/devel
Install space: /home/shiyanlou/Code/demo_ws/install
####
#### Running command: "make cmake_check_build_system" in "/home/shiyanlou/Code/demo_ws/build"
####
####
#### Running command: "make -j4 -l4" in "/home/shiyanlou/Code/demo_ws/build"
####
[ 0%] Built target visualization_msgs_generate_messages_nodejs
[ 0%] Built target visualization_msgs_generate_messages_py
[ 0%] Built target actionlib_generate_messages_py
[ 0%] Built target visualization_msgs_generate_messages_lisp
[ 0%] Built target visualization_msgs_generate_messages_cpp
[ 0%] Built target tf2_msgs_generate_messages_nodejs
[ 0%] Built target tf2_msgs_generate_messages_py
[ 0%] Built target tf2_msgs_generate_messages_cpp
[ 0%] Built target actionlib_msgs_generate_messages_lisp
[ 0%] Built target actionlib_msgs_generate_messages_eus
[ 0%] Built target nav_msgs_generate_messages_nodejs
[ 0%] Built target actionlib_generate_messages_lisp
[ 0%] Built target actionlib_generate_messages_nodejs
[ 0%] Built target actionlib_msgs_generate_messages_cpp
[ 0%] Built target sensor_msgs_generate_messages_eus
[ 0%] Built target tf2_msgs_generate_messages_lisp
[ 0%] Built target nodelet_generate_messages_cpp
[ 0%] Built target map_msgs_generate_messages_py
[ 0%] Built target nav_msgs_generate_messages_cpp
[ 0%] Built target map_msgs_generate_messages_nodejs
[ 0%] Built target map_msgs_generate_messages_lisp
[ 0%] Built target map_msgs_generate_messages_eus
[ 0%] Built target map_msgs_generate_messages_cpp
[ 0%] Built target tf_generate_messages_py
[ 0%] Built target dynamic_reconfigure_generate_messages_nodejs
[ 0%] Built target geometry_msgs_generate_messages_cpp
[ 0%] Built target _catkin_empty_exported_target
[ 0%] Built target std_msgs_generate_messages_nodejs
[ 0%] Built target nav_msgs_generate_messages_py
[ 0%] Built target sensor_msgs_generate_messages_cpp
[ 0%] Built target base_local_planner_generate_messages_lisp
[ 0%] Built target pcl_ros_gencfg
[ 0%] Built target tf2_msgs_generate_messages_eus
[ 0%] Built target nav_msgs_generate_messages_lisp
[ 0%] Built target costmap_2d_generate_messages_cpp
[ 0%] Built target nav_msgs_generate_messages_eus
[ 0%] Built target sensor_msgs_generate_messages_lisp
[ 0%] Built target base_local_planner_generate_messages_eus
[ 0%] Built target costmap_2d_generate_messages_nodejs
[ 0%] Built target topic_tools_generate_messages_nodejs
[ 0%] Built target base_local_planner_generate_messages_py
[ 0%] Built target std_msgs_generate_messages_cpp
[ 0%] Built target sensor_msgs_generate_messages_nodejs
[ 0%] Built target costmap_2d_generate_messages_lisp
[ 0%] Built target costmap_2d_generate_messages_py
[ 0%] Built target dynamic_reconfigure_gencfg
[ 0%] Built target base_local_planner_gencfg
[ 0%] Built target roscpp_generate_messages_nodejs
[ 0%] Built target sensor_msgs_generate_messages_py
[ 0%] Built target geometry_msgs_generate_messages_nodejs
[ 0%] Built target base_local_planner_generate_messages_cpp
[ 0%] Built target geometry_msgs_generate_messages_eus
[ 0%] Built target dynamic_reconfigure_generate_messages_cpp
[ 0%] Built target dynamic_reconfigure_generate_messages_lisp
[ 0%] Built target geometry_msgs_generate_messages_py
[ 0%] Built target geometry_msgs_generate_messages_lisp
[ 0%] Built target bond_generate_messages_py
[ 0%] Built target std_srvs_generate_messages_lisp
[ 0%] Built target std_msgs_generate_messages_lisp
[ 0%] Built target rosgraph_msgs_generate_messages_lisp
[ 0%] Built target costmap_2d_gencfg
[ 0%] Built target actionlib_msgs_generate_messages_nodejs
[ 0%] Built target topic_tools_generate_messages_py
[ 0%] Built target nodelet_generate_messages_py
[ 0%] Built target roscpp_generate_messages_cpp
[ 0%] Built target actionlib_msgs_generate_messages_py
[ 0%] Built target roscpp_generate_messages_eus
[ 0%] Built target roscpp_generate_messages_lisp
[ 0%] Built target bond_generate_messages_eus
[ 0%] Built target std_srvs_generate_messages_py
[ 0%] Built target roscpp_generate_messages_py
[ 0%] Built target tf_generate_messages_nodejs
[ 0%] Built target rosgraph_msgs_generate_messages_cpp
[ 0%] Built target std_msgs_generate_messages_py
[ 0%] Built target pcl_msgs_generate_messages_eus
[ 0%] Built target rosgraph_msgs_generate_messages_eus
[ 0%] Built target rosgraph_msgs_generate_messages_nodejs
[ 0%] Built target actionlib_generate_messages_cpp
[ 0%] Built target rosgraph_msgs_generate_messages_py
[ 0%] Built target costmap_2d_generate_messages_eus
[ 0%] Built target tf_generate_messages_lisp
[ 0%] Built target dynamic_reconfigure_generate_messages_eus
[ 0%] Built target visualization_msgs_generate_messages_eus
[ 0%] Built target pcl_msgs_generate_messages_py
[ 0%] Built target bond_generate_messages_nodejs
[ 0%] Built target nodelet_generate_messages_lisp
[ 0%] Built target bond_generate_messages_cpp
[ 0%] Built target nodelet_generate_messages_nodejs
[ 0%] Built target base_local_planner_generate_messages_nodejs
[ 0%] Built target bond_generate_messages_lisp
[ 0%] Built target nodelet_generate_messages_eus
[ 0%] Built target topic_tools_generate_messages_cpp
[ 0%] Built target topic_tools_generate_messages_eus
[ 0%] Built target pcl_msgs_generate_messages_cpp
[ 0%] Built target nodelet_topic_tools_gencfg
[ 0%] Built target std_srvs_generate_messages_cpp
[ 0%] Built target pcl_msgs_generate_messages_lisp
[ 0%] Built target std_srvs_generate_messages_eus
[ 0%] Built target pcl_msgs_generate_messages_nodejs
[ 0%] Built target std_srvs_generate_messages_nodejs
[ 0%] Built target tf_generate_messages_cpp
[ 0%] Built target std_msgs_generate_messages_eus
[ 0%] Built target tf_generate_messages_eus
[ 0%] Built target topic_tools_generate_messages_lisp
[ 0%] Built target actionlib_generate_messages_eus
[ 0%] Built target dynamic_reconfigure_generate_messages_py
[100%] Built target full_coverage_path_planner
shiyanlou:demo_ws/ $
接着,运行测试一下看看是否可以正常。
roslaunch full_coverage_path_planner test_full_coverage_path_planner.launch
还有一些问题:
processmove_base_flex-2: started with pid 9244 processmove_base-3: started with pid 9249 ERROR: cannot launch node of type mobile_robot_simulator/mobile_robot_simulator_node: mobile_robot_simulator ROS path 0=/opt/ros/kinetic/share/ros ROS path 1=/home/shiyanlou/Code/demo_ws/src ROS path 2=/opt/ros/kinetic/share processgrid_server-5: started with pid 9256 ERROR: cannot launch node of type tracking_pid/path_interpolator: tracking_pid ROS path 0=/opt/ros/kinetic/share/ros ROS path 1=/home/shiyanlou/Code/demo_ws/src ROS path 2=/opt/ros/kinetic/share ERROR: cannot launch node of type tracking_pid/controller: tracking_pid ROS path 0=/opt/ros/kinetic/share/ros ROS path 1=/home/shiyanlou/Code/demo_ws/src ROS path 2=/opt/ros/kinetic/share processmap_to_coveragemap-8: started with pid 9271 processcoverage_progress-9: started with pid 9287 processpublish_simple_goal-10: started with pid 9293 processrviz-11: started with pid 9297
手工编译这两个包^_^
补齐:
代码语言:javascript复制shiyanlou:demo_ws/ $ catkin_make [19:53:16]
Base path: /home/shiyanlou/Code/demo_ws
Source space: /home/shiyanlou/Code/demo_ws/src
Build space: /home/shiyanlou/Code/demo_ws/build
Devel space: /home/shiyanlou/Code/demo_ws/devel
Install space: /home/shiyanlou/Code/demo_ws/install
####
#### Running command: "make cmake_check_build_system" in "/home/shiyanlou/Code/demo_ws/build"
####
####
#### Running command: "make -j4 -l4" in "/home/shiyanlou/Code/demo_ws/build"
####
[ 0%] Built target actionlib_generate_messages_nodejs
[ 0%] Built target tf2_msgs_generate_messages_eus
[ 0%] Built target tf2_msgs_generate_messages_nodejs
[ 0%] Built target tf2_msgs_generate_messages_lisp
[ 0%] Built target geometry_msgs_generate_messages_nodejs
[ 0%] Built target geometry_msgs_generate_messages_lisp
[ 0%] Built target std_msgs_generate_messages_lisp
[ 0%] Built target nav_msgs_generate_messages_eus
[ 0%] Built target std_msgs_generate_messages_eus
[ 0%] Built target geometry_msgs_generate_messages_py
[ 0%] Built target roscpp_generate_messages_lisp
[ 0%] Built target std_msgs_generate_messages_nodejs
[ 0%] Built target nav_msgs_generate_messages_cpp
[ 0%] Built target roscpp_generate_messages_nodejs
[ 0%] Built target rosgraph_msgs_generate_messages_nodejs
[ 0%] Built target geometry_msgs_generate_messages_cpp
[ 0%] Built target rosgraph_msgs_generate_messages_lisp
[ 0%] Built target tf_generate_messages_eus
[ 0%] Built target roscpp_generate_messages_eus
[ 0%] Built target sensor_msgs_generate_messages_nodejs
[ 0%] Built target tf2_msgs_generate_messages_cpp
[ 0%] Built target rosgraph_msgs_generate_messages_cpp
[ 0%] Built target roscpp_generate_messages_cpp
[ 0%] Built target geometry_msgs_generate_messages_eus
[ 0%] Built target rosgraph_msgs_generate_messages_eus
[ 0%] Built target actionlib_msgs_generate_messages_py
[ 0%] Built target tf_generate_messages_cpp
[ 0%] Built target actionlib_generate_messages_eus
[ 0%] Built target nav_msgs_generate_messages_lisp
[ 0%] Built target nav_msgs_generate_messages_nodejs
[ 0%] Built target actionlib_generate_messages_py
[ 0%] Built target std_msgs_generate_messages_py
[ 0%] Built target nav_msgs_generate_messages_py
[ 0%] Built target actionlib_msgs_generate_messages_lisp
[ 0%] Built target actionlib_msgs_generate_messages_nodejs
[ 0%] Built target tf2_msgs_generate_messages_py
[ 0%] Built target rosgraph_msgs_generate_messages_py
[ 0%] Built target tf_generate_messages_lisp
[ 0%] Built target roscpp_generate_messages_py
[ 0%] Built target tf_generate_messages_nodejs
[ 0%] Built target tf_generate_messages_py
[ 0%] Built target sensor_msgs_generate_messages_lisp
[ 0%] Built target sensor_msgs_generate_messages_cpp
[ 0%] Built target actionlib_generate_messages_cpp
[ 0%] Built target sensor_msgs_generate_messages_py
[ 0%] Built target actionlib_msgs_generate_messages_eus
[ 0%] Built target actionlib_generate_messages_lisp
[ 0%] Built target actionlib_msgs_generate_messages_cpp
[ 0%] Built target sensor_msgs_generate_messages_eus
[ 0%] Built target std_msgs_generate_messages_cpp
[ 2%] Built target tracking_pid_gencfg
[ 2%] Built target dynamic_reconfigure_generate_messages_eus
[ 2%] Built target visualization_msgs_generate_messages_nodejs
[ 2%] Built target visualization_msgs_generate_messages_cpp
[ 2%] Built target dynamic_reconfigure_generate_messages_lisp
[ 2%] Built target std_srvs_generate_messages_nodejs
[ 2%] Built target std_srvs_generate_messages_lisp
[ 2%] Built target dynamic_reconfigure_generate_messages_cpp
[ 2%] Built target std_srvs_generate_messages_py
[ 2%] Built target std_srvs_generate_messages_eus
[ 2%] Built target std_srvs_generate_messages_cpp
[ 2%] Built target visualization_msgs_generate_messages_py
[ 2%] Built target dynamic_reconfigure_generate_messages_py
[ 2%] Built target visualization_msgs_generate_messages_lisp
[ 2%] Built target dynamic_reconfigure_gencfg
[ 2%] Built target visualization_msgs_generate_messages_eus
[ 2%] Built target dynamic_reconfigure_generate_messages_nodejs
[ 2%] Built target _catkin_empty_exported_target
[ 2%] Built target _tracking_pid_generate_messages_check_deps_traj_point
[ 2%] Built target _tracking_pid_generate_messages_check_deps_FollowPathGoal
[ 2%] Built target _tracking_pid_generate_messages_check_deps_FollowPathActionFeedback
[ 2%] Built target _tracking_pid_generate_messages_check_deps_PidDebug
[ 2%] Built target _tracking_pid_generate_messages_check_deps_trajectory
[ 2%] Built target _tracking_pid_generate_messages_check_deps_FollowPathActionResult
[ 2%] Built target _tracking_pid_generate_messages_check_deps_FollowPathActionGoal
[ 2%] Built target _tracking_pid_generate_messages_check_deps_FollowPathFeedback
[ 2%] Built target pcl_ros_gencfg
[ 2%] Built target costmap_2d_generate_messages_eus
[ 2%] Built target _tracking_pid_generate_messages_check_deps_FollowPathResult
[ 2%] Built target nodelet_generate_messages_cpp
[ 2%] Built target map_msgs_generate_messages_py
[ 2%] Built target _tracking_pid_generate_messages_check_deps_FollowPathAction
[ 2%] Built target nodelet_generate_messages_lisp
[ 2%] Built target map_msgs_generate_messages_nodejs
[ 2%] Built target pcl_msgs_generate_messages_nodejs
[ 2%] Built target map_msgs_generate_messages_lisp
[ 2%] Built target map_msgs_generate_messages_cpp
[ 2%] Built target map_msgs_generate_messages_eus
[ 2%] Built target costmap_2d_gencfg
[ 2%] Built target pcl_msgs_generate_messages_lisp
[ 2%] Built target base_local_planner_generate_messages_nodejs
[ 2%] Built target costmap_2d_generate_messages_lisp
[ 2%] Built target base_local_planner_generate_messages_cpp
[ 2%] Built target nodelet_generate_messages_eus
[ 2%] Built target costmap_2d_generate_messages_nodejs
[ 2%] Built target nodelet_topic_tools_gencfg
[ 2%] Built target base_local_planner_generate_messages_eus
[ 2%] Built target bond_generate_messages_nodejs
[ 2%] Built target nodelet_generate_messages_nodejs
[ 2%] Built target base_local_planner_generate_messages_py
[ 2%] Built target nodelet_generate_messages_py
[ 2%] Built target base_local_planner_generate_messages_lisp
[ 2%] Built target bond_generate_messages_cpp
[ 2%] Built target topic_tools_generate_messages_cpp
[ 2%] Built target bond_generate_messages_eus
[ 2%] Built target topic_tools_generate_messages_eus
[ 2%] Built target bond_generate_messages_lisp
[ 2%] Built target bond_generate_messages_py
[ 2%] Built target pcl_msgs_generate_messages_cpp
[ 2%] Built target pcl_msgs_generate_messages_eus
[ 2%] Built target base_local_planner_gencfg
[ 2%] Built target topic_tools_generate_messages_lisp
[ 2%] Built target topic_tools_generate_messages_py
[ 2%] Built target pcl_msgs_generate_messages_py
[ 2%] Built target costmap_2d_generate_messages_cpp
[ 2%] Built target costmap_2d_generate_messages_py
[ 2%] Built target topic_tools_generate_messages_nodejs
[ 5%] Built target mobile_robot_simulator
[ 8%] Built target laser_simulator
[ 23%] Built target tracking_pid_generate_messages_py
[ 39%] Built target tracking_pid_generate_messages_eus
[ 53%] Built target tracking_pid_generate_messages_nodejs
[ 67%] Built target tracking_pid_generate_messages_lisp
[ 81%] Built target tracking_pid_generate_messages_cpp
[ 84%] Built target laser_scanner_simulator_node
[ 87%] Built target mobile_robot_simulator_node
[ 92%] Built target full_coverage_path_planner
[ 97%] Built target controller
[ 97%] Built target tracking_pid_generate_messages
[100%] Built target tracking_pid
再次执行如下命令:
roslaunch full_coverage_path_planner test_full_coverage_path_planner.launch
服务型移动机器人如何实现室内路径全覆盖清扫给你一个清爽干净的家_zhangrelay的博客-CSDN博客_android 自定义扫地机器人地图
启动文件
测试/完整覆盖路径规划/测试完整覆盖路径计划
运行full_coverage_path_planner全局规划器并跟踪PID本地规划器。此外,还启动了覆盖进度跟踪节点,以监控覆盖进度。Mobile_robot_simulator用于将cmd_vel输出集成到TF和里程表中。
参数:
map:指向全局costmap的路径。默认值:$(find-full_coverage_path_planner)/maps/base.yaml)
target_xvel:用于插值器的目标x速度。默认值:0.2
targetyawvel:用于插值器的目标偏航速度。默认值:0.2
robot_radius:用于全局规划器的机器人半径。默认值:0.6
tool_radius:用于全局规划器的工具半径。默认值:0.2
通过给出2D导航目标开始规划和跟踪。
节点
覆盖_进度
CoverageProgressNode跟踪覆盖进度。它通过定期查找覆盖磁盘在占用网格中的位置来实现这一点。此位置半径内的单元格被“覆盖”
订阅的主题
/tf(tf2_msgs/TFMessage)ros-tf动态转换
/tf_static(tf2_msgs/TFMessage)ros-tf-static转换
已发布的主题
/coverage_grid(nav_msgs/OccupancyGrid)占用网格以可视化覆盖进度
/coverage_progress(std_msgs/Float32)监视给定区域的覆盖率(从0无到1满)
服务
/coverage_progress/reset(std_srvs/SetBool)重置coverage_progress节点。例如,当机器人位置需要手动更新时
参数
target_area/x:要监视的目标区域的x大小
target_area/y:要监视的目标区域的大小(以y为单位)
coverage_radius:用于计算覆盖进度的工具的半径
插件
完全平均路径规划器/螺旋STC
在move_base(_flex)中用作“base_global_planner”=“full_coverage_path_planner/SpiralSTC”。它使用global_cost_map和global_costmap/robot_radius。
参数
robot_radius:机器人半径,由CPP算法用于检查与静态地图的碰撞
tool_radius:刀具半径,由CPP算法用于离散空间并查找完整覆盖计划
工具书类
1 GONZALEZ、Enrique等。BSA:一种完整的覆盖算法。收录:2005年IEEE机器人与自动化国际会议论文集。IEEE,2005年,第2040-2044页。
launch
代码语言:javascript复制<?xml version="1.0"?>
<launch>
<arg name="map" default="$(find full_coverage_path_planner)/maps/sparse_obstacles.yaml"/>
<arg name="coverage_area_offset" default="-2.5 -2.5 0 0 0 0"/>
<arg name="coverage_area_size_x" default="10"/>
<arg name="coverage_area_size_y" default="10"/>
<arg name="target_x_vel" default="0.5"/>
<arg name="target_yaw_vel" default="0.4"/>
<arg name="robot_radius" default="0.3"/>
<arg name="tool_radius" default="0.3"/>
<arg name="rviz" default="true"/>
<!--Move base flex, using the full_coverage_path_planner-->
<node pkg="mbf_costmap_nav" type="mbf_costmap_nav" respawn="false" name="move_base_flex" output="screen" required="true">
<param name="tf_timeout" value="1.5"/>
<rosparam file="$(find full_coverage_path_planner)/test/full_coverage_path_planner/param/planners.yaml" command="load" />
<rosparam file="$(find full_coverage_path_planner)/test/full_coverage_path_planner/param/local_costmap_params.yaml" command="load" />
<param name="SpiralSTC/robot_radius" value="$(arg robot_radius)"/>
<param name="SpiralSTC/tool_radius" value="$(arg tool_radius)"/>
<param name="global_costmap/robot_radius" value="$(arg robot_radius)"/>
<remap from="odom" to="/odom"/>
<remap from="scan" to="/scan"/>
<remap from="/move_base_flex/SpiralSTC/plan" to="/move_base/SpiralSTC/plan"/>
<remap from="/move_base_flex/tracking_pid/interpolator" to="/move_base/TrackingPidLocalPlanner/interpolator"/>
</node>
<!-- Move Base backwards compatibility -->
<node pkg="mbf_costmap_nav" type="move_base_legacy_relay.py" name="move_base" >
<param name="base_global_planner" value="SpiralSTC" />
</node>
<!-- Mobile robot simulator -->
<node pkg="mobile_robot_simulator" type="mobile_robot_simulator_node" name="mobile_robot_simulator" output="screen">
<param name="publish_map_transform" value="true"/>
<param name="publish_rate" value="10.0"/>
<param name="velocity_topic" value="/move_base/cmd_vel"/>
<param name="odometry_topic" value="/odom"/>
</node>
<!--We need a map to fully cover-->
<node name="grid_server" pkg="map_server" type="map_server" args="$(arg map)">
<param name="frame_id" value="map"/>
</node>
<!--Tracking_pid cannot just accept a nav_msgs/Path, it can only go to a PoseStamped,
so the path_interpolator drags a PoseStamped over a Path at a given speed-->
<node name="interpolator" pkg="tracking_pid" type="path_interpolator">
<param name="target_x_vel" value="$(arg target_x_vel)"/>
<param name="target_yaw_vel" value="$(arg target_yaw_vel)"/>
<remap from="path" to="/move_base/SpiralSTC/plan"/>
</node>
<!--Tracking_pid tries to get the robot as close to it's goal point as possible-->
<node name="controller" pkg="tracking_pid" type="controller" output="screen">
<remap from="move_base/cmd_vel" to="/move_base/cmd_vel"/>
<remap from="local_trajectory" to="trajectory"/>
<param name="controller_debug_enabled" value="True"/>
<param name="track_base_link" value="true"/>
<param name="l" value="0.5"/>
<param name="Ki_long" value="0.0"/>
<param name="Kp_long" value="2.0"/>
<param name="Kd_long" value="0.5"/>
<param name="Ki_lat" value="0.0"/>
<param name="Kp_lat" value="4.0"/>
<param name="Kd_lat" value="0.3"/>
</node>
<!-- Launch coverage progress tracking -->
<node pkg="tf" type="static_transform_publisher" name="map_to_coveragemap" args="$(arg coverage_area_offset) map coverage_map 100" />
<node pkg="full_coverage_path_planner" type="coverage_progress" name="coverage_progress">
<param name="~target_area/x" value="$(arg coverage_area_size_x)" />
<param name="~target_area/y" value="$(arg coverage_area_size_y)" />
<param name="~coverage_radius" value="$(arg tool_radius)" />
<remap from="reset" to="coverage_progress/reset" />
<param name="~map_frame" value="/coverage_map"/>
</node>
<!-- Trigger planner by publishing a move_base goal -->
<node name="publish_simple_goal" pkg="rostopic" type="rostopic" launch-prefix="bash -c 'sleep 1.0; $0 $@' "
args="pub --latch /move_base/goal move_base_msgs/MoveBaseActionGoal --file=$(find full_coverage_path_planner)/test/simple_goal.yaml"/>
<!-- rviz -->
<node if="$(eval rviz)" name="rviz" pkg="rviz" type="rviz" args="-d $(find full_coverage_path_planner)/test/full_coverage_path_planner/fcpp.rviz" />
</launch>