question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`ros2 topic pub` doesn't publish until after first period has expired

See original GitHub issue

Bug report

Required Info:

  • Operating System:
    • Ubuntu 20.04, arm64
  • Installation type:
    • Debian packages
  • Version or commit hash:
    • ROS Rolling, package version 0.13.0-1
  • DDS implementation:
    • CycloneDDS
  • Client library (if applicable):
    • rclpy

Steps to reproduce issue

In terminal 1, run:

ros2 topic echo /talker std_msgs/msg/String

In terminal 2, run:

ros2 topic pub -r 0.1 /talker std_msgs/String "data: Hello World"

(that is, publish once every 10 seconds)

Expected behavior

The ros2 topic pub command would publish, then sleep for 10 seconds, then publish, sleep for 10 seconds, etc.

Actual behavior

The ros2 topic pub command sleeps for 10 seconds, then publishes, then sleeps for 10 seconds, then publishes, etc.

Additional information

You could argue that the current way is not wrong, but I think it is unexpected behavior for the user.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
clalancettecommented, Apr 19, 2021

but one use case that i think of is, if frequency is long enough (like 10 seconds), probably waiting that time window until 1st message would be not really useful.

Yeah, that’s exactly where I ran into it. My example above is a very long time period, and thus the initial message doesn’t get published until after the first 10 seconds.

This honestly isn’t a huge deal; I doubt too many people are using a 0.1 Hz rate. I still think it should be fixed, but changing behavior at this point in Galactic is probably a bad idea. I’ll move it to the H-Turtle board instead.

0reactions
clalancettecommented, May 13, 2021

Yes, we can close this now. Thank you for the implementation!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Temporary Increase of the Automatic Extension Period of ...
The noncitizen's eligibility to apply for employment authorization continues notwithstanding the expiration of the EAD and is based on an ...
Read more >
License Search Tips, Status Definitions, Forms and ... - TN.gov
Always check the “Status” and the “Expiration Date” to see if the licensee is properly licensed, as well as the “Name” and the...
Read more >
Managing Intellectual Property in the Book Publishing Industry
The publisher will have to enter into a legal relationship with the creator – author/writer of a manuscript – in order to publish...
Read more >
POST EMPLOYMENT - Louisiana Ethics Administration Program
Generally there is a two year waiting period before a former public servant can render services relating to his former state agency to...
Read more >
2023 Publication 15 - IRS
Pub. 15, such as legislation enacted after it was published ... Starting in the first quarter of 2023, the payroll tax credit is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found