Repository navigation
Ignore shutdown-time errors in the camera follower and joint demo - #46
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 2 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🟢 Approval recommended
The exception handling is narrowly gated by context state and error identity, with appropriate regression coverage.
0 open findings
What changed in this PR
Adds guarded handling for known ROS 2 shutdown-time exceptions without suppressing errors during normal operation.
Changes:
- Extends joint demo shutdown handling.
- Ignores the known TF time error after context shutdown.
- Expands shutdown regression tests across both scripts.
| File | Description |
|---|---|
waybionic_bringup/scripts/camera_follower.py |
Handles shutdown-related TF time errors. |
waybionic_bringup/scripts/joint_demo.py |
Adds guarded ROS and TF shutdown exception handling. |
waybionic_teleop/test/test_sim_arm_drives_node.py |
Tests joint demo shutdown behavior and TF errors. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Two bringup launch tests fail now and then in CI because a script crashes while it is shutting down, after the test itself has passed:
camera_follower.py: a TF lookup in a timer can raiseTypeError: time must have sec and nanosec, or nanoseconds.once SIGINT has invalidated the context. This failed Open the joint limits to where the arm's parts meet #44's autoplay launch test.joint_demo.py: it only caught KeyboardInterrupt, so Jazzy's shutdown errors (an invalid context, the "Unable to convert call argument" binding error, and the same TF time error) made it exit 1. This failed a Add tool board firmware that speaks the MKS drive frames #32 run.Both now ignore these errors, but only after the context has shut down. Any other error, or the same one while ROS is still running, still fails. The existing shutdown tests now cover the joint demo too, and a new test covers the TF time error.
Full suite, rerun on Oct 16: 1033 tests, 0 failures. Merged with #44 and #45: 1113 tests, 0 failures.