I want to start a ROS node and record all topics which are being published by the node. I plan to do this via a bash script.
The problem is when I first start the node and record a bag file, after the processing the bag file is generated but it is empty. I get this error message:
No messages to play on specified topics. Exciting.
My script so far:
#!/bin/bash
# launching my ros node:
roslaunch test test.launch
# [TODO] wait short period of time (until topics are available)
# record all topics via rosbag
rosbag record -a
# [TODO] kill ros node after specific amount of time/close bagfile
I think this is because when I start to record directly after starting the node there are no topics there.
Maybe someone has an idea how to do this. Any help would be much appreciated.