-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set received_timestamp to system_clock::now() in message_info #491
Set received_timestamp to system_clock::now() in message_info #491
Conversation
MichaelOrlov
commented
May 7, 2024
- Relates Add unit tests to cover message's send and received timestamps during recording rosbag2#1641
- Fixes Rosbag2 does not work at all with CycloneDDS on Jazzy rosbag2#1638
Signed-off-by: Michael Orlov <[email protected]>
cc: @clalancette |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One really minor fix, then this looks great to me.
Co-authored-by: Chris Lalancette <[email protected]> Signed-off-by: Michael Orlov <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me with green CI! Thanks for doing this.
Pulls: #491 |
Signed-off-by: Michael Orlov <[email protected]>
Pulls: #491 |
Ah, so the tests failing in CI are related. The problem is that now that we have timestamp support, we need to update https://github.com/ros2/rcl/blob/f19067726b9bc2d0b90ac0d0f246d1d7821d41ee/rcl/test/CMakeLists.txt#L298-L316 to enable RMW_TIMESTAMPS_SUPPORTED for |
Here is new CI with both this and ros2/rcl#1156: |
Signed-off-by: Chris Lalancette <[email protected]>
CI revealed that we also have to update the receive_timestamp for services. That should fix some of the failing tests in CI, but @MichaelOrlov there are quite a number of failing tests for rosbag2 as well. Can you take a look at those? |
@clalancette I will take a look |
@clalancette It is a bit unexpected error in rosbag2 player
|
In rosbag2 Player, we use
It seems, for some reason, the |
@clalancette I've tried to checkout changes from this PR and from dependent ros2/rcl#1156 and build everything from scratch on my local machine. All rosbag2 tests passing on my local setup either with |
Hm, that's weird. On my local setup, I can reproduce the errors with no problem. That said, we definitely have a bug in rclcpp_lifecycle caused by ros2/rclcpp#2450 . In particular, this is causing errors to happen in CI ever since it has been merged:
I think this happens because the |
@clalancette I figured out that I have a bit outdated versions of the other packages (about 3 weeks old). It might explain why test passes on my local setup. I am trying to update the |
I'll also point out eProsima/Fast-DDS#4681 , which is suspiciously in this same area. I suspect maybe that one has a problem; if we fail again in CI, I'm going to try going earlier than that commit and seeing if that is the problem. |
No luck in reproducing failures with the latest rclcpp on my local setup.
And i have the same version in my local setup. |
Hm, from another hand, the rosbag2 tests failed on CI only with |
That's not pinned; it takes the latest from the 2.14.x branch. |
@clalancette Ok this is certainly the |
@clalancette It seems you were right about eProsima/Fast-DDS#4681. |
@clalancette I confirm that eProsima/Fast-DDS#4681 is a source of errors in rosbag2 Player with messages:
We can start preparing reverting PR. Don't need to wait until CI will finish. |
Here's a PR to pin us back to a known working version of Fast-DDS: ros2/ros2#1560 |
- The fix will be done on the `rmw_cyclonedds` layer in the scope of the ros2/rmw_cyclonedds#491 Signed-off-by: Michael Orlov <[email protected]>
All right, CI in #491 (comment) was successful, and we've now pinned that version in both Rolling and Jazzy. With that, this is approved alongside ros2/rcl#1156 , so I'm going to merge both of them and backport both to |
@Mergifyio backport jazzy |
✅ Backports have been created
|
* Set received_timestamp to steady_clock::now() in message_info * Use 'system_clock' instead of 'steady_clock' * Also update receive_timestamp for services. Signed-off-by: Michael Orlov <[email protected]> Signed-off-by: Chris Lalancette <[email protected]> (cherry picked from commit 76c9d8f)
… recording (#1641) * Workaround for zeros in a message's received timestamp with CycloneDDS - CycloneDDS doesn't support 'received_timestamps' and settling up zeros in message_info for that field. - Fallback to the timestamp from node clock in case of the CycloneDDS. Signed-off-by: Michael Orlov <[email protected]> * Fix typo in rmw_has_received_timestamp_support Signed-off-by: Michael Orlov <[email protected]> * Add one more check in tests that "recv_timestamp >= send_timestamp" - Also fixed typo in 'rwm_has_send_timestamp_support' in test Signed-off-by: Michael Orlov <[email protected]> * Revert workaround for `rmw_cyclonedds` in recorder.cpp - The fix will be done on the `rmw_cyclonedds` layer in the scope of the ros2/rmw_cyclonedds#491 Signed-off-by: Michael Orlov <[email protected]> --------- Signed-off-by: Michael Orlov <[email protected]>
…493) * Set received_timestamp to steady_clock::now() in message_info * Use 'system_clock' instead of 'steady_clock' * Also update receive_timestamp for services. Signed-off-by: Michael Orlov <[email protected]> Signed-off-by: Chris Lalancette <[email protected]> (cherry picked from commit 76c9d8f) Co-authored-by: Michael Orlov <[email protected]>
… recording (#1641) * Workaround for zeros in a message's received timestamp with CycloneDDS - CycloneDDS doesn't support 'received_timestamps' and settling up zeros in message_info for that field. - Fallback to the timestamp from node clock in case of the CycloneDDS. Signed-off-by: Michael Orlov <[email protected]> * Fix typo in rmw_has_received_timestamp_support Signed-off-by: Michael Orlov <[email protected]> * Add one more check in tests that "recv_timestamp >= send_timestamp" - Also fixed typo in 'rwm_has_send_timestamp_support' in test Signed-off-by: Michael Orlov <[email protected]> * Revert workaround for `rmw_cyclonedds` in recorder.cpp - The fix will be done on the `rmw_cyclonedds` layer in the scope of the ros2/rmw_cyclonedds#491 Signed-off-by: Michael Orlov <[email protected]> --------- Signed-off-by: Michael Orlov <[email protected]> (cherry picked from commit b7d9b5b)
… recording (#1641) (#1673) * Workaround for zeros in a message's received timestamp with CycloneDDS - CycloneDDS doesn't support 'received_timestamps' and settling up zeros in message_info for that field. - Fallback to the timestamp from node clock in case of the CycloneDDS. Signed-off-by: Michael Orlov <[email protected]> * Fix typo in rmw_has_received_timestamp_support Signed-off-by: Michael Orlov <[email protected]> * Add one more check in tests that "recv_timestamp >= send_timestamp" - Also fixed typo in 'rwm_has_send_timestamp_support' in test Signed-off-by: Michael Orlov <[email protected]> * Revert workaround for `rmw_cyclonedds` in recorder.cpp - The fix will be done on the `rmw_cyclonedds` layer in the scope of the ros2/rmw_cyclonedds#491 Signed-off-by: Michael Orlov <[email protected]> --------- Signed-off-by: Michael Orlov <[email protected]> (cherry picked from commit b7d9b5b) Co-authored-by: Michael Orlov <[email protected]>