Skip to content

When would a TimeSource manage multiple clocks? #516

Closed

Description

@dhood

A TimeSource can manage multiple Clocks (from the design doc and the rclcpp implementation).

Currently all clocks attached to a TimeSource use the same property for use_sim_time, and the time for each clock gets set to whatever is received on the /clock topic. What is the anticipated use case for having multiple clocks managed by a single time source? (all clocks attached to a TimeSource seem to behave the same at the moment, but that may just be a "for now" thing).

Is the predicted end state that multiple nodes' clocks are managed by a single TimeSource, but each clock would be able to have its use of sim time enabled/disabled independently? (Currently the use of sim time for each node is configured independently because each node has its own time source).

Activity

  1. added
    question
    on Jul 17, 2018
  2. self-assigned this
    on Jul 17, 2018
  3. tfoote commented on Jul 25, 2018

    @tfoote
    Contributor

    What is the anticipated use case for having multiple clocks managed by a single time source? (all clocks attached to a TimeSource seem to behave the same at the moment, but that may just be a "for now" thing).

    The different clocks can have different callbacks registered on them. Thus you may want different clocks with different scopes. There's generally expected to be a one to one Time Source -> Clock ratio in most use cases. But with it's much smaller dependency the Clock can be integrated into libraries w/o incurring the cost of the full communication integration. For example as I just talked with @sloretz the tf2_ros::Buffer will need to be passed a Clock reference but does not need to have any external communications to operate.

    We could consider pulling Clock Time and Duration out into a separate package outside of rclcpp but I think that would be more overhead than it's worth.

    Is the predicted end state that multiple nodes' clocks are managed by a single TimeSource, but each clock would be able to have its use of sim time enabled/disabled independently?

    If the clocks are managed by the same time source they're expected to have the same sim time. The timesource can only be associated with one node.

  4. dhood commented on Jul 25, 2018

    @dhood
    MemberAuthor

    Having different jump handlers for different clocks is what made the picture clearer to me, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

question

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions