-
Notifications
You must be signed in to change notification settings - Fork 258
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
Upstream quality changes from Apex.AI part 1 #1903
Upstream quality changes from Apex.AI part 1 #1903
Conversation
893afc6
to
8c86347
Compare
There are a few failures on CI that need to be addressed. Turning this PR back to draft. |
0cde47c
to
c35e501
Compare
Ok. Now the CI is green and this PR is ready for review. |
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.
Minor changes.
Also, you don't really need to mention/frame the title of this PR as a "sync with Apex.AI" |
- It could be some residual subscriptions in list in case if previous call to Recorder::record() failed for some reason and Recorder::stop() wasn't called. Signed-off-by: Michael Orlov <[email protected]>
Signed-off-by: Michael Orlov <[email protected]>
1. MisraC++2023-8.1.1 [required]: _transport.cpp:286 This variable shall not be implicitly captured in a lambda expression.; Field: [] 2. MisraC++2023-8.2.3 [required]: _transport.cpp:50 Cast removes const qualification; Field: [const char*->char*] Signed-off-by: Michael Orlov <[email protected]>
Signed-off-by: Michael Orlov <[email protected]>
- Rationale: Need to use in another package - Added timeout parameter for the wait_for_playback_to_start(..) to make it non-blocking call optionally and return boolean value. Signed-off-by: Michael Orlov <[email protected]>
- Use custom deleter when releasing rcl serialized buffer to a shared pointer. Signed-off-by: Michael Orlov <[email protected]>
- The Player::play_next() should return false right away if for some reason failed to publish current message. Signed-off-by: Michael Orlov <[email protected]>
- Also added `play_next_returns_false_if_pre_callback_throw_exception` unit test. Signed-off-by: Michael Orlov <[email protected]>
…ture Signed-off-by: Michael Orlov <[email protected]>
- Also add missing `include <unordered_set>` Signed-off-by: Michael Orlov <[email protected]>
Signed-off-by: Michael Orlov <[email protected]>
6bcb7be
to
f4f1104
Compare
@christophebedard Could you please give a one more round of review?
|
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.
If you really want to proceed as-is with the wait_for_playback_to_start()
docs, this looks good to me with green CI.
Pulls: #1903 |
@christophebedard Thank you for review. |
https://github.com/Mergifyio backport jazzy |
✅ Backports have been created
|
* Make sure to start with clean subscriptions list in Recorder::record() - It could be some residual subscriptions in list in case if previous call to Recorder::record() failed for some reason and Recorder::stop() wasn't called. Signed-off-by: Michael Orlov <[email protected]> * Fix clang16 warning that timestamp comparator is not initialized Signed-off-by: Michael Orlov <[email protected]> * Address Axivion warnings in rosbag2_py 1. MisraC++2023-8.1.1 [required]: _transport.cpp:286 This variable shall not be implicitly captured in a lambda expression.; Field: [] 2. MisraC++2023-8.2.3 [required]: _transport.cpp:50 Cast removes const qualification; Field: [const char*->char*] Signed-off-by: Michael Orlov <[email protected]> * Gracefully handle exceptions from on-play callbacks in player Signed-off-by: Michael Orlov <[email protected]> * Move wait_for_playback_to_start() to public section - Rationale: Need to use in another package - Added timeout parameter for the wait_for_playback_to_start(..) to make it non-blocking call optionally and return boolean value. Signed-off-by: Michael Orlov <[email protected]> * Fix memory leaks in tests - Use custom deleter when releasing rcl serialized buffer to a shared pointer. Signed-off-by: Michael Orlov <[email protected]> * Don't keep trying to publish next message if we failed first time - The Player::play_next() should return false right away if for some reason failed to publish current message. Signed-off-by: Michael Orlov <[email protected]> * Wrap run_play_msg_pre_callbacks(message) in its own try-catch - Also added `play_next_returns_false_if_pre_callback_throw_exception` unit test. Signed-off-by: Michael Orlov <[email protected]> * Use absolute path instead of relative path in the InfoEndToEndTestFixture Signed-off-by: Michael Orlov <[email protected]> * Call discovery_future_.get() if it's ready in the `stop_discovery()` - Also add missing `include <unordered_set>` Signed-off-by: Michael Orlov <[email protected]> * Move wait_for_playback_to_start(..) declaration and fixed wording Signed-off-by: Michael Orlov <[email protected]> --------- Signed-off-by: Michael Orlov <[email protected]> (cherry picked from commit 871a447) # Conflicts: # rosbag2_transport/src/rosbag2_transport/player.cpp
This PR consolidates fixes related to the code quality and stability after backporting Rosbag2 PRs to Apex.AI. PART 1
List of changes:
Details: Need to use custom deleter when releasing rcl serialized buffer to a shared pointer.
Rationale: Avoid abnormal termination in case of unhandled exceptions happening in callbacks.
Description:
Rationale: It could be some residual subscriptions in the list in case if the previous call to Recorder::record() failed for some reason and Recorder::stop() wasn't called.
stop_discovery()
InfoEndToEndTestFixture
Player::play_next()
should return false right away if, for some reason, failed to publish the current message.