0
$\begingroup$

Rosanswers logo

Hi

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.

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

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?

Edit:

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.

Originally posted by Hinas on ROS Answers with karma: 1 on 2016-07-13

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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: http://xyproblem.info/ )

EDIT

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.


Originally posted by ahendrix with karma: 47576 on 2016-07-13

This answer was ACCEPTED on the original site

Post score: 3

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.