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

Revision history [back]

You can specify a maximum duration for recording a rosbag using the --duration parameter as below:

rosbag record --duration=5m

In your case you could use a duration of 175m to achieve what you need. It's a bit clunky to have to specify the start time in the playback node and the duration in the recording node, but it will do the job.

You can also make the recording rosbag node required="true" so it shuts the whole launch file down automatically when it finishes.

Hope this helps.