Moveit octomap problem: Transform error: Lookup would require extrapolation in the past

asked 2022-10-26 09:00:29 -0500

kubasinska gravatar image

I am working with a Kuka iiwa robot in a setup with two intel D435 cameras. To plan and execute the movement, I use Moveit. Moveit also integrates camera point clouds to perform obstacle avoidance. I use noetic version 1.15.14. I have a problem when the robot enters the camera's field of view, Moveit logs this error, and the execution of movements is delayed (5 to 20 seconds after planning).

[ WARN] [1666710494.407008734]: Failed to receive current joint state
[ERROR] [1666710494.838773464]: Transform error: Lookup would require extrapolation 5.466627297s into the past.  Requested time 1666710479.355905533 but the earliest data is at time 1666710484.822532892, when looking up transform from frame [iiwa_link_4] to frame [camera2_color_optical_frame]
[ERROR] [1666710494.842162637]: Transform cache was not updated. Self-filtering may fail. If transforms were not available yet, consider setting robot_description_planning/shape_transform_cache_lookup_wait_time to wait longer for transforms

Additional information: About Intel Realsense D435, by running rostopic echo -n 1 --offset /camera2/depth/color/points/header I have:

seq: 119072
  secs: -1
  nsecs: 943370104
frame_id: "camera2_color_optical_frame"

This implies that the camera timestamps are about 2 seconds behind the ros clock. Can this be a problem? Regarding this I also opened an issue (

About the robot, as with the cameras also on the robot side, I have a delay in timestamps; the internal clock of the robot cabinet is already synchronized with an NTP server on my machine. rostopic echo -n 1 --offset /iiwa/joint_states/header returns:

seq: 119681
  secs: -1
  nsecs: 999543966
frame_id: ''

About transformations, there is a static transformer that publishes the position of the cameras relative to the centre of the robot. Two relays combine the image of the cameras and pass them to Moveit.

node pkg="tf2_ros" type="static_transform_publisher" name="robot_to_cam1" args=" 0.05821913 0.28175833 0.11541144 0.00551897 -0.01045157 -0.23115234  0.97284577 world camera1_link"/>
    <node pkg="tf2_ros" type="static_transform_publisher" name="robot_to_cam2" args=" 0.01403957 -0.22283482  0.11573768 0.01757583 -0.00689987  0.1787106   0.98372049 world camera2_link"/>

  <node pkg="topic_tools" type="relay" name="camera_relay1" args="/camera1/depth/color/points /combined_cameras" />
  <node pkg="topic_tools" type="relay" name="camera_relay2" args="/camera2/depth/color/points /combined_cameras" />

This is my tf tree:

image description

In light of this I ask for your help in solving this problem. Could the difference in timestamps affect the transformation? How can I solve it?

edit retag flag offensive close merge delete