Skip to content
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

Add unit tests to cover message's send and received timestamps during recording #1641

Conversation

MichaelOrlov
Copy link
Contributor

@MichaelOrlov MichaelOrlov commented May 7, 2024

- 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]>
@MichaelOrlov MichaelOrlov marked this pull request as ready for review May 7, 2024 04:43
@MichaelOrlov MichaelOrlov requested a review from a team as a code owner May 7, 2024 04:43
@MichaelOrlov MichaelOrlov requested review from gbiggs, jhdcs, clalancette and marcoag and removed request for a team, gbiggs and jhdcs May 7, 2024 04:43
Copy link
Contributor

@fujitatomoya fujitatomoya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm with green CI. Good eye 🚀

Copy link
Contributor

@ahcorde ahcorde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Collaborator

@emersonknapp emersonknapp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM except for typo

rosbag2_transport/src/rosbag2_transport/recorder.cpp Outdated Show resolved Hide resolved
- Also fixed typo in 'rwm_has_send_timestamp_support' in test

Signed-off-by: Michael Orlov <[email protected]>
- 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]>
@clalancette
Copy link
Contributor

So with ros2/rmw_cyclonedds#491 now merged, this one isn't strictly required. Totally up to you if you want to add in the additional tests here, but I'm going to suggest that if we do that, we do not backport to Jazzy at this time.

@MichaelOrlov MichaelOrlov changed the title Workaround for zeros in a message's received timestamp with CycloneDDS Add unit tests to cover message's send and received timestamps during recording May 9, 2024
@MichaelOrlov
Copy link
Contributor Author

Pulls: #1641
Gist: https://gist.githubusercontent.com/MichaelOrlov/b31de407050b0f1ce7f4267923e2042d/raw/782365b24d4f679263c4bb60019c89c25a2e7a43/ros2.repos
BUILD args: --packages-above-and-dependencies rosbag2_transport
TEST args: --packages-above rosbag2_transport
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/13855

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

@MichaelOrlov MichaelOrlov merged commit b7d9b5b into rolling May 9, 2024
14 checks passed
@delete-merged-branch delete-merged-branch bot deleted the morlov/workaround-for-zeros-in-received_timestamps-with-cyclone_dds branch May 9, 2024 20:51
@MichaelOrlov
Copy link
Contributor Author

https://github.com/Mergifyio backport jazzy

Copy link

mergify bot commented May 23, 2024

backport jazzy

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request May 23, 2024
… 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)
MichaelOrlov added a commit that referenced this pull request May 25, 2024
… 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rosbag2 does not work at all with CycloneDDS on Jazzy
6 participants