Guest User

Untitled

a guest
Apr 7th, 2018
269
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <launch>
  2.  
  3.  <arg name="rtabmap_args"   default=""/>
  4.  <arg name="database_path"      default="~/.ros/rtabmap.db"/>
  5.  <arg name="wait_for_transform" default="0.2"/>
  6.  
  7.  <!-- Localization-only mode -->
  8.  <arg name="localization"       default="false"/>
  9.  
  10.  
  11.  
  12.    <!-- Base Controller -->
  13.    <!-- Starting ROSARIA driver for motors and encoders -->
  14.    <node name="rosaria" pkg="rosaria" type="RosAria" args="_port:=/dev/ttyUSB0"/>
  15.     <!-- Remapping -->
  16.     <remap from="/cmd_vel" to="/cmd_vel"/>
  17.  
  18.    
  19.    <!-- TRANSFORMS -->
  20.    <!-- static_transform_publisher x y z yaw pitch roll  frame_id   child_frame_id   period (ms) -->
  21.    <node pkg="tf" type="static_transform_publisher" name="base_to_camera_tf" args="0.2 0.0 0.12 0 0 0 base_link camera_link 100"/>
  22.    
  23.    <!-- SENSORS INFORMATION - Kinect -->
  24.    <include file="$(find freenect_launch)/launch/freenect.launch">
  25.       <arg name="depth_registration" value="True"/>
  26.    </include>
  27.  
  28.   <!-- Fake laser -->
  29.   <node pkg="depthimage_to_laserscan" type="depthimage_to_laserscan" name="depthimage_to_laserscan">
  30.     <remap from="image"       to="/camera/depth_registered/image_raw"/>
  31.     <remap from="camera_info" to="/camera/depth_registered/camera_info"/>
  32.     <remap from="scan"        to="/scan"/>
  33.     <param name="range_max" type="double" value="4"/>
  34.   </node>
  35.  
  36.    
  37.   <!-- RTAB Mapping -->
  38.  
  39.   <group ns="rtabmap">
  40.  
  41.     <node name="rtabmap" pkg="rtabmap_ros" type="rtabmap" output="screen" args="$(arg rtabmap_args)">
  42.       <param name="frame_id"            type="string" value="base_link"/>
  43.       <param name="odom_frame_id"       type="string" value="odom"/>
  44.       <param name="subscribe_depth"     type="bool"   value="true"/>
  45.       <param name="subscribe_scan"      type="bool"   value="true"/>
  46.       <param name="use_action_for_goal" type="bool" value="true"/>
  47.           <param name="cloud_decimation"    type="int" value="1"/>     <!-- we already decimate in memory below -->
  48.           <param name="grid_eroded"         type="bool" value="true"/>
  49.       <param name="grid_cell_size"      type="double" value="0.05"/>
  50.    
  51.      
  52.     <!--  <remap from="odom"        to="/odom"/> -->
  53.       <remap from="scan"            to="/scan"/>
  54.       <remap from="rgb/image"       to="/camera/rgb/image_rect_color"/>
  55.       <remap from="depth/image"     to="/camera/depth_registered/image_raw"/>
  56.       <remap from="rgb/camera_info" to="/camera/rgb/camera_info"/>
  57.      
  58.       <remap from="grid_map"  to="/map"/>
  59.      <!-- <remap from="goal_out"        to="current_goal"/>   -->
  60.      <!-- <remap from="move_base"       to="/planner/move_base"/> -->
  61.    
  62.    
  63.     <!-- Used for synchronization of the input topics above -->
  64.     <!-- Higher the value, more flexible can be the rate used for each topic -->
  65.           <param name="queue_size" type="int" value="20"/>
  66.  
  67.           <!-- RTAB-Map's parameters -->
  68.           <param name="RGBD/ProximityBySpace"     type="string" value="false"/>
  69.           <param name="RGBD/AngularUpdate"        type="string" value="0.01"/>
  70.           <param name="RGBD/LinearUpdate"         type="string" value="0.01"/>
  71.           <param name="RGBD/OptimizeFromGraphEnd" type="string" value="false"/>
  72.          <!-- <param name="Optimizer/Slam2D"          type="string" value="true"/> -->
  73.           <param name="Reg/Strategy"              type="string" value="1"/> <!-- 1=ICP -->
  74.           <param name="Reg/Force3DoF"             type="string" value="true"/>
  75.           <param name="Vis/MaxDepth"              type="string" value="4.0"/>
  76.           <param name="Vis/MinInliers"            type="string" value="5"/>
  77.           <param name="Vis/InlierDistance"        type="string" value="0.05"/>
  78.           <param name="Rtabmap/TimeThr"           type="string" value="700"/>
  79.           <param name="Mem/RehearsalSimilarity"   type="string" value="0.45"/>
  80.           <param name="Icp/CorrespondenceRatio"   type="string" value="0.5"/>
  81.           <param name="Grid/FromDepth"            type="string" value="false"/>
  82.      
  83.       <!-- localization mode -->
  84.       <param     if="$(arg localization)" name="Mem/IncrementalMemory" type="string" value="false"/>
  85.       <param unless="$(arg localization)" name="Mem/IncrementalMemory" type="string" value="true"/>
  86.       <param     if="$(arg localization)" name="Mem/InitWMWithAllNodes" type="string" value="true"/>
  87.       <!-- <param if="$(arg localization)" name="Mem/IncrementalMemory" type="string" value="false"/> -->
  88.           <!-- <param if="$(arg localization)" name="Mem/InitWMWithAllNodes" type="string" value="true"/> -->
  89.  
  90.    </node>
  91.   </group>
  92.  
  93.       <!-- 2. ODOM_navigation -->
  94.     <group ns="planner">
  95.     <remap from="scan"      to="/scan"/>   
  96.     <remap from="map"       to="/rtabmap/grid_map"/>
  97.          
  98.     <node pkg="move_base" type="move_base" respawn="true" name="move_base" output="screen">
  99.         <rosparam file="$(find pioneer_3at_nav)/params/move_base_params.yaml" command="load" />
  100.         <rosparam file="$(find pioneer_3at_nav)/params/costmap_common_params_2d.yaml" command="load" ns="global_costmap" />
  101.         <rosparam file="$(find pioneer_3at_nav)/params/costmap_common_params_2d.yaml" command="load" ns="local_costmap" />
  102.         <rosparam file="$(find pioneer_3at_nav)/params/local_costmap_params.yaml" command="load" />
  103.         <rosparam file="$(find pioneer_3at_nav)/params/global_costmap_params.yaml" command="load" />
  104.         <rosparam file="$(find pioneer_3at_nav)/params/base_local_planner_params.yaml" command="load" />
  105.         <!-- param name="base_global_planner" type="string" value="navfn/NavfnROS" /-->
  106.         <!-- param name="controller_frequency" type="double" value="6.0" /-->
  107.     </node>
  108.     </group>
  109.  
  110.  
  111.   <!-- RVIZ vizualization -->
  112.   <node pkg="rviz" type="rviz" name="rviz"/>
  113. </launch>
RAW Paste Data