[ROS2 Foxy] How to parse launch arguments
Hi all, I have a launch file with two arguments that allows me to configure it. I'm finding a way to get the value of those arguments, but it seems that it's not possible or I have not understood what to do.
I need the value of the parameters to perform a few checks and to compose the name of the configuration files that must be loaded by the nodes.
I tried using LaunchConfiguration
, but the values are not replaced using the CLI syntax <param>:=<value>
.
I tried using DeclareLaunchArgument
but the values are not available until the node is not starting.
Is there a way to get this feature working?
Thank you Walter
Do you have an example of how you use
LaunchConfiguration
andDeclareLaunchArgument
? From my understanding, looking at the ros2launch example, you need to first declare the launch argument and then use the launch configurationThe problem is that it's not possible to create an "if" control looking at the value of an argument because that value is not available for pre-processing... at least that's what I understood
I am having a similar problem, have you managed to find a solution?
No solutions for the moment