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

Revision history [back]

click to hide/show revision 1
initial version

A time of zero means that time has not been initialized. Time documentation

It will have needed to check the parameter server for use_sim_time and then fallen back to wall clock time. (Or if you're in a simulator to have recieved a /clock signal.)

The reason it's not publishing is a similar problem that you're calling publish before the publisher has estabilized a connection with the subscribers. It's not uncommon for a message published immediately after a publisher is created to not be received.

A time of zero means that time has not been initialized. Time documentation

It will have needed to check the parameter server for use_sim_time and then fallen back to wall clock time. (Or if you're in a simulator to have recieved a /clock signal.)

The reason it's not publishing is a similar problem that you're calling publish before the publisher has estabilized a connection with the subscribers. It's not uncommon for a message published immediately after a publisher is created to not be received.

Edit:

As mentioned in the docs. A common approach is to loop waiting for non-zero time now values. (The duration sleep implicitly does this.)