Hello ROS community !
I have question about Time in ROS (I'm in Fuerte on Ubuntu 12.04). Let me explain the situation : I have a basic simulator written with ROS, that receive an /action topic, publish a /perception topic, with the relevant custom messages. On the other hand, I have two nodes, a Perceptive one, that transform perception into state, and a Controller that use state and compute an action, that is sent to the simulator. The connection is :
Simulator -> /perceptiontopic -> (Percept -> /state -> Controller) -> /action -> Simulator
All my nodes are firing Timers at a certain NODERATE that trigger (or not):
world update for the Simulator : if the relevant time in second has gone, the world changes. The world change is independent from the NODERATE itself has the world evolution has its own "dynamic".
Perception update and State publishing for the perceptive node : if we received a /perception message or some time in second has gone, we publish a /state message. The involved durations are also independent from NODERATE.
Action computation for the Controller. When it receives a /state message, it computes the action message and publish it to the simulator.
I'm wondering about the time consistency as my simulator doesn't publish a /clock topic (nor my others nodes subscribe to /clock). I had the same NODERATE for the simulator and others nodes and a certain behavior. I changed the Perceptive and Controller nodes' NODERATE (lower than simulation one) and now the behaviour is different. In my understanding, it shouldn't as the time aspects of my nodes are supposed to be independent.
Is it necessary to have a /clock (from the simulator) to ensure time consistency between nodes that commuicate together ?
If so, what time should my simulator publish ? A ros::Time::now() (+/use_sim_time setup) ? How my perceptive and control nodes handle that ? Should they explicitly subscribe to /clock and have a callback on that ? What's the difference with my ros::Timer ?
I understand that no realtime is guaranteed with such tools, but what is the range of frequency / period ROS can handle without risk of inconsistency ?
Thanks for reading, Erwan
Post score: 0