ros2 / ros2/rclcpp

Update Parameter validation features

Open
#807 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C++
Stars
805
Forks
564
Avg merge
1d 17h
Merged PRs (30d)
27

Description

I went through the Read Only Parameters PR https://github.com/ros2/rclcpp/pull/495 and I experimented a little with Parameters validation via set_on_parameters_set_callback.

I think that there are 2 important features missing:

  • In some cases READ_ONLY is too restrictive. The following use-cases should be also possible: a parameter can be modified, but it can't be deleted; a parameter can be modified only by the node that declared it.
  • Currently it's possible to change the type of a parameter. To me this looks something that should be enabled only in particular cases, while the default behavior is that if a node declares a parameter to be bool I can't set it to a string or something else.

Both these things can be already done with a custom callback in set_on_parameters_set_callback, but it's quite verbose and not well documented.

Do you agree that these features should be present?
In case, should they be part of the ParameterDescriptor? I was reading about creating a custom structure for parameter constraints, but I haven't found a conclusion.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the ParameterDescriptor API and the set_on_parameters_set_callback mechanism referenced in the issue, along with the linked read-only parameters pull request. Determine whether the proposed deletion, ownership, and type constraints have an agreed design. Done means an accepted API direction with documented behavior and corresponding implementation scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.