Is parameter overrides supported in ROS2 launch?
Hello, I've used parameter overrides in ROS1. It's useful if we can use it in ROS2 as well. http://wiki.ros.org/roslaunch/Tutoria...
So I'd like to know:
- whether it's supported or not
- (if not supported) is it possible to implement it using Python launch API
As for 2, I think it's possible if we can:
- iterate all actions defined in previous contexts
- filter action by some conditions
- override filtered action's attribute
It's similar to what I asked in #q375384. Is it possible to do such a thing?
As a workaround, I periodically update parameters like this, but I know it's not a good way...
sample.launch.xml
parameter_overrides.launch.py
I'm not sure I 100% understand your question, and this may depend on your version of ROS2, but the following may be helpful:
In ROS2, parameters can be set in yaml files and can be scoped to specific nodes (e.g. from https://roboticsbackend.com/ros2-yaml-params/)
To me, this feels like what you are looking for... You can also set generic parameters (that would apply to all nodes) by using
**
instead of the node name, e.g.:You can also set parameters directly from the commandline (see here) using
ros2 param set <node name> <parameter name> <value>