Fix critical bugs and improve hardware interface robustness#25
Draft
Copilot wants to merge 2 commits intopilla-hw-nodefrom
Draft
Fix critical bugs and improve hardware interface robustness#25Copilot wants to merge 2 commits intopilla-hw-nodefrom
Copilot wants to merge 2 commits intopilla-hw-nodefrom
Conversation
Co-authored-by: Macbull <11361002+Macbull@users.noreply.github.com> Agent-Logs-Url: https://github.com/code-name-57/pillla_hw_code/sessions/d3c7bc54-def8-4ea9-9ca6-201d930b964f
Copilot
AI
changed the title
[WIP] Analyze quadruped robot repository for missing features
Fix critical bugs and improve hardware interface robustness
Mar 21, 2026
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.
Several bugs were rendering the Arduino IMU node non-functional and a CAN motor control method would crash at runtime. Additionally, the codebase lacked runtime dependency declarations, had a permanently disabled IMU launch, and had no CI.
Critical Bug Fixes
arduino_interface.py:finallyblock inside the read loop closed the serial port after every single line — the node could only ever read one IMU message. Replaced the blockingwhileloop in__init__with acreate_timer(0.02, ...)callback; cleanup moved todestroy_node()can_joint.py:test_movement()referenced bareaxisID(NameError at runtime) instead ofself.axisIDArduino Interface Improvements
serial_port,baud_rate) instead of hardcoded valuesjson.JSONDecodeErrorcaught per-frame so bad serial data logs a warning and continues rather than crashingget_logger().warning()instead ofwarn()Package Metadata
pilla_hw/package.xml: Added missingexec_dependentries —rclpy,sensor_msgs,trajectory_msgs,std_msgs,std_srvs,diagnostic_msgs,python3-serialpilla_teleop/package.xml: Upgraded to package format 3; replaced deprecatedrun_dependwithexec_depend; added missingchamp_msgsdependencyLaunch Files
odrive_nodes_launch.py: Replaced 12 copy-pastedNode(...)blocks with a list comprehensionchamp_pilla_launch.py: Uncommented the Arduino IMU launch (had been disabled since initial commit); addeduse_imulaunch arg withIfCondition;use_joyis now a launch arg instead of hardcoded'true'Arduino Firmware
// 20ms for 50Hz→// 10ms for 100Hzto matchinterval = 10CI
.github/workflows/ci.ymlwith two jobs:flake8 --select=F(undefined names/variables) on Python sources, and a CAN library import validation job✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.