ros2 / ros2cli

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

Allow configuring liveliness in ros2 topic echo and pub #788

Closed ivanpauno closed 1 year ago

ivanpauno commented 1 year ago

For a subscription to have manual_by_topic liveliness, it means that it requires publishers to provide manual_by_topic liveliness (i.e. if not it won't match). When a publisher uses manual_by_topic liveliness, liveliness is asserted when either a message is published or is asserted manually. ros2 topic pub will only assert liveliness through publishing messages, and never manually. Though this is not more useful than automatic liveliness, it's useful for testing. e.g. you have a subscription requiring manual_by_topic liveliness and you want ros2 topic pub to match it.

Also, deduplicated some code.

ivanpauno commented 1 year ago

Theres some test failures which might be related to the removed code.

Thanks, fixed those in https://github.com/ros2/ros2cli/pull/788/commits/b341ee576b4687d8cba5b8e8b0bba5e66a3f8825. This PR now depends on a minor addition to rclpy.

ivanpauno commented 1 year ago
ivanpauno commented 1 year ago

@fujitatomoya we needed to merge https://github.com/ros2/rclpy/pull/1062 first. I merged that now, so it should be fine.

fujitatomoya commented 1 year ago

@ivanpauno sorry, i missed that dependency. thanks!