You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[System Hierarchy and Modes](#system-hierarchy-and-modes)
15
16
-[Mode Inference](#mode-inference)
16
17
-[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)
23
19
-[Acknowledgments](#acknowledgments)
24
20
25
21
## Introduction and Goal
@@ -52,38 +48,46 @@ The main features of the approach are (detailed in the remainder):
52
48
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.
53
49
3._Mode Manager_: A module to manage and change the system runtime configuration.
54
50
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.
56
52
57
53
## Requirements
58
54
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:
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.
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
+
73
77
### Extended Lifecycle
74
78
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.
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.
@@ -94,23 +98,23 @@ Based on the lifecycle change events it knows the _actual_ lifecycle state of al
94
98
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.
95
99
This can be compared to the latest _requested_ states and modes to detect a deviation.
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.
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:
114
118
115
119
```pseudo
116
120
if:
@@ -119,39 +123,10 @@ then:
119
123
system.target := {specific state/mode}
120
124
```
121
125
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.
151
127
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).
154
129
155
130
## Acknowledgments
156
131
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