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

How to solve delay in tf broadcast by robot_pose_ekf?

asked 2012-05-18 00:20:16 -0600

weiin gravatar image

I'm getting a weird problem that appeared suddenly even though no code was changed. I'm using robot_pose_ekf to get /odom->/base_footprint. It listens to only the wheel encoder odometry topic. robot_state_publisher broadcasts the rest of the robot transforms.

The problem that I noticed is the laser readings tend to follow the rotating robot base frame for a few milliseconds, before snapping back to the correct position with respect to the odom frame (fixed frame).

I've tried to recalibrate the robot's odometry but there is nothing wrong with the current parameters. There's also nothing obviously wrong with the laser readings (they read correct ranges).

So far I've traced a possible cause being the robot_pose_ekf broadcasting the /odom->/base_footprint transform with a slight delay. This is one of the output from tf_monitor:

RESULTS: for all Frames

Frames:
Frame: /base_footprint published by /robot_pose_ekf Average Delay: 0.026657 Max Delay: 0.256319
Frame: /base_link published by /robot_state_publisher Average Delay: -0.4933 Max Delay: 0
Frame: /front_wheel_link published by /robot_state_publisher Average Delay: -0.493298 Max Delay: 0
Frame: /gyro_link published by /robot_state_publisher Average Delay: -0.493296 Max Delay: 0
Frame: /laser published by /robot_state_publisher Average Delay: -0.493295 Max Delay: 0
Frame: /layer2_link published by /robot_state_publisher Average Delay: -0.493293 Max Delay: 0
Frame: /left_wheel_link published by /robot_state_publisher Average Delay: -0.195695 Max Delay: 0
Frame: /right_wheel_link published by /robot_state_publisher Average Delay: -0.195693 Max Delay: 0
Frame: /wheel_axis_link published by /robot_state_publisher Average Delay: -0.493292 Max Delay: 0

All Broadcasters:
Node: /robot_pose_ekf 15.0581 Hz, Average Delay: 0.026657 Max Delay: 0.256319
Node: /robot_state_publisher 22.4744 Hz, Average Delay: -0.294113 Max Delay: 0

The max delay as seen, is over 200ms. The question is, how do I fix this? I've tried to change the publish rate of the odometry, the robot_pose_ekf and the robot_state_publisher, but nothing seems to help. In fact, the average delay increases as the robot moves more.

Any ideas where I should be tweaking?

edit retag flag offensive close merge delete

Comments

I'd also worry about all the other max delays being zero. It's impossible to have an average delay of something and a max delay of zero. But I also notice that all the state_publisher delays are negative. Are you per chance running the EKF at a faster rate than the state_publisher?

Claudio gravatar image Claudio  ( 2013-03-29 01:20:57 -0600 )edit

The max delays being zero is an artifact of the initialization of the max at zero. Where all the values are negative.

tfoote gravatar image tfoote  ( 2013-10-22 10:59:56 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-07-06 23:48:42 -0600

tfoote gravatar image

updated 2014-07-06 23:49:48 -0600

The delay is a function of transport time, not frequency of publishing. (It's measuring the delta between the published timestamp and the current time of receipt. You probably are getting some form of network hiccup.

Half a second is a large delta and suggests that you might also have some synchronization issues between your computers.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2012-05-18 00:20:16 -0600

Seen: 2,060 times

Last updated: Jul 06 '14