ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
It would be easier to subscribe to the topic from your own node and then record the time between callbacks. After two callbacks you could unsubscribe and the job's done.
It's best to avoid using command line tools from within programs, it's a very ugly solution.