2015-05-21 12:11:47 -04:00
<launch>
<!--
2015-05-25 10:46:52 -04:00
Bringup Turtlebot:
2015-05-21 12:11:47 -04:00
$ roslaunch turtlebot_bringup minimal.launch
2015-05-25 10:46:52 -04:00
Mapping:
2015-05-21 12:22:51 -04:00
$ roslaunch rtabmap_ros demo_turtlebot_mapping.launch
2015-05-21 12:11:47 -04:00
Visualization:
2015-05-21 12:22:51 -04:00
$ roslaunch rtabmap_ros demo_turtlebot_rviz.launch
2015-05-21 12:11:47 -04:00
2015-05-25 10:46:52 -04:00
This launch file is a one to one replacement of the gmapping_demo.launch in the
"SLAM Map Building with TurtleBot" tutorial:
2015-05-21 12:11:47 -04:00
http://wiki.ros.org/turtlebot_navigation/Tutorials/indigo/Build%20a%20map%20with%20SLAM
2015-05-25 10:46:52 -04:00
For localization-only after a mapping session, add argument "localization:=true" to
demo_turtlebot_mapping.launch line above. Move the robot around until it can relocalize in
the previous map, then the 2D map should re-appear again. You can then follow the same steps
from 3.3.2 of the "Autonomous Navigation of a Known Map with TurtleBot" tutorial:
http://wiki.ros.org/turtlebot_navigation/Tutorials/Autonomously%20navigate%20in%20a%20known%20map
2015-05-21 12:11:47 -04:00
-->
2015-05-26 14:35:51 -04:00
<arg name= "database_path" default= "rtabmap.db" />
2015-05-25 10:46:52 -04:00
<arg name= "localization" default= "false" />
<arg name= "rgbd_odometry" default= "false" />
<arg name= "args" default= "" />
2015-06-03 11:41:59 -04:00
<arg name= "version083" default= "false" />
2015-05-21 12:11:47 -04:00
<!-- Navigation stuff (move_base) -->
<include file= "$(find turtlebot_bringup)/launch/3dsensor.launch" />
<include file= "$(find turtlebot_navigation)/launch/includes/move_base.launch.xml" />
<!-- Mapping -->
<group ns= "rtabmap" >
2015-05-25 10:46:52 -04:00
<node name= "rtabmap" pkg= "rtabmap_ros" type= "rtabmap" output= "screen" args= "$(arg args)" >
2015-05-25 13:54:56 -04:00
<param name= "database_path" type= "string" value= "$(arg database_path)" />
2015-05-25 10:46:52 -04:00
<param name= "frame_id" type= "string" value= "base_footprint" />
<param name= "odom_frame_id" type= "string" value= "odom" />
<param name= "wait_for_transform" type= "bool" value= "true" />
<param name= "subscribe_depth" type= "bool" value= "true" />
<param name= "subscribe_laserScan" type= "bool" value= "true" />
2015-05-21 12:11:47 -04:00
<!-- inputs -->
<remap from= "scan" to= "/scan" />
2015-05-25 10:46:52 -04:00
<remap from= "rgb/image" to= "/camera/rgb/image_rect_color" />
<remap from= "depth/image" to= "/camera/depth_registered/image_raw" />
2015-05-21 12:11:47 -04:00
<remap from= "rgb/camera_info" to= "/camera/rgb/camera_info" />
<!-- output -->
2015-06-03 11:41:59 -04:00
<remap unless= "$(arg version083)" from= "grid_map" to= "/map" />
<!-- <remap unless="$(arg version083)" from="proj_map" to="/map"/> -->
2015-05-21 12:11:47 -04:00
<!-- RTAB-Map's parameters: do "rosrun rtabmap rtabmap (double-dash)params" to see the list of available parameters. -->
<param name= "RGBD/LocalLoopDetectionSpace" type= "string" value= "true" /> <!-- Local loop closure detection (using estimated position) with locations in WM -->
2015-05-25 10:46:52 -04:00
<param name= "RGBD/OptimizeFromGraphEnd" type= "string" value= "false" /> <!-- Set to false to generate map correction between /map and /odom -->
<param name= "Kp/MaxDepth" type= "string" value= "4.0" />
<param name= "LccIcp/Type" type= "string" value= "2" /> <!-- Loop closure transformation refining with ICP: 0=No ICP, 1=ICP 3D, 2=ICP 2D -->
<param name= "LccIcp2/CorrespondenceRatio" type= "string" value= "0.05" />
<param name= "LccBow/MinInliers" type= "string" value= "5" /> <!-- 3D visual words minimum inliers to accept loop closure -->
<param name= "LccBow/InlierDistance" type= "string" value= "0.1" /> <!-- 3D visual words correspondence distance -->
<param name= "RGBD/AngularUpdate" type= "string" value= "0.1" /> <!-- Update map only if the robot is moving -->
<param name= "RGBD/LinearUpdate" type= "string" value= "0.1" /> <!-- Update map only if the robot is moving -->
<param name= "Rtabmap/TimeThr" type= "string" value= "700" />
<param name= "Mem/RehearsalSimilarity" type= "string" value= "0.30" />
<!-- localization mode -->
<param if= "$(arg localization)" name= "Mem/IncrementalMemory" type= "string" value= "false" />
<param unless= "$(arg localization)" name= "Mem/IncrementalMemory" type= "string" value= "true" />
<param name= "Mem/InitWMWithAllNodes" type= "string" value= "$(arg localization)" />
2015-05-21 12:11:47 -04:00
</node>
2015-06-03 11:41:59 -04:00
2015-05-21 12:11:47 -04:00
<!-- Odometry : ONLY for testing without the actual robot! /odom TF should not be already published. -->
<node if= "$(arg rgbd_odometry)" pkg= "rtabmap_ros" type= "rgbd_odometry" name= "rgbd_odometry" output= "screen" >
2015-05-25 10:46:52 -04:00
<param name= "frame_id" type= "string" value= "base_footprint" />
<param name= "wait_for_transform" type= "bool" value= "true" />
<param name= "Odom/Force2D" type= "string" value= "true" />
2015-05-21 12:11:47 -04:00
<remap from= "rgb/image" to= "/camera/rgb/image_rect_color" />
<remap from= "depth/image" to= "/camera/depth_registered/image_raw" />
<remap from= "rgb/camera_info" to= "/camera/rgb/camera_info" />
</node>
2015-06-03 11:41:59 -04:00
<!-- backward compatibility with hydro 0.8.3 only -->
<node if= "$(arg version083)" pkg= "rtabmap_ros" type= "grid_map_assembler" name= "grid_map_assembler" >
<remap from= "grid_map" to= "/map" />
</node>
2015-05-21 12:11:47 -04:00
</group>
</launch>