ROS time and /clock topic in NRP


How can I configure ROS time to use wall time? Is it possible at all?

Currently /clock is only published when an experiment is running. This /clock uses simulated time (which is approx 4 times faster than wall time). As we interface with the hardware robot, the ROS time in NRP ideally uses the wall time, but I did not find any setting for that.


Dear missxa,

The time published on /clock by gazebo is decided (indirectly) by the CLE loop.
In fact, the CLE asks gazebo to advance the simulation of a timestep; simulating causes gazebo to publish on /clock.
Sadly, it’s not possible to modify that behavior.
It is possible, though, to run Transfer Functions outside the CLE loop, triggered by some ROS message (see the user guide)

Morevover, the NRP sets the ROS parameter /use_sim_time (description here) here.
Once commented that line out, every call to should return the wall time.

I hope it can help you.