Rosbag playback with Rtabmap
Hi
I've tried everything but I can't get rtabmap working with a rosbag playback, done some searching for a solution, and it should be to set the use_sim_time parameter, which I did but for no avail. Please help! (I'm running Melodic on Jetson Xavier Agx)
I'm using the Rosbag A from here: http://wiki.ros.org/rtabmap_ros/Tutor... (running it with the clock enabled: rosbag play --clock stereo_outdoorA.bag) with this launch file:
<launch>
<arg name="rtabmapviz" default="true" />
<param name="use_sim_time" type="bool" value="true"/>
<node name="republish_left" type="republish" pkg="image_transport" args="compressed
in:=/stereo_camera/left/image_raw_throttle raw
out:=/stereo/left/image_raw" />
<node name="republish_right" type="republish" pkg="image_transport" args="compressed
in:=/stereo_camera/right/image_raw_throttle raw
out:=/stereo/right/image_raw" />
<remap from="/stereo/left/camera_info" to="/stereo_camera/left/camera_info_throttle"/>
<remap from="/stereo/right/camera_info" to="/stereo_camera/right/camera_info_throttle"/>
<group ns="stereo">
<node name="stereo_image_proc" pkg="stereo_image_proc" type="stereo_image_proc" output="screen" >
<remap from="/stereo/left/image" to="/stereo/left/image_raw"/>
<remap from="/stereo/right/image" to="/stereo/right/image_raw"/>
<param name="prefilter_size" value="5"/>
<param name="prefilter_cap" value="38"/>
<param name="correlation_window_size" value="25"/>
<param name="min_disparity" value="0"/>
<param name="disparity_range" value="64"/>
<param name="uniqueness_ratio" value="1.0"/>
<param name="texture_threshold" value="2287"/>
<param name="speckle_size" value="875"/>
<param name="speckle_range" value="25"/>
<param name="use_sim_time" type="bool" value="true"/>
</node>
</group>
<!--
<node name="stereo_cam" pkg="image_view" type="stereo_view" output="screen" >
<remap from="/stereo/left/image" to="/stereo/left/image_raw"/>
<remap from="/stereo/right/image" to="/stereo/right/image_raw"/>
</node>
-->
<!-- rotate camera so z axis is up and x forward. -->
<arg name="pi/2" value="1.5707963267948966" />
<node pkg="tf" type="static_transform_publisher" name="camera_base_link" args="0 0 0 -$(arg pi/2) 0 -$(arg pi/2) camera_link stereo_camera 100" >
</node>
<group ns="rtabmap">
<!-- Stereo Odometry -->
<node pkg="rtabmap_ros" type="stereo_odometry" name="stereo_odometry" output="screen">
<remap from="left/image_rect" to="/stereo/left/image_rect"/>
<remap from="right/image_rect" to="/stereo/right/image_rect"/>
<remap from="left/camera_info" to="/stereo_camera/left/camera_info_throttle"/>
<remap from="right/camera_info" to="/stereo_camera/right/camera_info_throttle"/>
<param name="use_sim_time" type="bool" value="true"/>
<param name="frame_id" type="string" value="camera_link"/>
<param name="odom_frame_id" type="string" value="odom"/>
<!-- <param name="approx_sync" type="bool" value="true"/>
<param name="queue_size" type="int" value="5"/> -->
</node>
</group>
</launch>
Keep getting the following error:
[ WARN] [1590337936.234554157, 1415737845.599683697]: odometry: Could not get transform from camera_link to stereo_camera (stamp=1415737845.429450) after 0.100000 seconds ("wait_for_transform_duration"=0.100000)! Error="Lookup would require extrapolation into the future. Requested time 1415737845.429450035 but the latest data is at time 1415737830.056226969, when looking up transform from frame [stereo_camera] to frame [camera_link]. canTransform returned after 0.100854 timeout was 0.1."
Do not use external sites to host
.launch
files (or similar files). They will go away and then this question will have lost a significant part of its value.The site even mentions it:
So after 30 days no one will understand what you are referring to.