How to record bagfile within launch file
I would like to record some topics via launch file.
<launch>
<!-- record topics listed below -->
<arg name="topics_name" default="joint_states /usb_cam/left/image_raw"/>
<!-- record topics -->
<node name="record_topics_for_verification" pkg="rosbag" type="record"
args="$(arg topics_name)"/>
</launch>
This code runs without any errors, however, there is no recorded bagfile in current directory.
Does anyone know the reason?