ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

[RTabMap] Could not get transform from odom to base_link after 0.200000 seconds (for stamp=1685162223.741804)

asked 2023-05-27 00:14:34 -0500

huma0605 gravatar image

Hi I am trying to run RTabMap with Livox Mid360 and Realsense d435i. While mapping mode worked very smoothly (localization = false), when I turned on the localization mode, after about 1 minutes, I will start seeing the warning message saying that could not get the transform from odom to base_link.

Below is a brief summary of my setup: (1) I am using FastLIO for Livox Mid360 for generating the odometry for it (livox_init -> livox_body through LaserMap). (2) I set up 2 static transforms, the first one is from the /odom to /livox_init (<node pkg="tf2_ros" type="static_transform_publisher" name="livox_init_to_odom" args="0 0 0 0 0 0 /odom /livox_init"/> ), and the second one is from /livox_body to /base_link (3) I turned on "subscribe_scan_cloud" (set to true) with <remap from="scan_cloud" to="/livox/points3D"/>, where /livox/points3D is a simple message converter from the Livox CustomMsg to PointCloud2. (4) I don't turn on ICP odometry nor Visual odometry at this moment. (5) The full launch file can be found below. (6) My TF tree is like: /map -> /odom -> /livox_init -> /livox_body ->/base_link

[ WARN] [1685162235.126441643]: Could not get transform from odom to base_link after 0.200000 seconds (for stamp=1685162223.741804)! Error="Lookup would require extrapolation 1.495885847s into the past. Requested time 1685162223.741804361 but the earliest data is at time 1685162225.237690210, when looking up transform from frame [base_link] to frame [odom]. canTransform returned after 0.200674 timeout was 0.2.". [ WARN] [1685162235.328926136]: Could not get transform from odom to base_link after 0.200000 seconds (for stamp=1685162223.842756)! Error="Lookup would require extrapolation 1.544934257s into the past. Requested time 1685162223.842755556 but the earliest data is at time 1685162225.387689829, when looking up transform from frame [base_link] to frame [odom]. canTransform returned after 0.200683 timeout was 0.2.". [ WARN] [1685162235.532499467]: Could not get transform from odom to base_link after 0.200000 seconds (for stamp=1685162223.941825)! Error="Lookup would require extrapolation 1.645868992s into the past. Requested time 1685162223.941824913 but the earliest data is at time 1685162225.587693930, when looking up transform from frame [base_link] to frame [odom]. canTransform returned after 0.200672 timeout was 0.2.".

<launch>  
   <arg name="depth_topic"        value="/camera/aligned_depth_to_color/image_raw"/>
   <arg name="frame_id"           value="base_link"/>
   <arg name="visual_odometry"    value="false"/>
   <arg name="odom_topic"         value="/Odometry"/>
   <arg name="rgb_topic"          value="/camera/color/image_raw"/>
   <arg name="camera_info_topic"  value="/camera/color/camera_info"/>
   <arg name="queue_size"         value="200"/>
   <arg name="odom_frame_id"           value="odom"/>
   <arg name="map_frame_id"            value="map"/>
   <arg name="subscribe_scan_cloud"    value="true"/>

  <!-- Localization-only mode -->
  <arg name="localization"            default="false"/>

  <!-- Corresponding config files -->
  <arg name="cfg"                     default="" /> <!-- To change RTAB-Map's parameters, set the path of config file (*.ini) generated by the standalone app -->

  <arg name="ground_truth_frame_id"   default=""/>     <!-- e.g., "world" -->
  <arg name="ground_truth_base_frame_id" default=""/>  <!-- e.g., "tracker", a fake frame matching the ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2023-05-29 20:32:45 -0500

matlabbe gravatar image

It looks like the timestamps of the realsense and the Livox are drifting apart. Is Livox publishing data using host computer stamp? (like a PTP ethernet time sync mode)

For the realsense, make sure it uses host timestamp mode, so that lidar and camera are sync on same clock.

Ref: http://official-rtab-map-forum.206.s1...

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2023-05-27 00:08:19 -0500

Seen: 209 times

Last updated: May 29 '23