Skip to content

Respect the use_sim_time parameter for rclpy nodes #240

Closed

Description

@dhood

There is support for Clocks that use ROS Time as described in this design document. It was added in this PR.

Clocks can be set to have ROS time "active" (will use the value seen on the /clock topic as its time) by calling time_source.ros_time_is_active = True.

A node has a time source associated with it (added in #210). At the time of that PR, parameters were not available in rclpy, so the node's time source does not respond to the use_sim_time parameter:

# TODO(dhood): use sim time if parameter has been set on the node.

As of #214, parameters are available in rclpy.

Tasks to get rclpy nodes to respond to the use_sim_time parameter:

  • Add a parameter callback that detects if use_sim_time has been set on the node.
  • Add tests that the node's clock output matches what's expected based on the combination of use_sim_time parameter and the presence of a /clock publisher. These are the tests in rclcpp.

Activity

  1. added
    enhancement
    help wanted
    good first issue
    on Sep 20, 2018
  2. added this to the crystal milestone on Sep 20, 2018
  3. shivangg commented on Sep 25, 2018

    @shivangg

    @dhood I'd like to work on this issue. Can you assign it to me?

  4. sloretz commented on Sep 25, 2018

    @sloretz
    Contributor

    @shivangg Thanks!

    I can't assign the issue to you (isaacs/github#100), but your contribution is still very welcome. When you make a pull request add the text connects to ros2/rclpy#240 to the PR description. That will link the PR and issue on the waffle board.

  5. mkhansenbot commented on Nov 14, 2018

    @mkhansenbot

    @shivangg - I'm in need of this functionality now for testing ROS2 Navigation, did you get this to work?

  6. jacobperron commented on Apr 1, 2019

    @jacobperron
    Member

    Resolved by #297

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementgood first issuehelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions