Skip to content

add --keep-alive option to 'topic pub'#544

Merged
dirk-thomas merged 1 commit intomasterfrom
dirk-thomas/ros2topic-pub-keep-alive
Jun 30, 2020
Merged

add --keep-alive option to 'topic pub'#544
dirk-thomas merged 1 commit intomasterfrom
dirk-thomas/ros2topic-pub-keep-alive

Conversation

@dirk-thomas
Copy link
Copy Markdown
Member

The new option allows to make the currently hard coded sleep before exiting configurable. It also change the logic to apply that sleep for times != 1 since even when publishing multiple messages it makes sense to wait after the last one to ensure it is published to the wire.

CI builds testing ros2topic:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
@dirk-thomas dirk-thomas added the enhancement New feature or request label Jun 30, 2020
@dirk-thomas dirk-thomas self-assigned this Jun 30, 2020
Comment thread ros2topic/ros2topic/verb/pub.py
@dirk-thomas dirk-thomas merged commit ce19bca into master Jun 30, 2020
@delete-merged-branch delete-merged-branch Bot deleted the dirk-thomas/ros2topic-pub-keep-alive branch June 30, 2020 21:48
craigh92 pushed a commit to craigh92/ros2cli that referenced this pull request Jul 17, 2020
Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
Signed-off-by: Craig Hickman <craig.hickman@ukaea.uk>
sloretz pushed a commit that referenced this pull request Sep 10, 2020
Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
sloretz added a commit that referenced this pull request Sep 10, 2020
…nsient_local and longer keep-alive for pub tests (#546) Use reliable QoS for ros2topic tests (#555) (#565)

* add --keep-alive option to 'topic pub' (#544)

Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>

* Give kwarg default value for backporting

keep_alive is made a keyword argument with a default value of 0.1 so the
pull request can be backported.

Signed-off-by: Shane Loretz<sloretz@openrobotics.org>
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>

* use transient_local and longer keep-alive for pub tests (#546)

* use transient_local and longer keep-alive for pub tests

Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>

* add comment to document unit of --keep-alive

Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>

* Use reliable QoS for ros2topic tests (#555)

The TestROS2TopicCLI tests perform feature testing of the ros2topic
command line interface. If the system is under stress during these
tests, messages may be lost (by design). If that happens, there is a
fairly high likelihood that the test_topic_pub_once test will fail
because there is only one opportunity for the message to be successfully
transported. We're likely dropping other messages in this suite, but the
other tests continuously publish until one of the messages is received
(or a timeout occurs), making them significantly less likely to fail.

Using the 'reliable' setting for QoS reliability seems to make the tests
consistently pass, even when the system is placed under additional
stress.

Signed-off-by: Scott K Logan <logans@cottsay.net>
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>

Co-authored-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
Co-authored-by: Scott K Logan <logans@cottsay.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants