Skip to content

Commit 0560d71

Browse files
authored
Updated system modes roadmap (#257)
* Updated system modes roadmap Signed-off-by: Arne Nordmann (CR/AEA2) <arne.nordmann@de.bosch.com>
1 parent 282a74a commit 0560d71

1 file changed

Lines changed: 35 additions & 11 deletions

File tree

  • _docs/concepts/client_library/system_modes

_docs/concepts/client_library/system_modes/index.md

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@ Table of contents
1414
- [System Hierarchy and Modes](#system-hierarchy-and-modes)
1515
- [Mode Inference](#mode-inference)
1616
- [Mode Manager](#mode-manager)
17+
- [Error Handling and Rules (Experimental)](#error-handling-and-rules-experimental)
1718
- [Roadmap](#roadmap)
1819
- [2018](#2018)
1920
- [2019](#2019)
2021
- [2020](#2020)
22+
- [2021](#2021)
2123
- [Acknowledgments](#acknowledgments)
2224

2325
## Introduction and Goal
@@ -54,13 +56,15 @@ The main features of the approach are (detailed in the remainder):
5456

5557
## Requirements
5658

57-
The list of requirements is maintained in the doc folder of the micro-ROS system modes repository, at: https://github.com/micro-ROS/system_modes/blob/master/system_modes/doc/requirements.md
59+
The list of requirements is maintained in the doc folder of the micro-ROS system modes repository, at:
60+
https://github.com/micro-ROS/system_modes/blob/master/system_modes/doc/requirements.md
5861

5962
## Background: ROS 2 Lifecycle
6063

6164
Our approach is based on the ROS 2 Lifecycle. The primary goal of the ROS 2 lifecycle is to allows greater control over the state of a ROS system. It allows consistent initialization, restart and/or replacing of system parts during runtime. It provides a default lifecycle for managed ROS 2 nodes and a matching set of tools for managing lifecycle nodes.
6265

63-
The description of the concept can be found at: [http://design.ros2.org/articles/node_lifecycle.html](http://design.ros2.org/articles/node_lifecycle.html)
66+
The description of the concept can be found at:
67+
[http://design.ros2.org/articles/node_lifecycle.html](http://design.ros2.org/articles/node_lifecycle.html)
6468
The implementation of the Lifecycle Node is described at:
6569
[https://index.ros.org/doc/ros2/Managed-Nodes/](https://index.ros.org/doc/ros2/Managed-Nodes/).
6670

@@ -78,20 +82,20 @@ Documentation and code can be found at:
7882
We provide a modeling concept for specifying the hierarchical composition of systems recursively from nodes and for specifying the states and modes of systems and (sub-)systems with the extended lifecycle, analogously to nodes. This system modes and hierarchy (SMH) model also includes an application-specific the mapping of the states and modes along the system hierarchy down to nodes.
7983

8084
The description of this model can be found at:
81-
[github.com:system_modes/README.md#system-modes](https://github.com/micro-ROS/system_modes/blob/master/system_modes/README.md#system-modes)
85+
[github.com:system_modes/README.md#system-modes](https://github.com/micro-ROS/system_modes/blob/master/system_modes/README.md#system-modes)
8286
A simple example is provided at:
8387
[github.com:system_modes_examples/README.md#example-mode-file](https://github.com/micro-ROS/system_modes/blob/master/system_modes_examples/README.md#example-mode-file)
8488

8589
### Mode Inference
8690

8791
The mode inference infers the entire system states (and modes) based on the lifecycle states, modes, and parameter configuration of its components, i.e. the ROS 2 lifecyle nodes. It parses the SMH model and subscribes to lifecycle/mode change requests, lifecycle/mode changes, and parameter events.
8892

89-
Based on the lifecycle change events it knows the _actual_ lifecycle state of all nodes. Based on parameter change events it knows the _actual_ parameter values of all nodes, which allows inference of the _modes_ of all nodes based on the SMH model.
93+
Based on the lifecycle change events it knows the _actual_ lifecycle state of all nodes. Based on parameter change events it knows the _actual_ parameter values of all nodes, which allows inference of the _modes_ of all nodes based on the SMH model.
9094
Based on the SMH model and the inferred states and modes of all nodes, states and modes of all (sub-)systems can be _inferred_ bottom-up along the system hierarchy.
9195
This can be compared to the latest _requested_ states and modes to detect a deviation.
9296

9397
The documentation and code can be found at:
94-
[github.com:system_modes/README.md#mode-inference](https://github.com/micro-ROS/system_modes/blob/master/system_modes/README.md#mode-inference)
98+
[github.com:system_modes/README.md#mode-inference](https://github.com/micro-ROS/system_modes/blob/master/system_modes/README.md#mode-inference)
9599
The mode inference can be best observed in the mode monitor, a console-based debugging tool, see:
96100
[github.com:system_modes/README.md#mode-monitor](https://github.com/micro-ROS/system_modes/blob/master/system_modes/README.md#mode-monitor)
97101

@@ -100,10 +104,26 @@ The mode inference can be best observed in the mode monitor, a console-based deb
100104
Building upon the _Mode Inference_ mechanism, the mode manager provides additional services and topics to _manage and adapt_ system states and modes according to the specification in the SMH model.
101105

102106
The documentation and code can be found at:
103-
[github.com:system_modes/README.md#mode-manager](https://github.com/micro-ROS/system_modes/blob/master/system_modes/README.md#mode-manager)
107+
[github.com:system_modes/README.md#mode-manager](https://github.com/micro-ROS/system_modes/blob/master/system_modes/README.md#mode-manager)
104108
A simple example is provided at:
105109
[github.com:system_modes_examples/README.md#setup](https://github.com/micro-ROS/system_modes/blob/master/system_modes_examples/README.md#setup)
106110

111+
### Error Handling and Rules (Experimental)
112+
113+
If the _actual_ state/mode of the system or any of its parts diverges from the _target_ state/mode, we define rules that try to bring the system back to a valid _target_ state/mode, e.g., a degraded mode. Rules work in a bottom-up manner, i.e. starting from correcting nodes before sub-systems before systems. Rules are basically defined in the following way:
114+
115+
```pseudo
116+
if:
117+
system.target == {target state/mode} && system.actual != {target state/mode} && part.actual == {specific state/mode}
118+
then:
119+
system.target := {specific state/mode}
120+
```
121+
122+
if _actual_ state/mode and _target_ state/mode diverge, but there is no rule for this exact situation, the bottom-up rules will just try to return the system/part to its _target_ state/mode.
123+
*Potentiall dangereous, to be discussed:* what's happening, if the system is already on its way. E.g., a system or part was just commanded to transition to _ACTIVE.foo_, but is currently _activating_ (so doing everything right). In this case we have to avoid that the bottom-up rules will trigger.
124+
125+
*Note:* This feature is still experimental and might be subject to major changes. However, if no rules are specified in the model file, this feature is not used.
126+
107127
## Roadmap
108128

109129
### 2018
@@ -116,18 +136,22 @@ A simple example is provided at:
116136

117137
- Extended lifecycle concept and implementation for ROS 2 C++
118138
- Mode inference and mode manager for ROS 2 C++
119-
- ROS diagnostics port from ROS 1 to ROS 2
120-
- Concept for bottom-up system modes rules
139+
- ROS diagnostics port from ROS 1 to ROS 2 (prerequisite for micro-ROS diagnostics)
140+
- Lightweight concept for error propagation and recovery mechanisms
121141

122142
### 2020
123143

124-
- Diagnostics framework for micro-ROS, interoperating with ROS 2 diagnostics
125-
- MCU-specific diagnostics functions for resource usage on RTOS layer, latencies, statistics from middleware, etc.
126144
- Integration of mode manager with real-time executor and/or roslaunch
127-
- Lightweight concept for specifying error propagation and recovery mechanisms
145+
- Lightweight implementation for specifying error propagation and recovery mechanisms
146+
- ROS diagnostics port from ROS 1 to ROS 2 (prerequisite for micro-ROS diagnostics)
128147

129148
_Note: The extension of the ACTIVE state by modes (substates) was originally planned for 2020 but brought forward in 2018._
130149

150+
### 2021
151+
152+
- Diagnostics framework for micro-ROS, interoperating with ROS 2 diagnostics
153+
- MCU-specific diagnostics functions for resource usage on RTOS layer, latencies, statistics from middleware, etc.
154+
131155
## Acknowledgments
132156

133157
This activity has received funding from the European Research Council (ERC) under the European Union's Horizon 2020 research and innovation programme (grant agreement n° 780785).

0 commit comments

Comments
 (0)