ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

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

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.
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

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: 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.

edit flag offensive delete link more

Question Tools

Stats

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

Seen: 226 times

Last updated: Jul 14 '16