What does %time entry mean in a .txt file obtained by writing rosbag data to it ?

asked 2022-09-09 04:36:39 -0500

ros_user_ak gravatar image

updated 2022-09-09 04:38:26 -0500

I have a rosbag file which when played publishes IMU data to /imu/data topic and ros::Time to /clock topic..

I used the below command to write the data published on topic /imu/data to .txt file.

rostopic echo -b imu_file.bag -p /imu/data > imu_data.txt

When I open the .txt file, this is how it appears:

%time,field.header.seq,field.header.stamp,field.header.frame_id,field.orientation.x,field.orientation.y,field.orientation.z,field.orientation.w ......(continued)

1432235498025043042,2127,1432235497988949113,imu_link,0.4441650138815254,-0.544871234893404,-0.5507411489153416,0.45001884929497193 ......(continued)

Clearly, the first row is the field names of sensor_msgs/Imu msg type.

However, the first element %time is not part of sensor_msgs/Imu.

%time has values of type ros::Time.fromNSec() as seen in second row.

What does this %time represent related to that rosbag ?

Could someone give more information here ?

Note: I have a random guess that it is the ros::Time published by /clock topic.

edit retag flag offensive close merge delete