ROS2 python launch file parsing arguments directly to nodes

asked 2020-05-14 11:31:21 -0500

teunes1 gravatar image

Dear ROS community,

im using ros2 and made a file to start my nodes. I want to do something like this:
ros2 launch launch/ key:=value
but how do i pass it to the nodes?
with paramaters i only can load in yaml files and with arguments i have to use sys.argv to acces it. But if that is the case why do i have to put it like key:=value and not just only a value? so i have to make some uggly code because the launch file wants it in a different format..

i just wan't to use different settings depending on a condition and the condition i wan't to give through the ros2 launch call

sorry for my english

edit retag flag offensive close merge delete