Page 1 of 1

Problems with tf due to time jumps

PostPosted: Mon 25. Aug 2014, 14:01
by proprentnerl
Hello!

I have some serious problems with the time jumps back to 0 when starting a new task.

I am starting a script which uses roslaunch to launch my nodes in the background and then launches a coordinator node to load the different tasks.
I got no errors when starting the script for the first time.
Now when I start the script again, which resembles changing a task I get an TF_OLD_DATA error almost all the time because of the time jump back to 0 when starting the new task.
I read that tf is not robust against time jumps and i suspect that the old transforms are buffered in the roscore started by the simulator or the euroc interface node.

Is there something I have missed?
Thanks
Lukas

Posted: Mon 25. Aug 2014, 14:01
by Advertising

Re: Problems with tf due to time jumps

PostPosted: Mon 25. Aug 2014, 14:25
by Peter Lehner
Hi Lukas,

I have found this at http://wiki.ros.org/tf/Errors%20explained:

The most common cause of TF_OLD_DATA warnings are if rostime has gone backwards. This can be caused by restarting a bag playback or restarting a simulator. The fix for this is to send an Empty message to the topic /reset_time. There is a button in rviz to do this.


Can you try if this works for you? If yes, we will consider adding the mechanism to the task selection procedure in the next release.

Kind regards
Peter

Re: Problems with tf due to time jumps

PostPosted: Mon 25. Aug 2014, 14:36
by proprentnerl
neither publishing this message to the topic nor pressing reset in rviz solves my problem.
only the elapsed time in rviz gets resetted.

the following sequence works:
select a task, wait for the task to finish loading und new /clock being published, use roslaunch to start all your nodes.
so it seems that I need to relaunch all my nodes when selecting a new task and after the new /clock is being published.

Re: Problems with tf due to time jumps

PostPosted: Mon 25. Aug 2014, 15:39
by Peter Lehner
proprentnerl wrote:the following sequence works:
select a task, wait for the task to finish loading und new /clock being published, use roslaunch to start all your nodes.
so it seems that I need to relaunch all my nodes when selecting a new task and after the new /clock is being published.


Okay, then please use this solution. Sadly this is a current limitation of ROS and we cannot provide an alternative.

Best,
- Peter

Re: Problems with tf due to time jumps

PostPosted: Wed 27. Aug 2014, 12:09
by proprentnerl
ROS really can't handle time jumps...
Will we only have to solve 6 tasks for the final evaluation?
I need to kill some nodes from my script before starting a new task I need the number of tasks we need to finish.

Currently I start a coordinator, than launch all my nodes in the background and launch a blocking node.
When the first task is complete I call a services which terminates the blocking node and goes further in the script killing nodes relaunching them.

regards
Lukas

Re: Problems with tf due to time jumps

PostPosted: Wed 27. Aug 2014, 12:30
by Peter Lehner
proprentnerl wrote:ROS really can't handle time jumps...
Will we only have to solve 6 tasks for the final evaluation?


Yes, the number of tasks is fixed to 6 in the final evaluation. Note however that task 2 and 4 consists of 3 different versions, which gives you an overall count of 10 simulation runs.

Nevertheless you can dynamically check the number of individual tasks within a bash script by calling the list_scenes callback. For example with:
Code: Select all
rosservice call /euroc_c2_task_selector/list_scenes | grep task_name -c