micro-ROS / system_modes

System modes for ROS 2 and micro-ROS
Apache License 2.0
43 stars 9 forks source link

Manage system lifecycle using system_modes interface #25

Closed chcorbato closed 4 years ago

chcorbato commented 4 years ago

I think to configure and activate a system currently you need to use the lifecycle services. You cannot use the system_modes services unless the system is already in the active state, right?

For example, in the system_modes_examples, right after launching the bringup files, so with the system in no state yet, this does not work:

ros2 service call /actuation/change_mode system_modes/srv/ChangeMode "{node_name: actuation, mode_name: active}"
waiting for service to become available...
requester: making request: system_modes.srv.ChangeMode_Request(node_name='actuation', mode_name='active')

response:
system_modes.srv.ChangeMode_Response(success=False)

I think it would be useful if the system_mode interface also allows to configure and activate systems.

norro commented 4 years ago

The mode manager already provides the state interface (.../change_state, etc) for systems, e.g. to activate them. Is that what you mean?

Or do you mean that the mode manager should take care of ensuring that a system is active first, before transitioning it into a certain mode? This should be dependent on this issue then: https://github.com/micro-ROS/system_modes/issues/27

chcorbato commented 4 years ago

The mode manager already provides the state interface (.../change_state, etc) for systems, e.g. to activate them. Is that what you mean?

This is what I meant.

Or do you mean that the mode manager should take care of ensuring that a system is active first, before transitioning it into a certain mode? This should be dependent on this issue then: #27

Great, this is a separate problem, related to self-managing systems. I will elaborate my viewpoint, also in relation to the metacontroller, in #27