micro-ROS / system_modes

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

Publish inferred transitions #46

Closed norro closed 3 years ago

norro commented 3 years ago

Publishes inferred transitions of node modes and system states+modes.

The main change of this PR is that

  1. mode inference can now explicitly infer and record the state/mode changes of systems and the mode changes of nodes, see ModeInference::infer_transitions
  2. mode manager publishes these transitions in a regular interval, see ModeManager::publish_transitions on the same topics that lifecycle nodes use

The effect is that

  1. transitions of systems are now published and visible in the same way transitions of nodes are published anyway (lifecycle nodes do that on their own), namely /{system name}/transition_event and
  2. mode transitions are now published and visible in the same way state transitions are published, namely /{node or system name}/mode_event
norro commented 3 years ago

@chcorbato do you want to have a look at this, before I merge it?