2014-11-13 16:53:56 +00:00
<launch>
2014-11-13 22:32:12 +00:00
<!--
Demo of outdoor stereo mapping.
From bag:
$ rosbag record
/stereo_camera/left/image_raw_throttle/compressed
/stereo_camera/right/image_raw_throttle/compressed
/stereo_camera/left/camera_info_throttle
/stereo_camera/right/camera_info_throttle
/tf
2014-11-13 16:53:56 +00:00
2014-11-13 22:32:12 +00:00
$ roslaunch rtabmap demo_stereo_outdoor.launch
$ rosbag play -.-clock stereo_oudoorA.bag
-->
2015-02-03 11:16:06 -05:00
<!-- Choose visualization -->
<arg name= "rviz" default= "true" />
<arg name= "rtabmapviz" default= "false" />
2014-11-13 22:32:12 +00:00
<param name= "use_sim_time" type= "bool" value= "True" />
<!-- Just to uncompress images for stereo_image_rect -->
<node name= "republish_left" type= "republish" pkg= "image_transport" args= "compressed in:=/stereo_camera/left/image_raw_throttle raw out:=/stereo_camera/left/image_raw_throttle_relay" />
<node name= "republish_right" type= "republish" pkg= "image_transport" args= "compressed in:=/stereo_camera/right/image_raw_throttle raw out:=/stereo_camera/right/image_raw_throttle_relay" />
<!-- Run the ROS package stereo_image_proc for image rectification -->
<group ns= "/stereo_camera" >
<node pkg= "nodelet" type= "nodelet" name= "stereo_nodelet" args= "manager" />
<node pkg= "stereo_image_proc" type= "stereo_image_proc" name= "stereo_image_proc" >
<remap from= "left/image_raw" to= "left/image_raw_throttle_relay" />
<remap from= "left/camera_info" to= "left/camera_info_throttle" />
<remap from= "right/image_raw" to= "right/image_raw_throttle_relay" />
<remap from= "right/camera_info" to= "right/camera_info_throttle" />
<param name= "disparity_range" value= "128" />
</node>
</group>
<!-- Stereo Odometry -->
2014-11-25 17:43:26 -05:00
<node pkg= "rtabmap_ros" type= "stereo_odometry" name= "stereo_odometry" output= "screen" >
2014-11-13 16:53:56 +00:00
<remap from= "left/image_rect" to= "/stereo_camera/left/image_rect" />
<remap from= "right/image_rect" to= "/stereo_camera/right/image_rect" />
<remap from= "left/camera_info" to= "/stereo_camera/left/camera_info_throttle" />
<remap from= "right/camera_info" to= "/stereo_camera/right/camera_info_throttle" />
2014-11-13 22:32:12 +00:00
<remap from= "odom" to= "/odometry" />
2014-11-13 16:53:56 +00:00
<param name= "frame_id" type= "string" value= "base_footprint" />
<param name= "odom_frame_id" type= "string" value= "odom" />
<param name= "Odom/InlierDistance" type= "string" value= "0.1" />
<param name= "Odom/MinInliers" type= "string" value= "10" />
<param name= "Odom/RoiRatios" type= "string" value= "0.03 0.03 0.04 0.04" />
<param name= "Odom/MaxDepth" type= "string" value= "10" />
2014-12-14 16:44:13 -05:00
<param name= "OdomBow/NNDR" type= "string" value= "0.8" />
2014-11-13 16:53:56 +00:00
<param name= "GFTT/MaxCorners" type= "string" value= "500" />
<param name= "GFTT/MinDistance" type= "string" value= "5" />
2015-02-03 11:16:06 -05:00
<param name= "Odom/FillInfoData" type= "string" value= "$(arg rtabmapviz)" />
2014-11-13 22:32:12 +00:00
</node>
<group ns= "rtabmap" >
<!-- Visual SLAM: args: "delete_db_on_start" and "udebug" -->
2014-11-25 17:43:26 -05:00
<node name= "rtabmap" pkg= "rtabmap_ros" type= "rtabmap" output= "screen" args= "--delete_db_on_start" >
2014-11-13 22:32:12 +00:00
<param name= "frame_id" type= "string" value= "base_footprint" />
<param name= "subscribe_stereo" type= "bool" value= "true" />
<param name= "subscribe_depth" type= "bool" value= "false" />
2014-11-13 16:53:56 +00:00
2014-11-13 22:32:12 +00:00
<remap from= "left/image_rect" to= "/stereo_camera/left/image_rect_color" />
<remap from= "right/image_rect" to= "/stereo_camera/right/image_rect" />
<remap from= "left/camera_info" to= "/stereo_camera/left/camera_info_throttle" />
<remap from= "right/camera_info" to= "/stereo_camera/right/camera_info_throttle" />
2014-11-13 16:53:56 +00:00
2014-11-13 22:32:12 +00:00
<remap from= "odom" to= "/odometry" />
2014-11-13 16:53:56 +00:00
2014-11-13 22:32:12 +00:00
<param name= "queue_size" type= "int" value= "30" />
2014-11-13 16:53:56 +00:00
2014-11-13 22:32:12 +00:00
<!-- RTAB-Map's parameters -->
<param name= "Rtabmap/TimeThr" type= "string" value= "700" />
<param name= "Rtabmap/DetectionRate" type= "string" value= "1" />
<param name= "Kp/WordsPerImage" type= "string" value= "200" />
<param name= "Kp/RoiRatios" type= "string" value= "0.03 0.03 0.04 0.04" />
2014-12-01 14:29:42 -05:00
<param name= "Kp/DetectorStrategy" type= "string" value= "0" /> <!-- use SURF -->
<param name= "Kp/NNStrategy" type= "string" value= "1" /> <!-- kdTree -->
2014-11-13 16:53:56 +00:00
2014-11-13 22:32:12 +00:00
<param name= "SURF/HessianThreshold" type= "string" value= "1000" />
2014-11-13 16:53:56 +00:00
2014-11-13 22:32:12 +00:00
<param name= "LccBow/MaxDepth" type= "string" value= "5" />
<param name= "LccBow/MinInliers" type= "string" value= "10" />
2014-11-14 22:13:23 +00:00
<param name= "LccBow/InlierDistance" type= "string" value= "0.02" />
2014-11-13 16:53:56 +00:00
2014-11-13 22:32:12 +00:00
<param name= "LccReextract/Activated" type= "string" value= "true" />
<param name= "LccReextract/MaxWords" type= "string" value= "500" />
<!-- Disable graph optimization because we use map_optimizer node below -->
<param name= "RGBD/ToroIterations" type= "string" value= "0" />
</node>
2014-11-13 16:53:56 +00:00
2014-11-13 22:32:12 +00:00
<!-- Optimizing outside rtabmap node makes it able to optimize always the global map -->
2014-11-25 17:43:26 -05:00
<node pkg= "rtabmap_ros" type= "map_optimizer" name= "map_optimizer" />
2014-11-13 22:32:12 +00:00
2015-02-03 11:16:06 -05:00
<node if= "$(arg rviz)" pkg= "rtabmap_ros" type= "map_assembler" name= "map_assembler" >
2014-11-13 22:32:12 +00:00
<param name= "occupancy_grid" type= "bool" value= "true" />
<remap from= "mapData" to= "mapData_optimized" />
<remap from= "grid_projection_map" to= "/map" />
</node>
2015-02-03 11:16:06 -05:00
<!-- Visualisation RTAB-Map -->
<node if= "$(arg rtabmapviz)" pkg= "rtabmap_ros" type= "rtabmapviz" name= "rtabmapviz" args= "-d $(find rtabmap_ros)/launch/config/rgbd_gui.ini" output= "screen" >
<param name= "subscribe_stereo" type= "bool" value= "true" />
<param name= "subscribe_odom_info" type= "bool" value= "true" />
<param name= "queue_size" type= "int" value= "10" />
<param name= "frame_id" type= "string" value= "base_footprint" />
<remap from= "left/image_rect" to= "/stereo_camera/left/image_rect_color" />
<remap from= "right/image_rect" to= "/stereo_camera/right/image_rect" />
<remap from= "left/camera_info" to= "/stereo_camera/left/camera_info_throttle" />
<remap from= "right/camera_info" to= "/stereo_camera/right/camera_info_throttle" />
<remap from= "odom_info" to= "/odom_info" />
<remap from= "odom" to= "/odometry" />
<remap from= "mapData" to= "mapData_optimized" />
</node>
2014-11-13 22:32:12 +00:00
</group>
2014-11-13 16:53:56 +00:00
2015-02-03 11:16:06 -05:00
<!-- Visualisation RVIZ -->
<node if= "$(arg rviz)" pkg= "rviz" type= "rviz" name= "rviz" args= "-d $(find rtabmap_ros)/launch/config/demo_stereo_outdoor.rviz" />
2014-11-13 22:32:12 +00:00
2014-11-13 16:53:56 +00:00
</launch>