Skip to content

Commit 31b0063

Browse files
committed
Update parameters with memory requirements
1 parent aa4de52 commit 31b0063

1 file changed

Lines changed: 25 additions & 24 deletions

File tree

_docs/tutorials/programming_rcl_rclc/parameters/parameters.md

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ permalink: /docs/tutorials/programming_rcl_rclc/parameters/
55

66
ROS 2 parameter allow the user to create variables on a node and manipulate/read them with different ROS2 commands. Further information about ROS 2 parameters can be found [here](https://docs.ros.org/en/galactic/Tutorials/Parameters/Understanding-ROS2-Parameters.html)
77

8-
Ready to use code related to this tutorial can be found in [`rclc/rclc_examples/src/`](https://github.com/ros2/rclc/blob/master/rclc_examples/src/example_parameter_server.c) folder. Fragments of code from this example is used on this tutorial.
8+
Ready to use code related to this tutorial can be found in [`rclc/rclc_examples/src/example_parameter_server.c`](https://github.com/ros2/rclc/blob/master/rclc_examples/src/example_parameter_server.c). Fragments of code from this example is used on this tutorial.
99

1010
Note: micro-ROS parameter server is only supported on ROS2 galactic distribution
1111

@@ -43,32 +43,33 @@ Note: micro-ROS parameter server is only supported on ROS2 galactic distribution
4343
}
4444
```
4545

46-
- Memory and executor requirements:
47-
The variable `RCLC_PARAMETER_EXECUTOR_HANDLES_NUMBER` defines the RCLC executor handles required for a parameter server.
48-
This needs to be taken into account when initializing the executor and on the colcon memory configuration of the `rmw-microxredds` package, which will need at least 4 services and 1 publisher:
46+
## <a name="parameters_init"/>Memory requirements
47+
The parameter server uses 4 services and an optional publisher, this needs to be taken into account on the `rmw-microxredds` package memory configuration:
4948

50-
```C
51-
# colcon.meta example with minimum memory requirements to use parameter server
52-
{
53-
"names": {
54-
"rmw_microxrcedds": {
55-
"cmake-args": [
56-
"-DRMW_UXRCE_MAX_NODES=1",
57-
"-DRMW_UXRCE_MAX_PUBLISHERS=1",
58-
"-DRMW_UXRCE_MAX_SUBSCRIPTIONS=0",
59-
"-DRMW_UXRCE_MAX_SERVICES=4",
60-
"-DRMW_UXRCE_MAX_CLIENTS=0"
61-
]
62-
}
49+
```C
50+
# colcon.meta example with memory requirements to use a parameter server
51+
{
52+
"names": {
53+
"rmw_microxrcedds": {
54+
"cmake-args": [
55+
"-DRMW_UXRCE_MAX_NODES=1",
56+
"-DRMW_UXRCE_MAX_PUBLISHERS=1",
57+
"-DRMW_UXRCE_MAX_SUBSCRIPTIONS=0",
58+
"-DRMW_UXRCE_MAX_SERVICES=4",
59+
"-DRMW_UXRCE_MAX_CLIENTS=0"
60+
]
6361
}
6462
}
65-
```
66-
67-
```C
68-
// Executor init example with the minimum RCLC executor handles required
69-
rclc_executor_t executor = rclc_executor_get_zero_initialized_executor();
70-
rc = rclc_executor_init(&executor, &support.context, RCLC_PARAMETER_EXECUTOR_HANDLES_NUMBER, &allocator);
71-
```
63+
}
64+
```
65+
66+
On runtime, the variable `RCLC_PARAMETER_EXECUTOR_HANDLES_NUMBER` defines the RCLC executor handles required for a parameter server:
67+
68+
```C
69+
// Executor init example with the minimum RCLC executor handles required
70+
rclc_executor_t executor = rclc_executor_get_zero_initialized_executor();
71+
rc = rclc_executor_init(&executor, &support.context, RCLC_PARAMETER_EXECUTOR_HANDLES_NUMBER, &allocator);
72+
```
7273

7374
## <a name="parameters_callback"/>Callback
7475

0 commit comments

Comments
 (0)