# Parameters documentation incomplete or misleading

**URL:** <https://discourse.openrobotics.org/t/parameters-documentation-incomplete-or-misleading/26327>\
**Category:** ROS General\
**Created:** [July 4, 2022, 4:19am UTC](https://discourse.openrobotics.org/t/parameters-documentation-incomplete-or-misleading/26327 "2022-07-04T04:19:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![BrettRD](https://avatars.discourse-cdn.com/v4/letter/b/e47c2d/32.png) [@BrettRD](https://discourse.openrobotics.org/u/BrettRD)\
**Post date:** [July 4, 2022, 4:19am UTC](https://discourse.openrobotics.org/t/parameters-documentation-incomplete-or-misleading/26327/1 "2022-07-04T04:19:34Z")

</div>

I’m trying to track down some clear design rules the parameter system that replaced dynamic\_reconfigure. All the parts seem to be fully implemented in all client libraries, but I can’t find any examples of a correct usage.

The most common issue I see in public code (including tutorials) is that `add_on_set_parameters_callback` should **not** be used to update anything on the node.  
see [rclcpp docs](https://docs.ros.org/en/galactic/Concepts/About-ROS-2-Parameters.html#parameter-callbacks) and [rclpy docs](https://docs.ros2.org/latest/api/rclpy/api/node.html?highlight=parameterevent#rclpy.node.Node.set_parameters). Instead, there is a separate event (a specialisation of a subscription) that passes the values that were accepted by the `on_set_parameters_callback` of all nodes.

This design pattern seems to go back at least as far as Dashing, but the APIs have changed a lot since.

There’s no all-in-one demo, and the ros2 design document still says validation callbacks are [unimplemented](https://github.com/ros2/design/blob/gh-pages/articles/055_ros_parameter_design.md#unimplemented)

The API in rclcpp is a little cumbersome (maybe misleading?); it’s easy to set a validation callback on the node, but the parameter event comes back on a ParametersClient that you create separately. I can’t figure out how to make the same calls in rclpy.  
This also doesn’t combine well with the executors and callback groups for a multi-threaded node.

Am I missing some info? or should I make a tutorial and send PRs to the relevant docs?

---

<div class="post-metadata">

**Author:** ![doisyg](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/doisyg/32/14638_2.png) [@doisyg](https://discourse.openrobotics.org/u/doisyg)\
**Post date:** [July 8, 2022, 11:29am UTC](https://discourse.openrobotics.org/t/parameters-documentation-incomplete-or-misleading/26327/2 "2022-07-08T11:29:09Z")

</div>

I believe the best use cases of dynamic parameters in ros2 are in the nav2 stack, check it out: [GitHub - ros-navigation/navigation2: ROS 2 Navigation Framework and System](https://github.com/ros-planning/navigation2)
