Skip to content

ROS Time API and Simulation Time #102

@josephcoombe

Description

@josephcoombe

The hebiros_node and hebiros_gazebo_plugin codes should support the following interaction between the ROS Time API and Simulation Time.

In order for a ROS node to use simulation time according to the /clock topic, the /use_sim_time parameter must be set to true before the node is initialized. This can be done in a launchfile or from the command line.

It's worth mentioning that while "roslaunch does not guarantee any particular order to the startup of nodes", parameters set in a .launch file "will be stored on the Parameter Server before any nodes are launched."

If the /use_sim_time parameter is set, the ROS Time API will return time=0 until it has received a value from the /clock topic. Then, the time will only be updated on receipt of a message from the /clock topic, and will stay constant between updates.

For calculations of time durations when using simulation time, clients should always wait until the first non-zero time value has been received before starting, because the first simulation time value from /clock topic may be a high value.

(from http://wiki.ros.org/Clock#Using_Simulation_Time_from_the_.2BAC8-clock_Topic)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions