ros2 / ros2cli

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

Adds a `--max-wait-time` option to ros2 topic pub #797

Closed arjo129 closed 1 year ago

arjo129 commented 1 year ago

When we run ros2 topic pub -w 1 ... we can wait for a fixed number of connections prior to shutting down. This is useful in many scenarios, however when writing automated tests it may be useful to time out if the correct number of connections are not recieved in a given amount of time. This PR adds a --max-wait-time option which allows users to set a timeout on how long to wait for subscribers.

Includes changes from #792

Signed-off-by: Arjo Chakravarty arjo@openrobotics.org

clalancette commented 1 year ago

With #792 now merged, this needs a rebase. I'll do a review once that happens (and it comes out of draft).

arjo129 commented 1 year ago

Closing in favor of #800