-
Notifications
You must be signed in to change notification settings - Fork 61
Fix KeyError in ROS2 ActionClient when receiving action results from rosbridge #142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix KeyError in ROS2 ActionClient when receiving action results from rosbridge #142
Conversation
Co-authored-by: gonzalocasas <933277+gonzalocasas@users.noreply.github.com>
Co-authored-by: gonzalocasas <933277+gonzalocasas@users.noreply.github.com>
@copilot fix the linter errors |
Co-authored-by: gonzalocasas <933277+gonzalocasas@users.noreply.github.com>
@noah-wardlow could you please take a look at this and confirm if it fixes your problem? |
@gonzalocasas can confirm this fix worked for me |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verified by reporter
@sea-bass @EzraBrooks could you guys take a look at this and review? the merge rules from me from merging because I collaborated with Copilot ;) |
Summary
Fixed the KeyError that occurred when ROS2 ActionClient received action results from rosbridge. The issue was caused by the code attempting to access
message["status"]
without checking if the field existed or handling different message formats.Changes
_handle_action_result()
to handle multiple message formats (status at top level or inside values)Testing
✅ All 4 new tests pass
✅ All existing unit tests still pass
✅ All linters pass (flake8, black, isort)
Impact
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.