fix(ros2controlcli): use lifecycle nomenclature and add finalized sta…#3134
fix(ros2controlcli): use lifecycle nomenclature and add finalized sta…#3134shraavb wants to merge 4 commits into
Conversation
…te to hardware component
There was a problem hiding this comment.
Thank you for submitting a PR.
The fixes of the if/elif branches and adding the finalized state are perfect, but I am not convinced from the rewording of the messages? I think this change is not needed.
I added a comment in the linked issue for clarification.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3134 +/- ##
==========================================
+ Coverage 89.32% 89.36% +0.04%
==========================================
Files 158 158
Lines 19497 19497
Branches 1584 1584
==========================================
+ Hits 17416 17424 +8
+ Misses 1428 1422 -6
+ Partials 653 651 -2
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
de4d1c6 to
21ddb2c
Compare
|
This PR is stale because it has been open for 45 days with no activity. Please tag a maintainer for help on completing this PR, or close it if you think it has become obsolete. |
| arg = parser.add_argument( | ||
| "state", | ||
| choices=["unconfigured", "inactive", "active"], | ||
| help="State in which the controller should be changed to", |
There was a problem hiding this comment.
Let's add the note here again, only the "valid choices" parts were redundant.
Note: the 'finalized' state is reached via the 'unload_controller' command.
christophfroehlich
left a comment
There was a problem hiding this comment.
Please readd the note again. As mentioned in #688 we also want to add the transition states to this CLI, so I disabled the auto-close of this issue. But let's merge this PR soon, and add the transition states in a second PR.
Related to #688
Summary
Use ROS 2 lifecycle nomenclature consistently in the CLI and add the missing
finalizedstate toset_hardware_component_state.Changes
set_controller_state.pyunconfigured,deactivating)finalizedis reached viaunload_controllerset_hardware_component_state.pyfinalizedto valid choices usingState.PRIMARY_STATE_FINALIZEDif/if/if→if/elif/elif/eliffor correct branch structureNote on
finalizedfor controllersThe controller manager has no
FinalizeControllerservice, so controllers cannotbe directly transitioned to
finalizedvia this command. Hardware components can,since
SetHardwareComponentState.srvaccepts any lifecycle state by ID.Checklist
set_controller_stateshould support full lifecycle and use lifecycle nomenclature. #688