Skip to content

Commit 0622cb7

Browse files
authored
Update system modes page to reflect state of affairs by end of 2020 (#260)
* Added basic lifecycle (rclc_lifecycle) * Updated description of error handling and rules, added reference to MROS * Kicked roadmap (superflous because task ends) Signed-off-by: Nordmann Arne (CR/ADT3) <arne.nordmann@de.bosch.com>
1 parent 779d0a1 commit 0622cb7

1 file changed

Lines changed: 27 additions & 52 deletions

File tree

  • _docs/concepts/client_library/system_modes

_docs/concepts/client_library/system_modes/index.md

Lines changed: 27 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,12 @@ Table of contents
1010
- [Requirements](#requirements)
1111
- [Background: ROS 2 Lifecycle](#background-ros-2-lifecycle)
1212
- [Main Features](#main-features)
13+
- [Basic Lifecycle](#basic-lifecycle)
1314
- [Extended Lifecycle](#extended-lifecycle)
1415
- [System Hierarchy and Modes](#system-hierarchy-and-modes)
1516
- [Mode Inference](#mode-inference)
1617
- [Mode Manager](#mode-manager)
17-
- [Error Handling and Rules (Experimental)](#error-handling-and-rules-experimental)
18-
- [Roadmap](#roadmap)
19-
- [2018](#2018)
20-
- [2019](#2019)
21-
- [2020](#2020)
22-
- [2021](#2021)
18+
- [Error Handling and Rules](#error-handling-and-rules)
2319
- [Acknowledgments](#acknowledgments)
2420

2521
## Introduction and Goal
@@ -52,38 +48,46 @@ The main features of the approach are (detailed in the remainder):
5248
2. _System Hierarchy and Modes_: Modeling approach for specifying a ROS system in terms of its system hierarchy and _system modes_, i.e. different (sub-)system configurations.
5349
3. _Mode Manager_: A module to manage and change the system runtime configuration.
5450
4. _Mode Inference_: A module for deriving the entire system state and mode from observable system information, i.e. states, modes, and parameters of its components.
55-
5. _Diagnostics_: Diagnosis module for deriving relevant information from the operating systems, the hardware and the functional components.
51+
5. _Error Handling_: Lightweight concept for specifying an error handling and recovery mechanism.
5652

5753
## Requirements
5854

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

6258
## Background: ROS 2 Lifecycle
6359

6460
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.
6561

66-
The description of the concept can be found at:
62+
The description of the concept can be found at:
6763
[http://design.ros2.org/articles/node_lifecycle.html](http://design.ros2.org/articles/node_lifecycle.html)
68-
The implementation of the Lifecycle Node is described at:
64+
The implementation of the Lifecycle Node is described at:
6965
[https://index.ros.org/doc/ros2/Managed-Nodes/](https://index.ros.org/doc/ros2/Managed-Nodes/).
7066

7167
## Main Features
7268

69+
### Basic Lifecycle
70+
71+
The ROS 2 Lifecycle has been implemented for micro-ROS as part of the C programming language client library *[rclc](https://github.com/ros2/rclc)*, see [rclc_lifecycle](https://github.com/ros2/rclc/tree/master/rclc_lifecycle) for source-code and documentation.
72+
73+
The rclc_lifecycle package is a ROS 2 package that provides convenience functions to bundle a ROS Client Library (rcl) node with the ROS 2 Node Lifecycle state machine in the C programming language, similar to the [rclcpp Lifecycle Node](https://github.com/ros2/rclcpp/blob/master/rclcpp_lifecycle/include/rclcpp_lifecycle/lifecycle_node.hpp) for C++.
74+
75+
An example, how to use the rclc Lifecycle Node is given in the file `lifecycle_node.c` in the [rclc_examples](https://github.com/ros2/rclc/blob/master/rclc_examples/) package.
76+
7377
### Extended Lifecycle
7478

75-
In micro-ROS, we extend the ROS 2 lifecycle by allowing to specify modes, i.e. substates, specializing the *active* *state based on the standard ROS 2 parameters mechanism. We implemented this concept based on rcl and rclcpp for ROS 2 and micro-ROS.
79+
In micro-ROS, we extend the ROS 2 lifecycle by allowing to specify modes, i.e. substates, specializing the *active* state based on the standard ROS 2 parameters mechanism. We implemented this concept based on rclc_lifecycle and rclcpp_lifecycle for ROS 2 and micro-ROS.
7680

77-
Documentation and code can be found at:
81+
Documentation and code can be found at:
7882
[github.com:system_modes/README.md#lifecycle](https://github.com/micro-ROS/system_modes/blob/master/system_modes/README.md#lifecycle)
7983

8084
### System Hierarchy and Modes
8185

8286
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.
8387

84-
The description of this model can be found at:
88+
The description of this model can be found at:
8589
[github.com:system_modes/README.md#system-modes](https://github.com/micro-ROS/system_modes/blob/master/system_modes/README.md#system-modes)
86-
A simple example is provided at:
90+
A simple example is provided at:
8791
[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)
8892

8993
### Mode Inference
@@ -94,23 +98,23 @@ Based on the lifecycle change events it knows the _actual_ lifecycle state of al
9498
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.
9599
This can be compared to the latest _requested_ states and modes to detect a deviation.
96100

97-
The documentation and code can be found at:
101+
The documentation and code can be found at:
98102
[github.com:system_modes/README.md#mode-inference](https://github.com/micro-ROS/system_modes/blob/master/system_modes/README.md#mode-inference)
99-
The mode inference can be best observed in the mode monitor, a console-based debugging tool, see:
103+
The mode inference can be best observed in the mode monitor, a console-based debugging tool, see:
100104
[github.com:system_modes/README.md#mode-monitor](https://github.com/micro-ROS/system_modes/blob/master/system_modes/README.md#mode-monitor)
101105

102106
### Mode Manager
103107

104108
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.
105109

106-
The documentation and code can be found at:
110+
The documentation and code can be found at:
107111
[github.com:system_modes/README.md#mode-manager](https://github.com/micro-ROS/system_modes/blob/master/system_modes/README.md#mode-manager)
108-
A simple example is provided at:
112+
A simple example is provided at:
109113
[github.com:system_modes_examples/README.md#setup](https://github.com/micro-ROS/system_modes/blob/master/system_modes_examples/README.md#setup)
110114

111-
### Error Handling and Rules (Experimental)
115+
### Error Handling and Rules
112116

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:
117+
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:
114118

115119
```pseudo
116120
if:
@@ -119,39 +123,10 @@ then:
119123
system.target := {specific state/mode}
120124
```
121125

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-
127-
## Roadmap
128-
129-
### 2018
130-
131-
- Requirements for behavior system composition in robotics systems
132-
- Modeling concept to specify system hierarchy as well as system modes of systems, subsystems, and their mapping along the system hierarchy down to nodes
133-
- Python prototype of system modes concept (ROS-independent)
134-
135-
### 2019
136-
137-
- Extended lifecycle concept and implementation for ROS 2 C++
138-
- Mode inference and mode manager for ROS 2 C++
139-
- ROS diagnostics port from ROS 1 to ROS 2 (prerequisite for micro-ROS diagnostics)
140-
- Lightweight concept for error propagation and recovery mechanisms
141-
142-
### 2020
143-
144-
- Integration of mode manager with real-time executor and/or roslaunch
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)
147-
148-
_Note: The extension of the ACTIVE state by modes (substates) was originally planned for 2020 but brought forward in 2018._
149-
150-
### 2021
126+
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.
151127

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.
128+
*Note:* This feature is suited for simple, well-defined rules according to the depicted syntax. For more complex orchestration, integration of system modes with ontological reasoning (*metacontrol*) has been validated and successfully shown in the [MROS project](https://robmosys.eu/mros/), e.g., within a [navigation sub-system of a mobile robot](https://github.com/MROS-RobMoSys-ITP/Pilot-URJC).
154129

155130
## Acknowledgments
156131

157-
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).
132+
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)