2014-10-13 19:14:30 +00:00
<launch>
<!-- RGB-D LOCALIZATION VERSION -->
2014-12-14 16:44:13 -05:00
<!-- ODOMETRY MAIN ARGUMENTS:
-"strategy" : Strategy: 0=BOW (bag-of-words) 1=Optical Flow
-"feature" : Feature type: 0=SURF 1=SIFT 2=ORB 3=FAST/FREAK 4=FAST/BRIEF 5=GFTT/FREAK 6=GFTT/BRIEF 7=BRISK
-"nn" : Nearest neighbor strategy : 0=Linear, 1=FLANN_KDTREE, 2=FLANN_LSH, 3=BRUTEFORCE
Set to 1 for float descriptor like SIFT/SURF
Set to 3 for binary descriptor like ORB/FREAK/BRIEF/BRISK
-"max_depth" : Maximum features depth (m)
-"min_inliers" : Minimum visual correspondences to accept a transformation (m)
-"inlier_distance" : RANSAC maximum inliers distance (m)
-"local_map" : Local map size: number of unique features to keep track
2014-10-13 19:14:30 +00:00
-->
<arg name= "strategy" default= "0" />
<arg name= "feature" default= "6" />
<arg name= "nn" default= "3" />
2014-12-14 16:44:13 -05:00
<arg name= "max_depth" default= "4.0" />
<arg name= "min_inliers" default= "20" />
<arg name= "inlier_distance" default= "0.02" />
2014-10-13 19:14:30 +00:00
<arg name= "local_map" default= "1000" />
<!-- TF FRAMES -->
<node pkg= "tf" type= "static_transform_publisher" name= "base_to_camera_tf"
args= "0.0 0.0 0.0 0.0 0.0 0.0 /base_link /camera_link 100" />
<group ns= "rtabmap" >
<!-- Odometry -->
2014-11-25 17:43:26 -05:00
<node pkg= "rtabmap_ros" type= "rgbd_odometry" name= "visual_odometry" output= "screen" >
2014-10-13 19:14:30 +00: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/depth_registered/camera_info" />
<param name= "frame_id" type= "string" value= "base_link" />
<param name= "Odom/Strategy" type= "string" value= "$(arg strategy)" />
2014-12-14 16:44:13 -05:00
<param name= "Odom/FeatureType" type= "string" value= "$(arg feature)" />
<param name= "OdomBow/NNType" type= "string" value= "$(arg nn)" />
<param name= "Odom/MaxDepth" type= "string" value= "$(arg max_depth)" />
<param name= "Odom/MinInliers" type= "string" value= "$(arg min_inliers)" />
<param name= "Odom/InlierDistance" type= "string" value= "$(arg inlier_distance)" />
<param name= "OdomBow/LocalHistorySize" type= "string" value= "$(arg local_map)" />
2014-10-13 19:14:30 +00:00
</node>
<!-- Visual SLAM (robot side) -->
<!-- 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= "" >
2014-10-13 19:14:30 +00:00
<param name= "subscribe_depth" type= "bool" value= "true" />
<param name= "subscribe_laserScan" type= "bool" value= "false" />
<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/depth_registered/camera_info" />
<remap from= "odom" to= "odom" />
<param name= "queue_size" type= "int" value= "30" />
<!-- RTAB-Map's parameters: do "rosrun rtabmap rtabmap (double-dash)params" to see the list of available parameters. -->
<param name= "Rtabmap/DatabasePath" type= "string" value= "~/.ros/rtabmap.db" /> <!-- Database used for localization -->
<param name= "Rtabmap/DetectionRate" type= "string" value= "1" /> <!-- Don't need to do relocation very often! Though better results if the same rate as when mapping. -->
<param name= "Mem/STMSize" type= "string" value= "1" /> <!-- 1 location in short-term memory -->
<param name= "Mem/IncrementalMemory" type= "string" value= "false" /> <!-- false = Localization mode-->
<param name= "LccBow/MinInliers" type= "string" value= "10" /> <!-- Minimum inliers to accept a loop closure -->
<param name= "RGBD/OptimizeFromGraphEnd" type= "string" value= "false" />
</node>
</group>
2014-11-25 17:43:26 -05:00
<node pkg= "rviz" type= "rviz" name= "rviz" args= "-d $(find rtabmap_ros)/launch/config/rgbd.rviz" />
2014-10-13 19:14:30 +00:00
<!-- sync cloud with odometry and voxelize the point cloud (for fast visualization in rviz) -->
<node pkg= "nodelet" type= "nodelet" name= "standalone_nodelet" args= "manager" output= "screen" />
2014-12-14 16:44:13 -05:00
<node pkg= "nodelet" type= "nodelet" name= "data_odom_sync" args= "load rtabmap_ros/data_odom_sync standalone_nodelet" >
2014-10-13 19:14:30 +00:00
<remap from= "rgb/image_in" to= "camera/rgb/image_rect_color" />
<remap from= "depth/image_in" to= "camera/depth_registered/image_raw" />
<remap from= "rgb/camera_info_in" to= "camera/depth_registered/camera_info" />
<remap from= "odom_in" to= "rtabmap/odom" />
<remap from= "rgb/image_out" to= "data_odom_sync/image" />
<remap from= "depth/image_out" to= "data_odom_sync/depth" />
<remap from= "rgb/camera_info_out" to= "data_odom_sync/camera_info" />
<remap from= "odom_out" to= "odom_sync" />
<param name= "queue_size" type= "int" value= "30" />
</node>
2014-12-14 16:44:13 -05:00
<node pkg= "nodelet" type= "nodelet" name= "points_xyzrgb" args= "load rtabmap_ros/point_cloud_xyzrgb standalone_nodelet" >
2014-10-13 19:14:30 +00:00
<remap from= "rgb/image" to= "data_odom_sync/image" />
<remap from= "depth/image" to= "data_odom_sync/depth" />
<remap from= "rgb/camera_info" to= "data_odom_sync/camera_info" />
<remap from= "cloud" to= "voxel_cloud" />
<param name= "queue_size" type= "int" value= "10" />
<param name= "voxel_size" type= "double" value= "0.01" />
</node>
</launch>