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

AMCL: Lookup would require extrapolation into the future. Requested time 1531474550.521278314 but the latest data is at time 1531474550.516698594, when looking up transform from frame [base_link] to frame [odom]

asked 2018-07-13 05:15:28 -0500

kuka_kuka gravatar image

updated 2018-07-13 06:24:43 -0500

Hi,

I am working with a real kuka youbot robot. When I run AMCL I get constantly the following warning and error:

[WARN] [1531475915.405190988]: Failed to compute odom pose, skipping scan (Lookup would require extrapolation into the future.  Requested time 1531475915.373467473 but the latest data is at time 1531475915.371227514, when looking up transform from frame [base_link] to frame [odom])

[ERROR] [1531475915.405592384]: Couldn't determine robot's pose associated with laser scan

When I launch Rviz and set the initial pose with "2D Pose Estimate", /initialpose topic echo's the following:

header: 
  seq: 0
  stamp: 
    secs: 1531476085
    nsecs: 404504998
  frame_id: "map"
  pose: 
  pose: 
    position: 
      x: -0.121083259583
      y: -0.0682992935181
      z: 0.0
    orientation: 
      x: 0.0
      y: 0.0
      z: 0.00537968781778
      w: 0.999985529375
  covariance: [0.25, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.25, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.06853891945200942]

And in the terminal running AMCL appears:

[ INFO] [1531476085.547250607]: Setting pose (1531476085.547161): -0.121 -0.068 0.011

But after that it continues throwing same warning and error mentioned before.

I can not attach TF tree, but it is: map -> odom -> base_footprint -> base_link -> ...And TF transformations are working right at a rate, respectively in those cases, (starting with map -> odom) of: 21.609, 42.11, 50.981.

Here are the results of tf_monitor:

RESULTS: for all Frames
Frames:
Frame: /camera_depth_frame published by unknown_publisher Average Delay: -0.2982 Max Delay: 0
Frame: /camera_depth_optical_frame published by unknown_publisher Average Delay: -0.297965 Max Delay: 0
Frame: /camera_rgb_frame published by unknown_publisher Average Delay: -0.297891 Max Delay: 0
Frame: /camera_rgb_optical_frame published by unknown_publisher Average Delay: -0.297604 Max Delay: 0
Frame: arm_link_0 published by unknown_publisher Average Delay: -0.696617 Max Delay: 0
Frame: arm_link_1 published by unknown_publisher Average Delay: -0.191182 Max Delay: 0
Frame: arm_link_2 published by unknown_publisher Average Delay: -0.19118 Max Delay: 0
Frame: arm_link_3 published by unknown_publisher Average Delay: -0.191179 Max Delay: 0
Frame: arm_link_4 published by unknown_publisher Average Delay: -0.191179 Max Delay: 0
Frame: arm_link_5 published by unknown_publisher Average Delay: -0.191178 Max Delay: 0
Frame: base_footprint published by unknown_publisher Average Delay: -0.190222 Max Delay: 0
Frame: base_laser_front_link published by unknown_publisher Average Delay: -0.696646 Max Delay: 0
Frame: base_link published by unknown_publisher Average Delay: -0.696637 Max Delay: 0
Frame: camera_link published by unknown_publisher Average Delay: -0.29782 Max Delay: 0
Frame: caster_link_bl published by unknown_publisher Average Delay: -0.189073 Max Delay: 0
Frame: caster_link_br published by unknown_publisher Average Delay: -0.189071 Max Delay: 0
Frame: caster_link_fl published by unknown_publisher Average Delay: -0.18907 Max Delay: 0
Frame: caster_link_fr published by unknown_publisher Average Delay: -0.189069 Max Delay: 0
Frame: gripper_finger_link_l ...
(more)
edit retag flag offensive close merge delete

Comments

1

First check that all computer in your ROS network share the same time. Its recommended to synchronized them with ntp.

Humpelstilzchen gravatar image Humpelstilzchen  ( 2018-07-13 07:20:04 -0500 )edit

All nodes (except Rviz) are running on same machine

kuka_kuka gravatar image kuka_kuka  ( 2018-07-16 05:16:41 -0500 )edit

The timestamps 1531475915.373467473 and 1531475915.371227514 are about 2ms apart, is it always that close? To what value have you set the amcl parameter transform_tolerance? Can you post a sample of your scan?

Humpelstilzchen gravatar image Humpelstilzchen  ( 2018-07-16 05:47:54 -0500 )edit

Time difference varies between 0-5 ms. Transform tolerance is set to default (0.1) and modifying it to 0.5 does not make any change. You mean the result of the 2D map scan? The .yaml and .pgm files? Scan is made using gmapping.

kuka_kuka gravatar image kuka_kuka  ( 2018-07-16 06:40:20 -0500 )edit

.yaml file:

image: my_map.pgm resolution: 0.050000 origin: [-5.000000, -5.000000, 0.000000] negate: 0 occupied_thresh: 0.65 free_thresh: 0.196

I think I cant attach images so I cant show the .pgm 2D map, but I think it is quite good. By the way, thank you for your help :)

kuka_kuka gravatar image kuka_kuka  ( 2018-07-16 06:42:06 -0500 )edit

The output of a single rostopic echo /scan (or whatever your scan topic is)

Humpelstilzchen gravatar image Humpelstilzchen  ( 2018-07-16 07:19:37 -0500 )edit

Cheader: seq: 74 stamp: secs: 1531743667 nsecs: 581998729 frame_id: odom angle_min: -0.546698212624 angle_max: 0.546698212624 angle_increment: 0.00171110546216 time_increment: 0.0 scan_time: 0.0329999998212 range_min: 0.449999988079 range_max: 10.0

kuka_kuka gravatar image kuka_kuka  ( 2018-07-16 07:21:57 -0500 )edit

ranges: [nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, 3.259399652481079, 3.256758689880371, 3.281576156616211, 3.2762844562530518, 3.273649215698242, 3.2710208892822266, 3.2957406044006348, 3.293104410171509, 3.290475368499756 ...

kuka_kuka gravatar image kuka_kuka  ( 2018-07-16 07:22:27 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2018-07-16 09:03:49 -0500

kuka_kuka gravatar image

Thanks to "Humpelstilzchen" I was able to solve this issue. Laser frame was set to /odom instead of to /camera_link. After setting frame to /camera_link amcl warnings and errors dissapeared.

edit flag offensive delete link more

Comments

where do you configure this?

aarontan gravatar image aarontan  ( 2018-07-27 11:55:03 -0500 )edit

As I am working with a Kinect and not with a real laser I use a package that simulates the usage of a laser from the depth cloud received by Kinect. That package is called "depthimage_to_laserscan" and one of the parameters is "output_frame_id". I set that parameter to "camera_link":

kuka_kuka gravatar image kuka_kuka  ( 2018-08-14 06:42:21 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2018-07-13 05:15:28 -0500

Seen: 5,147 times

Last updated: Jul 16 '18