feat(recorder): support ROS topic QoS configuration#138
Merged
Conversation
- Add ROS QoS fields to task and subscription configs - Parse nested YAML and RPC QoS objects while preserving blank defaults - Apply task-scoped QoS overrides to session subscriptions - Echo QoS settings through state, event, and config update payloads
- Parse mode:auto and per-field auto QoS subscription options - Resolve auto QoS from publisher endpoint info with topic fallbacks - Enable auto QoS in recorder ROS2 templates - Document auto QoS fields in config and RPC docs
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
Adds per-topic ROS QoS configuration to axon recorder, including blank-field fallback behavior and ROS 2
autoQoS resolution from discovered publishers. Also extends the local Docker mirror strategy to ROS/C++/Zenoh test images and local CI scripts to avoid slow upstream apt/LLVM downloads.Motivation
Changes
Modified Files
apps/axon_recorder/src/config/config_parser.cpp- Parses nestedqosblocks, preserves blank/default fallback, validates supported policy values, and saves QoS overrides.apps/axon_recorder/src/config/task_config.hpp- Adds task and subscription QoS data structures.apps/axon_recorder/src/core/recorder.cpp- Propagates task-scoped topic QoS into recorder subscriptions and runtime payloads.apps/axon_recorder/src/http/rpc_handlers.cpp- Accepts topic QoS through RPC config payloads and returns QoS in state payloads.apps/axon_recorder/src/http/event_broadcaster.cpp- Includes topic QoS in config/state events.apps/axon_recorder/src/http/ws_rpc_client.cpp- Preserves QoS fields through WebSocket RPC config handling.middlewares/ros2/src/ros2_subscription_wrapper.cpp- ResolvesautoQoS policies from publisher endpoint information with default fallbacks.middlewares/ros2/src/ros2_plugin_export.cpp- Passes subscription QoS options through the plugin boundary.middlewares/ros2/include/ros2_subscription_wrapper.hpp- Extends ROS 2 subscription options for QoS policy overrides.apps/axon_recorder/config/default_config_ros2.yaml- Enablesqos.mode: autoin ROS 2 template subscriptions.apps/axon_recorder/config/default_config_hybrid.yaml- Enablesqos.mode: autofor the ROS 2 hybrid sample topic.apps/axon_recorder/config/README.md- Documents nested QoS fields,auto, and blank default fallback.docs/designs/rpc-api-design.md- Documents RPC topic QoS payloads.docker/Dockerfile.ros1- Applies configurable apt/ROS/LLVM mirror setup.docker/Dockerfile.ros2.humble- Applies configurable apt/ROS/LLVM mirror setup.docker/Dockerfile.ros2.jazzy- Applies configurable apt/ROS/LLVM mirror setup.docker/Dockerfile.ros2.rolling- Applies configurable apt/ROS/LLVM mirror setup.docker/Dockerfile.cpp-test- Applies configurable apt/LLVM mirror setup.docker/Dockerfile.zenoh- Applies configurable apt mirror setup.docker/scripts/setup-apt-mirror.sh- Adds Tsinghua/TUNA LLVM mirror support.scripts/ci-docker-zenoh.sh- Uses mirror build args, host networking, and an isolated Zenoh build directory.scripts/docker-test-cpp.sh- Uses shared mirror selection and host-network Docker builds.scripts/docker-test-ros.sh- Uses shared mirror selection and host-network Docker builds.scripts/docker-test-e2e.sh- Uses shared mirror selection and host-network Docker builds.Added Files
scripts/docker-apt-mirror-common.sh- Shared local Docker mirror selection helper withAXON_APT_MIRROR=autodefaulting to the Tsinghua/TUNA mirror when appropriate.Deleted Files
None.
Type of Change
Impact Analysis
Breaking Changes
None.
Backward Compatibility
Fully backward compatible. Existing
qos_depthcontinues to work, omitted or blank nested QoS fields fall back to the existing defaults, and explicit QoS overrides are optional.Testing
Test Environment
d9276d81719fc1176da673f94ca3bdf4baf2386forigin/mainat merge-base48fc72b1f574d4eb1644f09dce473194ad515c89Test Cases
Manual Testing Steps
ci-all-local.sh:python3 -m venv .venv-ws-e2e .venv-ws-e2e/bin/python -m pip install -i https://pypi.tuna.tsinghua.edu.cn/simple websockets make app-axon-recorder BUILD_TYPE=Release make build-mock BUILD_TYPE=Release cd apps/axon_recorder/test chmod +x e2e/test_ws_rpc_client_e2e.py mock_keystone_server.py ../../../.venv-ws-e2e/bin/python e2e/test_ws_rpc_client_e2e.pyTest Coverage
New/updated coverage includes config parser QoS handling, blank-field fallback, invalid QoS validation, RPC topic QoS payload handling, and ROS 2 auto QoS resolution behavior.
Screenshots / Recordings
N/A.
Performance Impact
Documentation
Related Issues
Additional Notes
docker/Dockerfile.ros2.rollingreceived the same mirror strategy as the other ROS Dockerfiles, but a dedicated rolling image build/test was skipped per requester instruction.Reviewers
N/A
Notes for Reviewers
autoQoS fallback behavior is acceptable when publisher endpoint information is unavailable or mixed across publishers.Checklist for Reviewers