SHARE
TWEET

Untitled

softwarety6 Nov 18th, 2019 100 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <launch>
  2.   <arg name="use_zed"         default="false"  doc="Set to false when using Intel Realsense D435"/>
  3.   <arg name="localization"    default="false" doc="Localization mode for navigation"/>
  4.   <arg name="database_path"   default="rtabmap.db"/>
  5.   <arg name="rviz"            default="false"/>
  6.   <arg name="rate"            default="1.0"/>
  7.   <arg name="camera_frame"    default="camera"/>
  8.  
  9.   <arg     if="$(arg localization)" name="rtabmap_args"  default=""/>
  10.   <arg unless="$(arg localization)" name="rtabmap_args"  default="--delete_db_on_start"/>
  11.   <arg     if="$(arg localization)" name="rviz_config"   default="$(find turtlebot3_slam_3d)/config/navigation.rviz"/>
  12.   <arg unless="$(arg localization)" name="rviz_config"   default="$(find turtlebot3_slam_3d)/config/mapping.rviz"/>
  13.  
  14.   <arg name="input_scan"       default="/scan"/>
  15.   <arg name="input_odom"       default="/odom"/>
  16.   <arg     if="$(arg use_zed)" name="input_image"        default="/stereo_camera/left/image_rect_color"/>
  17.   <arg unless="$(arg use_zed)" name="input_image"        default="/camera/color/image_rect_color"/>
  18.   <arg     if="$(arg use_zed)" name="input_depth"        default="/stereo_camera/depth/depth_registered"/>
  19.   <arg unless="$(arg use_zed)" name="input_depth"        default="/camera/depth/image_rect_raw"/>
  20.   <arg     if="$(arg use_zed)" name="input_camera_info"  default="/stereo_camera/left/camera_info"/>
  21.   <arg unless="$(arg use_zed)" name="input_camera_info"  default="/camera/color/camera_info"/>
  22.  
  23.  <!-- RTAB=Map node -->
  24.   <group ns="rtabmap">
  25.  
  26.     <node pkg="nodelet" type="nodelet" name="rgbd_sync" args="standalone rtabmap_ros/rgbd_sync" output="screen">
  27.       <remap from="rgb/image"       to="/camera/color/image_rect_color"/>
  28.       <remap from="depth/image"     to="/camera/depth/image_rect_raw"/>
  29.       <remap from="rgb/camera_info" to="/camera/color/camera_info"/>
  30.       <remap from="rgbd_image"      to="rgbd_image"/> <!-- output -->
  31.      
  32.       <!-- Should be true for not synchronized camera topics
  33.            (e.g., false for kinectv2, zed, realsense, true for xtion, kinect360)-->
  34.       <param name="approx_sync"       value="true"/>
  35.     </node>
  36.  
  37.     <node name="rtabmap" pkg="rtabmap_ros" type="rtabmap" output="screen" args="$(arg rtabmap_args)">
  38.  
  39.       <param name="database_path"       type="string" value="$(arg database_path)"/>
  40.       <param name="frame_id"            type="string" value="base_link"/>
  41.       <param name="subscribe_depth"     type="bool"   value="false"/>
  42.       <param name="subscribe_rgbd"      type="bool"   value="true"/>
  43.       <param name="subscribe_scan"      type="bool"   value="false"/>
  44.  
  45.       <!-- Input topics -->
  46.       <remap from="scan"                to="$(arg input_scan)"/>
  47.       <remap from="odom"                to="$(arg input_odom)"/>
  48.       <remap from="rgb/image"           to="$(arg input_image)"/>
  49.       <remap from="depth/image"         to="$(arg input_depth)"/>
  50.       <remap from="rgb/camera_info"     to="$(arg input_camera_info)"/>
  51.       <remap from="rgbd_image"          to="rgbd_image"/>
  52.  
  53.       <!-- Output topics -->
  54.       <remap from="grid_map" to="/map"/>
  55.  
  56.       <param name="queue_size" type="int" value="100"/>
  57.  
  58.       <!-- RTAB-Map's parameters -->
  59.       <param name="RGBD/NeighborLinkRefining" type="string" value="true"/>
  60.       <param name="RGBD/ProximityBySpace"     type="string" value="true"/>
  61.       <param name="RGBD/OptimizeFromGraphEnd" type="string" value="false"/>
  62.       <param name="RGBD/AngularUpdate"        type="string" value="0.05"/>
  63.       <param name="RGBD/LinearUpdate"         type="string" value="0.05"/>
  64.       <param name="Optimizer/Slam2D"          type="string" value="true"/>
  65.       <param name="Reg/Force3DoF"             type="string" value="true"/>
  66.       <param name="Reg/Strategy"              type="string" value="1"/> <!-- 1=ICP -->
  67.       <param name="Vis/MinInliers"            type="string" value="5"/>
  68.       <param name="Vis/InlierDistance"        type="string" value="0.1"/>
  69.       <param name="Kp/MaxDepth"               type="string" value="1.75"/>
  70.       <param name="Vis/MaxDepth"              type="string" value="1.75"/>
  71.       <param name="Rtabmap/TimeThr"           type="string" value="700"/>
  72.       <param name="Rtabmap/DetectionRate"     type="string" value="$(arg rate)" />
  73.       <param name="Mem/RehearsalSimilarity"   type="string" value="0.45"/>
  74.       <param name="Grid/MaxObstacleHeight"    type="string" value="2" />
  75.       <param name="Grid/NoiseFilteringRadius" type="string" value="0.0"/>
  76.       <param name="Grid/NoiseFilteringMinNeighbors" type="string" value="5"/>
  77.  
  78.       <param name="Grid/FromDepth"            type="bool" value="true" />
  79.       <param name="Grid/DepthDecimation"      type="string" value="10"/>
  80.       <param name="Grid/3D"                   type="bool" value="true" />
  81.       <param name="Grid/RayTracing"           type="bool" value="true" />
  82.       <param name="Grid/NormalsSegmentation"  type="string" value="true" />
  83.       <param name="Grid/MaxGroundHeight"      type="string" value="0.05" />
  84.       <param name="Grid/RangeMax"             type="string" value="3.0" />
  85.  
  86.  
  87.       <param name="Icp/VoxelSize"             type="string" value="0.05"/>
  88.       <param name="Icp/MaxCorrespondenceDistance"            type="string" value="0.1"/>
  89.      
  90.       <!-- Localization mode -->
  91.       <param     if="$(arg localization)" name="Mem/IncrementalMemory" type="string" value="false"/>
  92.       <param unless="$(arg localization)" name="Mem/IncrementalMemory" type="string" value="true"/>
  93.       <param name="Mem/InitWMWithAllNodes" type="string" value="$(arg localization)"/>
  94.  
  95.     </node>
  96.   </group>
  97.  
  98.     <!-- Localization node -->
  99.     <include if="$(arg localization)" file="$(find turtlebot3_navigation)/launch/move_base.launch">
  100.       <arg name="model" value="waffle"/>
  101.       <arg name="odom_topic" value="stereo_camera/odom"/>
  102.     </include>
  103.     <node if="$(arg localization)" pkg="turtlebot3_slam_3d" type="detection_publisher.py"
  104.           name="detection_collector" output="screen"/>
  105.  
  106.     <!-- RVIZ node -->
  107.     <node if="$(arg rviz)" pkg="rviz" type="rviz" name="rviz" args="-d $(arg rviz_config)" />
  108.  
  109. </launch>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top