Updated for rtabmap 0.8.12. Updated synchronization of messages (laser scan and images) with odometry pose stamp. Removed data_recorder node, use data_recorder.launch instead.

This commit is contained in:
Mathieu Labbe
2015-05-03 18:23:56 -04:00
parent 55ce1db43a
commit db4b4a9397
10 changed files with 215 additions and 1037 deletions
+51 -35
View File
@@ -1,40 +1,56 @@
<launch>
<node name="data_recorder" pkg="rtabmap_ros" type="data_recorder" output="screen">
<param name="output_file_name" value="output.db" type="string"/>
<param name="frame_id" type="string" value="camera_link"/>
<param name="subscribe_odometry" type="bool" value="false"/>
<param name="subscribe_depth" type="bool" value="true"/>
<param name="subscribe_laserScan" type="bool" value="false"/>
<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="raw"/>
<param name="depth/image_transport" type="string" value="raw"/>
<param name="queue_size" type="int" value="10"/>
</node>
<!-- Throttling messages -->
<node pkg="nodelet" type="nodelet" name="standalone_nodelet" args="manager"/>
<node pkg="nodelet" type="nodelet" name="data_throttle" args="load rtabmap_ros/data_throttle standalone_nodelet" output="screen">
<param name="rate" type="double" value="10.0"/>
<remap from="rgb/image_in" to="/camera/rgb/image_rect_color"/>
<remap from="depth/image_in" to="/camera/depth_registered/image_raw"/>
<remap from="rgb/camera_info_in" to="/camera/depth_registered/camera_info"/>
<remap from="rgb/image_out" to="data_throttled_image"/>
<remap from="depth/image_out" to="data_throttled_image_depth"/>
<remap from="rgb/camera_info_out" to="data_throttled_camera_info"/>
</node>
<!-- arguments -->
<arg name="subscribe_odometry" default="false"/>
<arg name="subscribe_depth" default="true"/>
<arg name="subscribe_stereo" default="false"/>
<arg name="subscribe_laserScan" default="false"/>
<node pkg="image_view" type="image_view" name="image_view">
<remap from="image" to="data_throttled_image"/>
</node>
<arg name="frame_id" default="camera_link"/>
<arg name="odom_frame_id" default=""/> <!-- use topic when not set, otherwise use TF if set -->
<arg name="output_path" default="output.db"/>
<arg name="record_in_RAM" default="true"/>
<arg name="queue_size" default="10"/>
<arg name="max_rate" default="0"/> <!-- Record as fast as possible -->
<arg name="camera_prefix" default="camera"/>
<arg name="odom_topic" default="odom"/>
<arg name="scan_topic" default="scan"/>
<node name="data_recorder" pkg="rtabmap_ros" type="rtabmap" output="screen" args="--delete_db_on_start">
<!-- Disable any processing -->
<param name="Mem/RehearsalSimilarity" type="string" value="1.0"/> <!-- desactivate rehearsal -->
<param name="Kp/WordsPerImage" type="string" value="-1"/> <!-- desactivate keypoints extraction -->
<param name="Rtabmap/MaxRetrieved" type="string" value="0"/> <!-- desactivate global retrieval -->
<param name="RGBD/MaxLocalRetrieved" type="string" value="0"/> <!-- desactivate local retrieval -->
<param name="Rtabmap/MemoryThr" type="string" value="1"/> <!-- keep the WM empty -->
<param name="Mem/STMSize" type="string" value="1"/> <!-- STM=1 -->
<param name="publish_tf" type="bool" value="false"/> <!-- don't publish TF -->
<param unless="$(arg subscribe_odometry)" name="RGBD/Enabled" type="string" value="false"/>
<param name="Rtabmap/DetectionRate" type="string" value="$(arg max_rate)"/>
<param name="DbSqlite3/InMemory" type="string" value="$(arg record_in_RAM)"/>
<param name="database_path" type="string" value="$(arg output_path)"/>
<param name="frame_id" type="string" value="$(arg frame_id)"/>
<param name="subscribe_depth" type="bool" value="$(arg subscribe_depth)"/>
<param name="subscribe_laserScan" type="bool" value="$(arg subscribe_laserScan)"/>
<param name="subscribe_stereo" type="bool" value="$(arg subscribe_stereo)"/>
<param name="queue_size" type="int" value="$(arg queue_size)"/>
<!-- Hack to use a fake odom_frame_id=frame_id if subscribe_odometry = false -->
<param if="$(arg subscribe_odometry)" name="odom_frame_id" type="string" value="$(arg odom_frame_id)"/>
<param unless="$(arg subscribe_odometry)" name="odom_frame_id" type="string" value="$(arg frame_id)"/>
<remap from="rgb/image" to="$(arg camera_prefix)/rgb/image_rect_color"/>
<remap from="rgb/camera_info" to="$(arg camera_prefix)/rgb/camera_info"/>
<remap from="depth/image" to="$(arg camera_prefix)/depth_registered/image_raw"/>
<remap from="left/image_rect" to="$(arg camera_prefix)/left/image_rect"/>
<remap from="left/camera_info" to="$(arg camera_prefix)/left/camera_info"/>
<remap from="right/image_rect" to="$(arg camera_prefix)/right/image_rect"/>
<remap from="right/camera_info" to="$(arg camera_prefix)/right/camera_info"/>
<remap from="scan" to="$(arg scan_topic)"/>
<remap from="odom" to="$(arg odom_topic)"/>
</node>
</launch>