How to export time data (to .txt file) published on /clock topic by playing a rosbag file ?
I have a rosbag file which publishes time values to /clock
topic when I play it.
I need to save these time values to a .txt
file.
There is one relevant solution as shown below:
rostopic echo -b file.bag -p /topic > data.txt
However, in my case the /clock
topic publishes data of type ros::Time
Therefore, data cannot be written to text file. I need these ros time values in double sec;
so that it can be written to .txt
file.
Any suitable solution for this problem ?
Asked by ros_user_ak on 2022-09-07 10:44:31 UTC
Comments
I am not sure if there are ready-made solutions for this. Nevertheless, the rosbag/Code API should be helpful.
Asked by ravijoshi on 2022-09-07 22:50:17 UTC