# How to solve delay in tf broadcast by robot_pose_ekf?

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:

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 close merge delete

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?

( 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.

( 2013-10-22 10:59:56 -0600 )edit

Sort by » oldest newest most voted

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.

more

## Stats

Seen: 1,378 times

Last updated: Jul 06 '14