Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I'm not sure if there other constraints surrounding this, but one way is to make the time_now argument configurable on the command line:

<launch>
  <arg name="time_now" default="temp" />
  <rosparam command="dump" param="/robot_description" file="robot_description_$(arg time_now).yaml" />
  <node name="rosbag" pkg="rosbag" type="record"
        args="-O robot_$(arg time_now).bag /chatter "/>
</launch>

and then call it like so (I saved the above in a file called test.launch):

roslaunch test.launch time_now:=$(date +%Y-%m-%d-%H-%M-%S)

I'm not sure if there are other constraints surrounding this, but one way is to make the time_now argument configurable on the command line:

<launch>
  <arg name="time_now" default="temp" />
  <rosparam command="dump" param="/robot_description" file="robot_description_$(arg time_now).yaml" />
  <node name="rosbag" pkg="rosbag" type="record"
        args="-O robot_$(arg time_now).bag /chatter "/>
</launch>

and then call it like so (I saved the above in a file called test.launch):

roslaunch test.launch time_now:=$(date +%Y-%m-%d-%H-%M-%S)