ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Problem with bag file

asked 2016-06-28 05:06:11 -0500

shashank gravatar image

updated 2016-06-28 07:13:39 -0500

hii, I wrote a bagfile . when i do rosbag info i do get the topic list but the duration is zero sec.The start and end time are same. Here is the info listed

path:        record.bag
version:     2.0
**duration:    0.0s**
start:       Jan 01 1970 05:53:37.58 (1417.58)
end:         Jan 01 1970 05:53:37.58 (1417.58)
size:        3.8 GB
messages:    20883
compression: none [1887/1887 chunks]
types:       geometry_msgs/PoseStamped [d3812c3cbc69362b77dc0b19b345f8f5]
             sensor_msgs/PointCloud2   [1158d486dd51d683ce2f1be655c3c181]
topics:      /gps_pose                          7125 msgs    : geometry_msgs/PoseStamped
             /lidar_2d                          3028 msgs    : sensor_msgs/PointCloud2  
             /lidar_3d                          1886 msgs    : sensor_msgs/PointCloud2  
             /lidar_four_plane_scanner_layer1   2211 msgs    : sensor_msgs/PointCloud2  
             /lidar_four_plane_scanner_layer2   2211 msgs    : sensor_msgs/PointCloud2  
             /lidar_four_plane_scanner_layer3   2211 msgs    : sensor_msgs/PointCloud2  
             /lidar_four_plane_scanner_layer4   2211 msgs    : sensor_msgs/PointCloud2

I wrote the rosbag file using rosbag class . Why is this error can anyone help me out.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-06-28 11:04:38 -0500

The start and end date are both at the unix epoch, i.e. zero. You need to set the message time. It is not necessarily the same as the time in the message header, but I guess for your purpose you can copy that one, if you have no original message time.

edit flag offensive delete link more

Comments

Sorry but i am confused . Is there a message time for rosbag file and a message time for topics ?? if it is so how do i set the time for rosbag file. Thanks for your replay.

shashank gravatar image shashank  ( 2016-06-28 23:22:36 -0500 )edit

The messages have a timestamp in the bagfile, so rosbag knows in which sequence play them. Also rosbag uses them to publish the /clock topic, so all nodes can act as if the data were current. Some messages also contain timestamps within the payload data of the message, usually by including "Header"

Felix Endres gravatar image Felix Endres  ( 2016-06-29 03:14:48 -0500 )edit

How did you "write" the bagfile?

Felix Endres gravatar image Felix Endres  ( 2016-06-29 03:15:26 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2016-06-28 05:06:11 -0500

Seen: 690 times

Last updated: Jun 28 '16