0
$\begingroup$

Rosanswers logo

supposed that i have two broadcasters that declare my robot's frame transformation (odom->base_link, base_link->base_laser), which are written in two different python files, (cuz it's convenient for me to manage the stack since the robot has many modules ); and i find the "odometry" tag just turn red and blue(error and OK) from time to time when i view the gmapping process in rviz. If i write them in the same python file, the problem is solved. I think it's a synchronization problem that the tf should be broadcasted in a same time. However, i just want to know, is there any solutions to that if I really want to write them in different python files?


Originally posted by Kent on ROS Answers with karma: 140 on 2012-11-14

Post score: 1


Original comments

Comment by Flowers on 2012-11-14:
I guess that this happens because both transformations use ros::time as source for the broadcasts timestamp - dunno what to do there, maybe you can simply check the last time stamp of one file in the other.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I guess the problem is not directly a synchronization problem but expected behavior given the setup you are using. There are just points in time where your transform odom->base_link has not been published yet for a specific time stamp but base_link->base_laser is there already. The easiest way to solve this is to increase the publish rate of your transforms. 30-50Hz should be fine.

Another common approach, in particular followed by amcl, is to future-date transforms. See here and here.


Originally posted by Lorenz with karma: 22731 on 2012-11-14

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

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