ros2 / ros2cli

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

Adds a timeout feature to rostopic echo #792

Closed arjo129 closed 1 year ago

arjo129 commented 1 year ago

Builds on top of:

This PR adds a --time-out feature which allows you to set the amount of time that rostopic echo should wait. This feature was requested by https://github.com/ros2/ros2cli/issues/529, however, we only added --once and no time out. I have a use case where this timeout could be useful hence I added it

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

fujitatomoya commented 1 year ago

test would be ideal, to check certain published messages are printed in specific time window until it times out.

i think you can refer to,

https://github.com/ros2/ros2cli/blob/cf020c0f0f90ded9aca6ebac806c78a387347a25/ros2topic/test/test_echo_pub.py#L393-L435

arjo129 commented 1 year ago

Thanks! Working on it.

clalancette commented 1 year ago

CI: