how to start rosbag record only after required nodes are active

asked 2022-10-31 00:39:02 -0500

rcbot gravatar image

Hi, I am trying to record topics from two nodes (node 1 and node 2) using rosbag node(node3). So, I am using roslaunch file to launch all the three nodes (node1, node2 and node3 (rosbag node) at the same time. node1 start publishing its topics straight away and rosbag node start recording those topics from node1. But, node2 start publishing its topic only after some delay due to some of its internal process.Due to this, the node2 topics available in rosbag file only after some delay. But, I would like to record these respective two nodes topics only after both nodes start publishing their topics. I am wondering is there a way to check whether all the required topics are published by its respective nodes and then only start recording these topics.

I really appreciate it if you can help me with this issue.

edit retag flag offensive close merge delete