mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-03 16:27:46 +08:00
141 lines
8.2 KiB
XML
141 lines
8.2 KiB
XML
|
|
<launch>
|
|
|
|
<!--
|
|
Hand-held 3D lidar mapping example using only a Velodyne PUCK (no camera).
|
|
Prerequisities: rtabmap should be built with libpointmatcher
|
|
Example:
|
|
$ roslaunch rtabmap_ros test_velodyne.launch
|
|
$ rosrun rviz rviz -f map
|
|
$ Show TF and /rtabmap/cloud_map topics
|
|
-->
|
|
|
|
<arg name="rtabmapviz" default="true"/>
|
|
<arg name="use_imu" default="false"/> <!-- Assuming IMU fixed to lidar with /velodyne -> /imu_link TF -->
|
|
<arg name="imu_topic" default="/imu/data"/>
|
|
<arg name="scan_20_hz" default="false"/> <!-- If we launch the velodyne with "rpm:=1200" argument -->
|
|
<arg name="organize_cloud" default="false"/>
|
|
<arg name="use_sim_time" default="false"/>
|
|
<param if="$(arg use_sim_time)" name="use_sim_time" value="true"/>
|
|
|
|
<arg name="frame_id" default="velodyne"/>
|
|
|
|
<arg name="resolution" default="0.1"/> <!-- set 0.1-0.3 for indoor, set 0.3-0.5 for outdoor -->
|
|
|
|
<arg name="floam" default="false"/> <!-- RTAB-Map should be built with FLOAM http://official-rtab-map-forum.206.s1.nabble.com/icp-odometry-with-LOAM-crash-tp8261p8563.html -->
|
|
|
|
<include file="$(find velodyne_pointcloud)/launch/VLP16_points.launch">
|
|
<arg if="$(arg scan_20_hz)" name="rpm" value="1200"/>
|
|
<arg unless="$(arg scan_20_hz)" name="rpm" value="600"/>
|
|
<arg name="organize_cloud" value="$(arg organize_cloud)"/>
|
|
</include>
|
|
|
|
<!-- IMU orientation estimation and publish tf accordingly to os1_sensor frame -->
|
|
<node if="$(arg use_imu)" pkg="rtabmap_ros" type="imu_to_tf" name="imu_to_tf">
|
|
<remap from="imu/data" to="$(arg imu_topic)"/>
|
|
<param name="fixed_frame_id" value="$(arg frame_id)_stabilized"/>
|
|
<param name="base_frame_id" value="$(arg frame_id)"/>
|
|
</node>
|
|
|
|
<group ns="rtabmap">
|
|
<node pkg="rtabmap_ros" type="icp_odometry" name="icp_odometry" output="screen">
|
|
<remap from="scan_cloud" to="/velodyne_points"/>
|
|
<param name="frame_id" type="string" value="$(arg frame_id)"/>
|
|
<param name="odom_frame_id" type="string" value="odom"/>
|
|
<param if="$(arg scan_20_hz)" name="expected_update_rate" type="double" value="25"/>
|
|
<param unless="$(arg scan_20_hz)" name="expected_update_rate" type="double" value="15"/>
|
|
|
|
<remap if="$(arg use_imu)" from="imu" to="$(arg imu_topic)"/>
|
|
<param if="$(arg use_imu)" name="guess_frame_id" type="string" value="$(arg frame_id)_stabilized"/>
|
|
<param if="$(arg use_imu)" name="wait_imu_to_init" type="bool" value="true"/>
|
|
|
|
<!-- ICP parameters -->
|
|
<param name="Icp/PointToPlane" type="string" value="true"/>
|
|
<param name="Icp/Iterations" type="string" value="10"/>
|
|
<param if="$(arg floam)" name="Icp/VoxelSize" type="string" value="0"/>
|
|
<param unless="$(arg floam)" name="Icp/VoxelSize" type="string" value="$(arg resolution)"/>
|
|
<param name="Icp/DownsamplingStep" type="string" value="1"/> <!-- cannot be increased with ring-like lidar -->
|
|
<param name="Icp/Epsilon" type="string" value="0.001"/>
|
|
<param name="Icp/PointToPlaneK" type="string" value="20"/>
|
|
<param name="Icp/PointToPlaneRadius" type="string" value="0"/>
|
|
<param name="Icp/MaxTranslation" type="string" value="2"/>
|
|
<param name="Icp/MaxCorrespondenceDistance" type="string" value="1"/>
|
|
<param name="Icp/PM" type="string" value="true"/>
|
|
<param name="Icp/PMOutlierRatio" type="string" value="0.7"/>
|
|
<param name="Icp/CorrespondenceRatio" type="string" value="0.01"/>
|
|
|
|
<!-- Odom parameters -->
|
|
<param name="Odom/ScanKeyFrameThr" type="string" value="0.9"/>
|
|
<param if="$(arg floam)" name="Odom/Strategy" type="string" value="11"/>
|
|
<param unless="$(arg floam)" name="Odom/Strategy" type="string" value="0"/>
|
|
<param name="OdomF2M/ScanSubtractRadius" type="string" value="$(arg resolution)"/>
|
|
<param name="OdomF2M/ScanMaxSize" type="string" value="15000"/>
|
|
<param name="OdomLOAM/Sensor" type="string" value="0"/> <!-- select VLP16 format -->
|
|
<param name="OdomLOAM/Resolution" type="string" value="$(arg resolution)"/>
|
|
</node>
|
|
|
|
<node pkg="rtabmap_ros" type="rtabmap" name="rtabmap" output="screen" args="-d">
|
|
<param name="frame_id" type="string" value="$(arg frame_id)"/>
|
|
<param name="subscribe_depth" type="bool" value="false"/>
|
|
<param name="subscribe_rgb" type="bool" value="false"/>
|
|
<param name="subscribe_scan_cloud" type="bool" value="true"/>
|
|
<param name="approx_sync" type="bool" value="false"/>
|
|
|
|
<remap from="scan_cloud" to="assembled_cloud"/>
|
|
<remap from="imu" to="$(arg imu_topic)"/>
|
|
|
|
<!-- RTAB-Map's parameters -->
|
|
<param name="Rtabmap/DetectionRate" type="string" value="1"/>
|
|
<param name="RGBD/NeighborLinkRefining" type="string" value="false"/>
|
|
<param name="RGBD/ProximityBySpace" type="string" value="true"/>
|
|
<param name="RGBD/ProximityMaxGraphDepth" type="string" value="0"/>
|
|
<param name="RGBD/ProximityPathMaxNeighbors" type="string" value="1"/>
|
|
<param name="RGBD/AngularUpdate" type="string" value="0.05"/>
|
|
<param name="RGBD/LinearUpdate" type="string" value="0.05"/>
|
|
<param name="Mem/NotLinkedNodesKept" type="string" value="false"/>
|
|
<param name="Mem/STMSize" type="string" value="30"/>
|
|
<!-- param name="Mem/LaserScanVoxelSize" type="string" value="0.1"/ -->
|
|
<!-- param name="Mem/LaserScanNormalK" type="string" value="10"/ -->
|
|
<!-- param name="Mem/LaserScanRadius" type="string" value="0"/ -->
|
|
|
|
<param name="Reg/Strategy" type="string" value="1"/>
|
|
<param name="Grid/CellSize" type="string" value="0.1"/>
|
|
<param name="Grid/RangeMax" type="string" value="20"/>
|
|
<param name="Grid/ClusterRadius" type="string" value="1"/>
|
|
<param name="Grid/GroundIsObstacle" type="string" value="true"/>
|
|
<param name="Optimizer/GravitySigma" type="string" value="0.3"/>
|
|
|
|
<!-- ICP parameters -->
|
|
<param name="Icp/VoxelSize" type="string" value="$(arg resolution)"/>
|
|
<param name="Icp/PointToPlaneK" type="string" value="20"/>
|
|
<param name="Icp/PointToPlaneRadius" type="string" value="0"/>
|
|
<param name="Icp/PointToPlane" type="string" value="true"/>
|
|
<param name="Icp/Iterations" type="string" value="10"/>
|
|
<param name="Icp/Epsilon" type="string" value="0.001"/>
|
|
<param name="Icp/MaxTranslation" type="string" value="3"/>
|
|
<param name="Icp/MaxCorrespondenceDistance" type="string" value="1"/>
|
|
<param name="Icp/PM" type="string" value="true"/>
|
|
<param name="Icp/PMOutlierRatio" type="string" value="0.7"/>
|
|
<param name="Icp/CorrespondenceRatio" type="string" value="0.4"/>
|
|
</node>
|
|
|
|
<node if="$(arg rtabmapviz)" name="rtabmapviz" pkg="rtabmap_ros" type="rtabmapviz" output="screen">
|
|
<param name="frame_id" type="string" value="$(arg frame_id)"/>
|
|
<param name="odom_frame_id" type="string" value="odom"/>
|
|
<param name="subscribe_odom_info" type="bool" value="true"/>
|
|
<param name="subscribe_scan_cloud" type="bool" value="true"/>
|
|
<param name="approx_sync" type="bool" value="false"/>
|
|
<remap from="scan_cloud" to="/velodyne_points"/>
|
|
</node>
|
|
|
|
<node pkg="nodelet" type="nodelet" name="point_cloud_assembler" args="standalone rtabmap_ros/point_cloud_assembler" output="screen">
|
|
<remap from="cloud" to="/velodyne_points"/>
|
|
<remap from="odom" to="odom"/>
|
|
<param if="$(arg scan_20_hz)" name="max_clouds" type="int" value="20" />
|
|
<param unless="$(arg scan_20_hz)" name="max_clouds" type="int" value="10" />
|
|
<param name="fixed_frame_id" type="string" value="" />
|
|
</node>
|
|
</group>
|
|
|
|
</launch>
|