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
ROS 2 nodes are the main participants on ROS2 ecosystem. They will communicate between each other using publishers, subscriptions, services, ... Further information about ROS 2 nodes can be found [here](https://docs.ros.org/en/galactic/Tutorials/Understanding-ROS2-Nodes.html)
6
+
ROS 2 nodes are the main participants on ROS 2 ecosystem. They will communicate between each other using publishers, subscriptions, services, etc. Further information about ROS 2 nodes can be found [here](https://docs.ros.org/en/galactic/Tutorials/Understanding-ROS2-Nodes.html)
7
7
8
8
// TODO: explain general micro-ROS initialization (allocator and support). Where?
@@ -33,13 +37,14 @@ ROS 2 nodes are the main participants on ROS2 ecosystem. They will communicate b
33
37
```
34
38
35
39
- Create a node with custom options:
40
+
36
41
// TODO: explain possible options
37
42
38
43
The configuration of the node will also be applied to its future elements (Publishers, subscribers, services, ...).The API used to customize the node options differs between ROS2 distributions:
39
44
40
45
Foxy: The `rcl_node_options_t` is used to configure the node
41
46
42
-
```C
47
+
```c
43
48
// Initialize allocator and support objects
44
49
...
45
50
@@ -51,37 +56,37 @@ ROS 2 nodes are the main participants on ROS2 ecosystem. They will communicate b
Copy file name to clipboardExpand all lines: _docs/tutorials/programming_rcl_rclc/overview/index.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,9 @@ redirect_from:
5
5
- /docs/tutorials/programming_rcl_rclc/
6
6
---
7
7
8
-
In this tutorial, you'll learn the basics of the micro-ROS C API. The major concepts (publishers, subscriptions, services, timers, ...) are identical with ROS 2. They even rely on the *same* implementation, as the micro-ROS C API is based on the ROS 2 client support library (rcl), enriched with a set of convenience functions by the package [rclc](https://github.com/ros2/rclc/). That is, rclc does not add a new layer of types on top of rcl (like rclcpp and rclpy do) but only provides functions that ease the programming with the rcl types. New types are introduced only for concepts that are missing in rcl, such as the concept of an executor.
8
+
In this section, you'll learn the basics of the micro-ROS C API: **rclc**.
9
+
10
+
The major concepts (publishers, subscriptions, services, timers, ...) are identical with ROS 2. They even rely on the *same* implementation, as the micro-ROS C API is based on the ROS 2 client support library (rcl), enriched with a set of convenience functions by the package [rclc](https://github.com/ros2/rclc/). That is, rclc does not add a new layer of types on top of rcl (like rclcpp and rclpy do) but only provides functions that ease the programming with the rcl types. New types are introduced only for concepts that are missing in rcl, such as the concept of an executor.
@@ -43,10 +51,10 @@ Note: micro-ROS parameter server is only supported on ROS2 galactic distribution
43
51
}
44
52
```
45
53
46
-
## <aname="parameters_init"/>Memory requirements
54
+
## Memory requirements
47
55
The parameter server uses 4 services and an optional publisher, this needs to be taken into account on the `rmw-microxredds` package memory configuration:
48
56
49
-
```C
57
+
```json
50
58
# colcon.meta example with memory requirements to use a parameter server
51
59
{
52
60
"names": {
@@ -65,19 +73,21 @@ The parameter server uses 4 services and an optional publisher, this needs to be
65
73
66
74
On runtime, the variable `RCLC_PARAMETER_EXECUTOR_HANDLES_NUMBER` defines the RCLC executor handles required for a parameter server:
67
75
68
-
```C
76
+
```c
69
77
// Executor init example with the minimum RCLC executor handles required
Once the parameter server and the executor are initialized, the parameter server must be added to the executor in order to accept parameters commands from ROS2:
107
-
```C
117
+
```c
108
118
// Add parameter server to executor including defined callback
0 commit comments