Closed PerrineAguiar closed 7 years ago
FYI @adamantivm @jubeira
@PerrineAguiar Code changes are LGTM. Do you intend to merge this or should we keep it in a feature branch to avoid having forwards-backwards changes in master?
Some questions that could help tracking down the actual timestamp issue: Do you have an idea why the timestamp is wrong? How big is the offset? Is the time offset due to accuracy or due to an error in the calculation? Is the offset always constant?
@mcopejans Thanks for the review. I would merge this PR (but keep the issue opened) as this is blocking Ekumen at the moment.
The reason of the issue is explained in #299. The problem comes from the calculation of the offset and the fact that we do not have a way to convert Tango time to system time. The error of the offset seems to be between 0.09 to 0.18 s (values taken from tf exceptions when trying to use the Tango ROS Streamer with the navigation stack). It varies between runs and also during the same run.
@jubeira @adamantivm @mcopejans I am now using CLOCK_BOOTTIME as suggested by Ian. This allows us to calculate accurately the time offset between Tango and ROS. I tested it with the turtlebot and the navigation stack and it seems to resolve the tf issue.
This fixes #299.