Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Not sure this is the case, but here is on the description how ROS dealing with /use_sim_time parameter:

If the /use_sim_time parameter is set, the ROS Time API will return time=0 until it has received a value from the /clock topic. Then, the time will only be updated on receipt of a message from the /clock topic, and will stay constant between updates.

For calculations of time durations when using simulation time, clients should always wait until the first non-zero time value has been received before starting, because the first simulation time value from /clock topic may be a high value.

So the problem can be with the nodes that do not take it into account.

P.S. In my experience such problem usually appears when nodes are using tf or when you try to visualize data in RViz.

Not sure this is the case, but here is on the description how ROS dealing with /use_sim_time parameter:

If the /use_sim_time parameter is set, the ROS Time API will return time=0 until it has received a value from the /clock topic. Then, the time will only be updated on receipt of a message from the /clock topic, and will stay constant between updates.

For calculations of time durations when using simulation time, clients should always wait until the first non-zero time value has been received before starting, because the first simulation time value from /clock topic may be a high value.

So the problem can be with the nodes that do not take it into account.

P.S. In my experience such problem usually appears when nodes are using tf or when you try to visualize data in RViz.