ros2 / ros2cli

ROS 2 command line interface tools
Apache License 2.0
172 stars 161 forks source link

[ros2 topic hz/bw/pub] support use_sim_time #752

Closed fujitatomoya closed 1 year ago

fujitatomoya commented 2 years ago

Feature request

Feature description

Implementation considerations

follow up from https://github.com/ros2/ros2cli/issues/515

llapx commented 2 years ago

Hi all,

the fix is completed, thanks for review.

fujitatomoya commented 2 years ago

@clalancette @ivanpauno @wjwwood what do you think about these extension? these are come from our actual use cases, can you share your thoughts?

ivanpauno commented 2 years ago

+1 In ros 1 use_sim_time was set in the parameter server, so rostopic automatically was able to detect if sim time needed to be used. Now we will need an explicit way to ask for sim time to be used in ros2 topic.

We could also by default check if there's someone publishing to /clock, and set use_sim_time based on that by default, but I'm not sure that's a good idea or not.

I would start by adding the option of explicitly setting simulation time, and later on we can see if the default behavior is changed or not.

fujitatomoya commented 1 year ago

https://github.com/ros2/ros2cli/pull/754 is merged, close this issue.