forked from ros-controls/ros2_control
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add service-skeletons for controlling hardware lifecycle. (ros-contro…
…ls#585) * Towards selective starting and stoping of hardware components. Cleaning and renaming. * Move Lifecycle of hardware componnet to the bottom for better overview. * Use the same nomenclature as for controllers. 'start' -> 'activate'; 'stop' -> 'deactivate' * Add selective starting and stopping of hardware resources. Add HardwareComponentInfo structure in resource manager. Use constants for HW parameters in tests of resource_manager. Add list hardware components in CM to get details about them and check their status. Use clear name for 'guard' and move release cmd itfs for better readability. RM: Add lock for accesing maps with stored interfaces. Separate hardware components-related services after controllers-related services. Add service for activate/deactive hardware components. Add activation and deactivation through ResourceStorage. This helps to manage available command interfaces. * Use lifecycle_msgs/State in ListHardwareCompoents for state representation. * Simplify repeatable code in methods. * Add HW shutdown structure into ResouceManager. * Fill out service callback in CM and add parameter for auto-configure. * Move claimed_command_itf_map to ResourceStorage from ResourceManager. * Do not automatically configure hardware in RM. * Lifecycle and claiming in Resource Manager is working. * Extend controller manger to support HW lifecycle. * Add also available and claimed status into list compoentns service output. * Add SetHardwareComponentState service. * Make all output in services debug-output. * Remove specific services for hardware lifecycle management and leave only 'set_hardware_component_state' service. * fix typo * Fix formatting. * Make init_resource_manager less stateful. * Supress compile warning on unused test constants. * Fix formatting. * Address comments from review. * Revert full-file chnages. * Add empty services into CM. * Remove some more files. * Correct formatting.
- Loading branch information
Showing
8 changed files
with
128 additions
and
35 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
string name | ||
string type | ||
string class_type | ||
lifecycle_msgs/State state | ||
HardwareInterface[] command_interfaces | ||
HardwareInterface[] state_interfaces |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
string name | ||
bool is_available | ||
bool is_claimed |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# The ListHardwareComponents service returns a list of hardware HardwareComponentsState. | ||
# This will convey name, component_type, state and type of the components | ||
# that are loaded inside the resource_manager. | ||
|
||
--- | ||
HardwareComponentState[] component |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# The SetHardwareComponentState service allows to control life-cycle of a single hardware component. | ||
# Supported states are defined in the design document of LifecycleNodes available at: | ||
# https://design.ros2.org/articles/node_lifecycle.html | ||
# To control life-cycle of a hardware component, specify its "name" and "target_state". | ||
# Target state may be defined by "id" using a constant from `lifecycle_msgs/msg/State` or a label | ||
# using definitions from `hardware_interface/types/lifecycle_state_names.hpp` file. | ||
# The return value "ok" indicates if the component has successfully changed its state to "target_state". | ||
# The return value "state" returns current state of the hardware component. | ||
|
||
string name | ||
lifecycle_msgs/State target_state | ||
--- | ||
bool ok | ||
lifecycle_msgs/State state |