ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

You can use the $(env ...) substitution arg.

So

<node pkg="rosbag" type="record" 
args="-o /home/($env USER)/catkin_ws/src/bagfiles/chatter /chatter" name="record" output="screen"/>

Then again, that user would need to have the directory structure ~/catkin_ws/src/bagfiles/chatter present. I suggest to use something that is definitiely available, i.e. either directly storing into the home directory, or something read-writable by any user...

You can use the $(env ...) substitution arg.

So

<node pkg="rosbag" type="record" 
args="-o /home/($env /home/$(env USER)/catkin_ws/src/bagfiles/chatter /chatter" name="record" output="screen"/>

Then again, that user would need to have the directory structure ~/catkin_ws/src/bagfiles/chatter present. I suggest to use something that is definitiely available, i.e. either directly storing into the home directory, or something read-writable by any user...