Read parameter in launch file
Hi, I am new to ros and I am working with two launch files.
The first launch file launches a script written in cpp which sets a global parameter(creates folder with current date and time). The parameter just has the name of the folder created.
The second launch file needs to read this newly set parameter in its args tab. The second launch file is basically:
<launch>
<arg name="folderpath" value="/folderpath" />
<node pkg="rosbag" type="record" name="record" output="screen" args="-O $(arg folderpath) /rostopic"/>
</launch>
Can anyone suggest me how to do this?
P.S. Also, I can also dump the foldername to a Yaml file. Can this be read in second launch file?
Thanks in advance.