Files
rtabmap_ros/launch/demo/demo_hector_mapping.launch
T

131 lines
6.4 KiB
XML
Raw Normal View History

<launch>
<!-- HECTOR MAPPING VERSION: use this with ROS bag demo_mapping_no_odom.bag generated -->
<!-- from demo_mapping.bag with: -->
<!-- rosbag filter demo_mapping.bag demo_mapping_no_odom.bag 'topic != "/tf" or topic == "/tf" and m.transforms[0].header.frame_id != "/odom"' -->
<!-- WARNING : Database is automatically deleted on each startup -->
2015-01-25 13:13:57 -05:00
<!-- See "delete_db_on_start" option below... -->
<!-- Choose visualization -->
<arg name="rviz" default="true" />
<arg name="rtabmapviz" default="false" />
<!-- Choose hector_slam or icp_odometry for odometry -->
<arg name="hector" default="true" />
<param name="use_sim_time" type="bool" value="True"/>
<node if="$(arg hector)" pkg="tf" type="static_transform_publisher" name="scanmatcher_to_base_footprint"
args="0.0 0.0 0.0 0.0 0.0 0.0 /scanmatcher_frame /base_footprint 100" />
<!-- Odometry from laser scans -->
<!-- If argument "hector" is true, we use Hector mapping to generate odometry for us -->
<node if="$(arg hector)" pkg="hector_mapping" type="hector_mapping" name="hector_mapping" output="screen">
<!-- Frame names -->
<param name="map_frame" value="hector_map" />
<param name="base_frame" value="base_footprint" />
<param name="odom_frame" value="odom" />
<!-- Tf use -->
<param name="pub_map_odom_transform" value="false"/>
<param name="pub_map_scanmatch_transform" value="true"/>
<param name="pub_odometry" value="true"/>
<!-- Map size / start point -->
<param name="map_resolution" value="0.050"/>
<param name="map_size" value="2048"/>
<param name="map_multi_res_levels" value="2" />
<!-- Map update parameters -->
<param name="map_update_angle_thresh" value="0.06" />
<!-- Advertising config -->
<param name="scan_topic" value="/jn0/base_scan"/>
</node>
<!-- If argument "hector" is false, we use rtabmap's icp odometry to generate odometry for us -->
<node unless="$(arg hector)" pkg="rtabmap_ros" type="icp_odometry" name="icp_odometry" output="screen" >
<remap from="scan" to="/jn0/base_scan"/>
<remap from="odom" to="/scanmatch_odom"/>
<remap from="odom_info" to="/rtabmap/odom_info"/>
<param name="frame_id" type="string" value="base_footprint"/>
<param name="Icp/PointToPlane" type="string" value="true"/>
<param name="Icp/VoxelSize" type="string" value="0.05"/>
<param name="Icp/Epsilon" type="string" value="0.001"/>
<param name="Icp/PointToPlaneK" type="string" value="5"/>
<param name="Icp/PointToPlaneRadius" type="string" value="0.3"/>
<param name="Icp/MaxCorrespondenceDistance" type="string" value="0.1"/>
<param name="Icp/PM" type="string" value="true"/> <!-- use libpointmatcher to handle PointToPlane with 2d scans-->
<param name="Icp/PMOutlierRatio" type="string" value="0.95"/>
<param name="Odom/Strategy" type="string" value="0"/>
<param name="Odom/GuessMotion" type="string" value="true"/>
<param name="Odom/ResetCountdown" type="string" value="0"/>
<param name="Odom/ScanKeyFrameThr" type="string" value="0.9"/>
</node>
<group ns="rtabmap">
<node pkg="nodelet" type="nodelet" name="rgbd_sync" args="standalone rtabmap_ros/rgbd_sync" output="screen">
<remap from="rgb/image" to="/data_throttled_image"/>
<remap from="depth/image" to="/data_throttled_image_depth"/>
<remap from="rgb/camera_info" to="/data_throttled_camera_info"/>
<param name="rgb/image_transport" type="string" value="compressed"/>
<param name="depth/image_transport" type="string" value="compressedDepth"/>
</node>
<!-- SLAM -->
<!-- args: "delete_db_on_start" and "udebug" -->
<node name="rtabmap" pkg="rtabmap_ros" type="rtabmap" output="screen" args="--delete_db_on_start">
<param name="frame_id" type="string" value="base_footprint"/>
<param name="subscribe_depth" type="bool" value="false"/>
<param name="subscribe_rgbd" type="bool" value="true"/>
<param name="subscribe_scan" type="bool" value="true"/>
<remap from="scan" to="/jn0/base_scan"/>
<!-- As hector doesn't provide compatible covariance in the odometry topic, don't use the topic and fix the covariance -->
<param if="$(arg hector)" name="odom_frame_id" type="string" value="hector_map"/>
<param if="$(arg hector)" name="odom_tf_linear_variance" type="double" value="0.0005"/>
<param if="$(arg hector)" name="odom_tf_angular_variance" type="double" value="0.0005"/>
<remap unless="$(arg hector)" from="odom" to="/scanmatch_odom"/>
<param unless="$(arg hector)" name="subscribe_odom_info" type="bool" value="true"/>
<!-- RTAB-Map's parameters -->
<param name="Reg/Strategy" type="string" value="1"/> <!-- 0=Visual, 1=ICP, 2=Visual+ICP -->
<param name="Reg/Force3DoF" type="string" value="true"/>
<param name="RGBD/ProximityBySpace" type="string" value="false"/>
</node>
<!-- 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_rgbd" type="bool" value="true"/>
<param name="subscribe_laserScan" type="bool" value="true"/>
2016-03-13 18:05:27 -04:00
<param name="frame_id" type="string" value="base_footprint"/>
2016-03-13 18:05:27 -04:00
<remap from="scan" to="/jn0/base_scan"/>
2018-09-18 19:01:11 -04:00
<!-- As hector doesn't provide compatible covariance in the odometry topic -->
<param if="$(arg hector)" name="odom_frame_id" type="string" value="hector_map"/>
<remap unless="$(arg hector)" from="odom" to="/scanmatch_odom"/>
<param unless="$(arg hector)" name="subscribe_odom_info" type="bool" value="true"/>
</node>
</group>
<!-- Visualisation RVIZ -->
<node if="$(arg rviz)" pkg="rviz" type="rviz" name="rviz" args="-d $(find rtabmap_ros)/launch/config/demo_robot_mapping.rviz" output="screen"/>
<node pkg="nodelet" type="nodelet" name="points_xyzrgb" args="standalone rtabmap_ros/point_cloud_xyzrgb">
<remap from="rgbd_image" to="/rtabmap/rgbd_image"/>
<remap from="cloud" to="voxel_cloud" />
<param name="voxel_size" type="double" value="0.01"/>
</node>
</launch>