ROS2 Dashing overwrite default param via yaml
Hi,
I would like to understand how to use the new parameters API that will be introduced with ROS2 Dashing.
I read some links but it's still not clear.
https://index.ros.org/doc/ros2/Tutori...
https://index.ros.org/doc/ros2/Releas...
My scenario is the following: a node has some parameters. The default values for these parameters have to be hardcoded within the node. When running the node, it should be possible to pass a .yaml file with some updated values for one ore more parameters.
This is my node
class MyNode : public rclcpp::Node
{
public:
MyNode() : rclcpp::Node("my_name",
"",
rclcpp::NodeOptions().append_initial_parameter("my_param", 42))
{ }
}
The problem is that, as pointed out in the source code, initial values passed to constructor overwrite yaml file sources
https://github.com/ros2/rclcpp/blob/b...
How should I change the code of my node in order let the hardcoded parameter to be overwritten from the yaml one?
Thank you