ROS2, set parameters from file and directly?
I have one parameter which is defined inside the python launch file (multiple nodes use this parameter), and the other parameters should be loaded from a parameter file.
Is it possible to use a parameter file and to set parameters directly in a python launch file at the same time? In the documentation, I did not find a way to handle this. It looks like, it is only possible to set a parameter file or to define the parameters directly.
trajectory_visualization_param = get_param_file('arg_trajectory_visualization, 'arg_trajectory_visualization.param.yaml')
trajectory_source = "p3"
trajectory_visualization_velocity_planner_node = Node(
package="arg_trajectory_chunk_provider",
node_executable="arg_trajectory_visualization",
node_name="arg_trajectory_visualization_velocity_planner",
parameters=[{"trajectory_source": trajectory_source}],
node_namespace=vehicle_ns
)
I do not want to have something like a global parameter server. https://roboticsbackend.com/ros2-global-parameters/
Is there a way to handle this nicely, or how would you handle this?