Guest User

rtab_velo_puck

a guest
Mar 9th, 2021
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 7.46 KB | None | 0 0
  1. <launch>
  2.  
  3.     <!--
  4.    Hand-held 3D lidar mapping example using only a Velodyne PUCK (no camera).
  5.    Prerequisities: rtabmap should be built with libpointmatcher
  6.    Example:
  7.     $ roslaunch rtabmap_ros test_velodyne.launch
  8.     $ rosrun rviz rviz -f map
  9.     $ Show TF and /rtabmap/cloud_map topics
  10.    -->
  11.  
  12.     <arg name="rtabmapviz"    default="true"/>
  13.     <arg name="use_imu"       default="false"/> <!-- Assuming IMU fixed to lidar with /velodyne -> /imu_link TF -->
  14.     <arg name="imu_topic"     default="/imu/data"/>
  15.     <arg name="scan_20_hz"    default="false"/> <!-- If we launch the velodyne with "rpm:=1200" argument -->
  16.     <arg name="use_sim_time"  default="true"/>
  17.     <param if="$(arg use_sim_time)" name="use_sim_time" value="true"/>
  18.    
  19.     <arg name="frame_id" default="camera_init"/>
  20.    
  21.     <!-- <include file="$(find velodyne_pointcloud)/launch/VLP16_points.launch">
  22.       <arg     if="$(arg scan_20_hz)" name="rpm" value="1200"/>
  23.       <arg unless="$(arg scan_20_hz)" name="rpm" value="600"/>
  24.    </include> -->
  25.    
  26.     <!-- IMU orientation estimation and publish tf accordingly to os1_sensor frame -->
  27.     <node if="$(arg use_imu)" pkg="rtabmap_ros" type="imu_to_tf" name="imu_to_tf">
  28.       <remap from="imu/data" to="$(arg imu_topic)"/>
  29.       <param name="fixed_frame_id" value="$(arg frame_id)_stabilized"/>
  30.       <param name="base_frame_id" value="$(arg frame_id)"/>
  31.     </node>
  32.  
  33.     <group ns="rtabmap">
  34.       <node pkg="rtabmap_ros" type="icp_odometry" name="icp_odometry" output="screen">
  35.         <remap from="scan_cloud" to="/velodyne_cloud_registered"/>
  36.         <param name="frame_id"        type="string" value="$(arg frame_id)"/>  
  37.         <param name="odom_frame_id"   type="string" value="aft_mapped"/>
  38.         <param     if="$(arg scan_20_hz)" name="expected_update_rate" type="double" value="10"/>
  39.         <param unless="$(arg scan_20_hz)" name="expected_update_rate" type="double" value="10"/>
  40.  
  41.         <remap if="$(arg use_imu)" from="imu" to="$(arg imu_topic)"/>
  42.         <param if="$(arg use_imu)" name="guess_frame_id"   type="string" value="$(arg frame_id)_stabilized"/>
  43.         <param if="$(arg use_imu)" name="wait_imu_to_init" type="bool" value="true"/>
  44.      
  45.         <!-- ICP parameters -->
  46.         <param name="Icp/PointToPlane"        type="string" value="true"/>
  47.         <param name="Icp/Iterations"          type="string" value="30"/>
  48.         <param name="Icp/VoxelSize"           type="string" value="0.2"/>
  49.         <param name="Icp/DownsamplingStep"    type="string" value="1"/>
  50.         <param name="Icp/Epsilon"             type="string" value="0.001"/>
  51.         <param name="Icp/PointToPlaneK"       type="string" value="20"/>
  52.         <param name="Icp/PointToPlaneRadius"  type="string" value="0"/>
  53.         <param name="Icp/MaxTranslation"      type="string" value="2"/>
  54.         <param name="Icp/MaxCorrespondenceDistance" type="string" value="1"/>
  55.         <param name="Icp/PM"                  type="string" value="true"/>
  56.         <param name="Icp/PMOutlierRatio"      type="string" value="0.7"/>
  57.         <param name="Icp/CorrespondenceRatio" type="string" value="0.01"/>  
  58.  
  59.         <!-- Odom parameters -->      
  60.         <param name="Odom/ScanKeyFrameThr"       type="string" value="0.9"/>
  61.         <param name="Odom/Strategy"              type="string" value="0"/>
  62.         <param name="OdomF2M/ScanSubtractRadius" type="string" value="0.2"/>
  63.         <param name="OdomF2M/ScanMaxSize"        type="string" value="15000"/>      
  64.       </node>
  65.  
  66.       <node pkg="rtabmap_ros" type="rtabmap" name="rtabmap" output="screen" args="-d">   
  67.         <param name="frame_id"             type="string" value="$(arg frame_id)"/>  
  68.         <param name="subscribe_depth"      type="bool" value="false"/>
  69.         <param name="subscribe_rgb"        type="bool" value="false"/>
  70.         <param name="subscribe_scan_cloud" type="bool" value="true"/>
  71.         <param name="approx_sync"          type="bool" value="false"/>
  72.        
  73.         <remap from="scan_cloud" to="/velodyne_cloud_registered"/>
  74.      
  75.         <!-- RTAB-Map's parameters -->
  76.         <param name="Rtabmap/DetectionRate"          type="string" value="1"/>  
  77.         <param name="RGBD/NeighborLinkRefining"      type="string" value="false"/>
  78.         <param name="RGBD/ProximityBySpace"          type="string" value="true"/>
  79.         <param name="RGBD/ProximityMaxGraphDepth"    type="string" value="0"/>
  80.         <param name="RGBD/ProximityPathMaxNeighbors" type="string" value="1"/>
  81.         <param name="RGBD/AngularUpdate"             type="string" value="0.05"/>
  82.         <param name="RGBD/LinearUpdate"              type="string" value="0.05"/>
  83.         <param name="Mem/NotLinkedNodesKept"         type="string" value="false"/>
  84.         <param name="Mem/STMSize"                    type="string" value="30"/>
  85.         <!-- param name="Mem/LaserScanVoxelSize"     type="string" value="0.1"/ -->
  86.         <!-- param name="Mem/LaserScanNormalK"       type="string" value="10"/ -->
  87.         <!-- param name="Mem/LaserScanRadius"        type="string" value="0"/ -->
  88.        
  89.         <param name="Reg/Strategy"                   type="string" value="1"/>
  90.         <param name="Grid/CellSize"                  type="string" value="0.1"/>
  91.         <param name="Grid/RangeMax"                  type="string" value="20"/>
  92.         <param name="Grid/ClusterRadius"             type="string" value="1"/>
  93.         <param name="Grid/GroundIsObstacle"          type="string" value="true"/>
  94.  
  95.         <!-- ICP parameters -->
  96.         <!-- <param name="Icp/VoxelSize"                  type="string" value="0.2"/>
  97.        <param name="Icp/PointToPlaneK"              type="string" value="20"/>
  98.        <param name="Icp/PointToPlaneRadius"         type="string" value="0"/>
  99.        <param name="Icp/PointToPlane"               type="string" value="true"/>
  100.        <param name="Icp/Iterations"                 type="string" value="1"/>
  101.        <param name="Icp/Epsilon"                    type="string" value="0.001"/>
  102.        <param name="Icp/MaxTranslation"             type="string" value="3"/>
  103.        <param name="Icp/MaxCorrespondenceDistance"  type="string" value="1"/>
  104.        <param name="Icp/PM"                         type="string" value="true"/>
  105.        <param name="Icp/PMOutlierRatio"             type="string" value="0.7"/>
  106.        <param name="Icp/CorrespondenceRatio"        type="string" value="0.4"/> -->
  107.       </node>
  108.  
  109.       <node if="$(arg rtabmapviz)" name="rtabmapviz" pkg="rtabmap_ros" type="rtabmapviz" output="screen">
  110.         <param name="frame_id" type="string" value="$(arg frame_id)"/>
  111.         <param name="odom_frame_id" type="string" value="aft_mapped"/>
  112.         <param name="subscribe_odom_info" type="bool" value="true"/>
  113.         <param name="subscribe_scan_cloud" type="bool" value="true"/>
  114.         <param name="approx_sync" type="bool" value="false"/>
  115.         <remap from="scan_cloud" to="/velodyne_cloud_registered"/>
  116.       </node>
  117.  
  118.       <node pkg="nodelet" type="nodelet" name="point_cloud_assembler" args="standalone rtabmap_ros/point_cloud_assembler" output="screen">
  119.         <remap from="cloud"           to="/velodyne_cloud_registered"/>
  120.         <remap from="odom"            to="aft_mapped"/>
  121.         <param     if="$(arg scan_20_hz)" name="max_clouds"      type="int"    value="10" />
  122.         <param unless="$(arg scan_20_hz)" name="max_clouds"      type="int"    value="10" />
  123.         <param name="fixed_frame_id"  type="string" value="" />
  124.       </node>
  125.   </group>
  126.  
  127. </launch>
  128.  
Advertisement
Add Comment
Please, Sign In to add comment