feat(recorder): tune ROS2 QoS and recorder compression behavior#135
Merged
Conversation
8d6ab51 to
2e7a928
Compare
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Checklist
Please ensure your PR meets the following requirements:
make testormake docker-test)make format)Summary
This PR keeps recorder compression level
3aligned with the documented default preset, adds configurable ROS2 subscription QoS depth, and copies ROS2 serialized payloads before returning from subscription callbacks.Motivation
compression_level: 3as the balanced default, but directly casting to MCAP's enum made itSlow.rclcpp::SerializedMessagebuffers in Axon's queues can hold DDS/rclcpp receive buffers longer than the ROS callback lifetime, throttling high-rate topics under recorder backlog.Changes
Modified Files
core/axon_mcap/mcap_writer_wrapper.cpp- Adds legacy recorder/CLI compression-level translation before resolving MCAP writer options.core/axon_mcap/mcap_writer_wrapper.hpp- Exposescompression_level_from_legacy_int()and documents the compatibility mapping.core/axon_mcap/test/test_mcap_writer.cpp- Covers the legacy integer-to-preset mapping, including the documented3 -> Defaultcase.apps/axon_recorder/src/core/recorder.hpp- Adds per-subscriptionqos_depthwith default depth10.apps/axon_recorder/src/config/config_parser.cpp- Parses, saves, and validatesqos_depthvalues.apps/axon_recorder/src/core/recorder.cpp- Passesqos_depthinto middleware subscribe options.apps/axon_recorder/test/unit/test_config_parser.cpp- Coversqos_depthparsing, defaults, validation, and save/load behavior.apps/axon_recorder/config/README.md- Documentsqos_depthand the updated compression-level mapping.apps/axon_recorder/config/default_config_ros1.yaml- Updates compression-level comments.apps/axon_recorder/config/default_config_ros2.yaml- Documentsqos_depthand updates compression-level comments.apps/axon_recorder/config/default_config_udp.yaml- Updates compression-level comments.apps/axon_recorder/axon_recorder.cpp- Updates CLI help text for compression-level presets.middlewares/ros2/include/ros2_subscription_wrapper.hpp- Declares subscribe QoS option application and updates v2 callback ownership comments.middlewares/ros2/src/ros2_plugin_export.cpp- Appliesqos_depth/ legacyqueue_sizeand reliability options for ROS2 subscriptions.middlewares/ros2/src/ros2_subscription_wrapper.cpp- Copies serialized payloads into plugin-owned storage before invoking Axon's v2 callback.middlewares/ros2/test/test_ros2_plugin.cpp- Covers QoS depth and reliability option handling.Added Files
N/A
Deleted Files
N/A
Type of Change
Impact Analysis
Breaking Changes
None.
Backward Compatibility
qos_depthkeep the default ROS2 subscription history depth of10.queue_sizeis accepted as a fallback for QoS depth.3restored to the documentedDefaultbehavior and values>=5mapped toSlowest.Testing
Test Environment
builddirectoryorigin/mainate347f0aff25b315d4ba34c6ed5ed1d194b2a6a4b8d6ab51484326dcca5dab47d3eb9b8276617560eTest Cases
Manual Testing Steps
Automated focused validation run locally:
git diff origin/main..feat/recorder-runtime-qos-mcap-ros2 --check- passed.cmake --build build --target axon_recorder test_config_parser test_ros2_plugin test_mcap_writer test_mcap_batch_and_async test_recording_session -j8- passed../build/axon_recorder/test/test_config_parser- passed, 54/54 tests../build/middlewares/ros2_plugin/test_ros2_plugin- passed, 36/36 tests../build/axon_mcap/test_mcap_writer- passed, 39/39 tests../build/axon_mcap/test_mcap_batch_and_async- passed, 12/12 tests../build/axon_recorder/test/test_recording_session- passed, 37/37 tests.Full
./scripts/ci-all-local.sh, WS RPC client E2E, format/reuse, Zenoh, and full ROS/E2E CI matrix were not run locally for this draft PR.Test Coverage
Screenshots / Recordings
N/A
Performance Impact
Documentation
Related Issues
N/A
Additional Notes
This is intentionally opened as a draft because only focused local validation has been run, not the full remote-equivalent CI gate required for ready-for-review.
Reviewers
N/A
Notes for Reviewers
core/axon_mcap/mcap_writer_wrapper.cpp.Checklist for Reviewers