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
* Shows how to set up an rclc lifecycle node, transition through its lifecycle states, and assign callbacks to lifecycle transitions
micro-ROS#179
Signed-off-by: Arne Nordmann <arne.nordmann@de.bosch.com>
Copy file name to clipboardExpand all lines: _docs/tutorials/core/programming_rcl_rclc/index.md
+84Lines changed: 84 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,7 @@ In this tutorial, you'll learn the basics of the micro-ROS C API. The major conc
9
9
*[Publishers and subscriptions](#pub_sub)
10
10
*[Services](#services)
11
11
*[Timers](#timers)
12
+
*[Lifecycle](#lifecycle)
12
13
*[Rclc Executor](#rclc_executor)
13
14
14
15
## <aname="node"/>Creating a Node
@@ -212,6 +213,89 @@ if (rc != RCL_RET_OK) {
212
213
}
213
214
```
214
215
216
+
## <aname="lifecycle"/>Lifecycle
217
+
218
+
The rclc lifecycle package provides convenience functions in C to bundle an rclc node with the ROS 2 Node Lifecycle state machine, similar to the [rclcpp Lifecycle Node](https://github.com/ros2/rclcpp/blob/master/rclcpp_lifecycle/include/rclcpp_lifecycle/lifecycle_node.hpp) for C++.
219
+
220
+
This tutorial show-cases how to set up an rclc lifecycle node, transition through its lifecycle states, and assign callbacks to lifecycle transitions.
221
+
222
+
### Initialization
223
+
224
+
Creation of a lifecycle node as a bundle of an rcl node and the rcl Node Lifecycle state machine.
An example, how to use the RCLC Lifecycle Node is given in the file `lifecycle_node.c` in the [rclc_examples](https://github.com/micro-ROS/rclc/tree/master/rclc_examples) package.
296
+
297
+
The state machine publishes state changes, however, lifecycle services are not yet exposed via ROS 2 services (tbd).
298
+
215
299
## <aname="rclc_executor"/>rclc Executor
216
300
217
301
The rclc Executor provides a C API to manage the execution of subscription and timer callbacks, similar to the [rclcpp Executor](https://github.com/ros2/rclcpp/blob/master/rclcpp/include/rclcpp/executor.hpp) for C++. The rclc Executor is optimized for resource-constrained devices and provides additional features that allow the manual implementation of deterministic schedules with bounded end-to-end latencies.
0 commit comments