RCLC parameter server implementation has been refactored in version v3.0.8-rolling.
This upgrade has been implemented to add ROS 2 parameters features to the micro-ROS default user API, the RCLC.
As you know, micro-ROS supports a partial implementation of parameters in order to allow users to tailor the memory used by their embedded micro-ROS application. Sometimes, those kinds of optimizations make it necessary to cut off some interesting features.
During the lifetime of the first approach to the micro-ROS parameter server implementation available in micro-ROS Foxy and Galactic, the micro-ROS community has been providing feedback that have allowed us to prepare a major refactor for micro-ROS Rolling & Humble.
The new features are:
- Removing parameters. Now micro-ROS parameters can be deleted via the common
ros2 param delete
. - Adding new undeclared parameters. By means of using
ros2 param set
on a non-existent parameter will create a new parameter if there is enough preallocated memory for it andallow_undeclared_parameters
is enabled in configuration. - Parameter server
on_change
callback allows to reject parameter modification, creation or deletion.- Improved
ros2 param describe
integration with parameter description, constraints and read only support.
- Improved
- New extra low memory mode that allows an even lower memory footprint of the parameter server implementation at expense of disabling some features**
As a reference, a 7 parameter server with RCLC_PARAMETER_MAX_STRING_LENGTH = 50
and notify_changed_over_dds = true
in an STM32F4 will take about 12 kB in normal mode and about 4 kB in the new extra low memory mode.
-
Take a look at an example of the new micro-ROS parameter server API.
-
Check the documentation related to the micro-ROS parameter server.