0
$\begingroup$

Rosanswers logo

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?


Originally posted by weiin on ROS Answers with karma: 2268 on 2012-05-18

Post score: 2


Original comments

Comment by lindzey on 2012-06-11:
possibly related question: http://answers.ros.org/question/36232/clear-obstacles-resulting-from-skewed-laserscan/#36256

Comment by Claudio on 2013-03-29:
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?

Comment by tfoote on 2013-10-22:
The max delays being zero is an artifact of the initialization of the max at zero. Where all the values are negative.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by tfoote with karma: 58457 on 2014-07-06

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.