ROS2: how to specify parameter with namespace in python launch file?
It is unclear to me how a parameter with namespace is accessed in a python launch file.
I define a parameter in my node with:
self.declare_parameters(
namespace="ns1",
parameters=[("bar", "default_value_bar_ns1")],
)
In my python launch file I'm trying to set a new value for this parameter with:
parameters=[
{
"ns1.bar": "new_value_bar_ns1", # this does not work!
}
],
With this the parameter "bar" in namespace "ns1" remains unchanged.
What am I doing wrong? Thanks in advance.
Minimal working example here: https://github.com/pglira/ros2-answer...
I'm using ROS2 galactic with the official docker image "ros:galactic".