Ask Your Question

Use simulated time with some nodes while running other nodes with wall time

asked 2016-07-13 01:54:31 -0500

Hinas gravatar image

updated 2016-07-14 02:01:43 -0500


I am trying to run some nodes with simulated time while running other nodes with wall time (same rosmaster). I used the following launch configuration.

<param name="pi/use_sim_time" value="true" />
<node name="talker" pkg="demo1" type="talker" />
<node name="listerner" pkg="demo1"  type="listener" ns="pi"  /> 

My expectation was listerner should use simulated time and talker should use wall time. But neither of them do so. It seems all ros nodes are using the global parameter "use_sim_time" to change the timing mode. Are there any other way to do this?


I run master node in my computer and various other nodes in different raspberry Pis and other computers. I need to synchronize the time of all nodes to my computers time to measure the processing and transmission delays of nodes. NTP is not a good option here.

  1. My Pis does not have access to Internet or any other common network.
  2. I think it is really expensive to setup and maintain my own NTP server in my computer
  3. I do not like to touch the system time of other computers.
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-07-13 02:14:18 -0500

ahendrix gravatar image

updated 2016-07-14 02:12:02 -0500

Many ROS nodes use the clock (simulated or wall time) to timestamp messages, synchronize different data streams, and coordinate actions. Therefore, having nodes that use simulated time talk to nodes using the wall clock is not a good idea and therefore it is not supported.

If you explain why you want to do this, perhaps the community can suggest a better solution to your actual problem (see: )


Setting up an NTP server is not hard and it does not require any additional hardware. The ROS NetworkSetup recommends using Chrony as the NTP server and client software.

I strongly recommend that you run the NTP server on the same machine as your ROS master, since it will be reachable from all of the other computers.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2016-07-13 01:54:31 -0500

Seen: 89 times

Last updated: Jul 14 '16