How to import argument/variables set within included roslaunch files?

asked 2019-08-15 08:46:48 -0500

joaocandre gravatar image

If I nest a launch file within another using the <include> tag:

<launch>
    <include file="other.launch"/>
</launch>

can I access the arguments set within the include file, e.g. if other.launch:

<launch>  
    <arg name="foo" value="bar">
</launch>

Is there a way to access the value of foo on the initial launch file?

edit retag flag offensive close merge delete

Comments

I don't believe that's possible based upon what I've read at the Wiki but I'm still on the initial learning curve with ROS.

Trying to pass information back up the launch file tree leads me to believe you might have some dependencies in your Launch file tree backwards. Maybe you could elaborate on what you are trying to do and why you need this behavior and we could suggest another solution?

bakerhillpins gravatar image bakerhillpins  ( 2019-08-15 13:30:27 -0500 )edit