Skip to content

Standard interface for parsing parameters from yaml files  #671

@v-lopez

Description

@v-lopez

Feature request

Feature description

Provide a standard interface for parsing parameters from yaml files to avoid code duplication.

Loading a parameter file is something extremely common in ROS1. In ROS2 it's possible as part of a Node launch_ros action. I also made a PR to add it as a ros2 param verb: ros2/ros2cli#590

In the future there will be more situations where this is needed, and it's not straightforward because of wildcard node names and nested parameters. Another use case here. Also I believe there should be a launch_ros action that allows to load parameters on an existing node.

So there are already 2 implementations of loading a yaml file, and soon will be more unless we put this code somewhere.

Implementation considerations

Could we add it to https://github.com/ros2/rclpy/blob/master/rclpy/rclpy/parameter.py ?
At least the part of parsing a yaml file + node name into an array of ParameterMsg.

Might be interesting of implementing the dumping functionality from ros2 param dump here as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions