Fix the prepare_command_mode_switch behaviour when HW is INACTIVE#2347
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2347 +/- ##
==========================================
- Coverage 88.90% 88.89% -0.01%
==========================================
Files 148 148
Lines 16950 16972 +22
Branches 1448 1448
==========================================
+ Hits 15069 15088 +19
- Misses 1318 1320 +2
- Partials 563 564 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
MarqRazz
left a comment
There was a problem hiding this comment.
This looks much better as the controller_manger deactivates hardware when it returns ERROR thanks for fixing it @saikishor.
As discussed are we going to make the changes here to not allow hardware in the INACTIVE state to activate command interfaces? This ability does not make sense in the INACTIVE state and goes against the changes made in #2334 where returning DEACTIVATE stops any controllers with command interfaces to the DEACTIVATing hardware.
MarqRazz
left a comment
There was a problem hiding this comment.
Thanks for fixing these issues @saikishor,! 🥇
I tested this on my hardware and can no longer activate the JTC while the hardware is INACTIVE.
[taskset-1] [controller_manager 1751465055.104089577]: Activating controllers: [ right_arm_jtc ]
[taskset-1] [controller_manager 1751465055.104233459]: Component 'right_arm_Hardware' is in INACTIVE state, but has start interfaces to switch:
[taskset-1] Start interfaces:
[taskset-1] [
[taskset-1] right_arm_joint_1/velocity
[taskset-1] right_arm_joint_2/velocity
[taskset-1] right_arm_joint_3/velocity
[taskset-1] right_arm_joint_4/velocity
[taskset-1] right_arm_joint_5/velocity
[taskset-1] right_arm_joint_6/velocity
[taskset-1] ]
[taskset-1] Stop interfaces:
[taskset-1] [
[taskset-1] ]
[taskset-1]
[taskset-1] [controller_manager 1751465055.104255917]: Could not switch controllers since prepare command mode switch was rejected.
|
@MarqRazz thanks a lot for taking time and testing things :) |
) (cherry picked from commit 750ac8a)
This should fix the failing
prepare_command_mode_switchmethod check when hardware goes to error