ROS: verify topic data in integration tests#549
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThis PR introduces MCAP-based replay capability for integration testing the teleop_ros2 system. A new C++ utility ( Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@examples/teleop_ros2/cpp/integration_tests/mcap_generator.cpp`:
- Around line 126-159: The PedalChannels constructor in write_fixture currently
uses core::PedalRecordingTraits::replay_channels which omits the "pedals"
channel; change the PedalChannels instantiation to use
core::PedalRecordingTraits::recording_channels so the pedal fixture matches
ControllerChannels/HandChannels/FullBodyChannels and includes both "pedals" and
"pedals_tracked" (update the argument passed to PedalChannels that currently
references replay_channels to recording_channels).
In `@examples/teleop_ros2/python/integration_tests/teleop_ros2_topic_verifier.py`:
- Around line 43-167: The tests use bare assert statements that can be disabled
under Python optimization; update each validator to perform explicit runtime
checks and raise appropriate exceptions (e.g., ValueError or RuntimeError)
instead of using assert. Replace all asserts in _assert_pose_array,
_assert_joint_state, _assert_twist, _assert_root_pose,
_assert_controller_payload, and _assert_full_body_payload with if-not-condition:
raise ValueError("...") (preserving the existing error messages) and ensure
sequence/length checks (_is_finite_sequence checks and any(...) checks) follow
the same pattern so validation is always enforced.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: cacd78db-18a9-41e5-837a-47bc2d56bce3
📒 Files selected for processing (7)
.github/workflows/build-ubuntu.ymlexamples/teleop_ros2/CMakeLists.txtexamples/teleop_ros2/README.mdexamples/teleop_ros2/cpp/integration_tests/CMakeLists.txtexamples/teleop_ros2/cpp/integration_tests/mcap_generator.cppexamples/teleop_ros2/python/integration_tests/teleop_ros2_topic_verifier.pyexamples/teleop_ros2/python/teleop_ros2_node.py
5780c14 to
544a029
Compare
544a029 to
e8ce7b2
Compare
Summary by CodeRabbit
New Features
Documentation
Tests