0
$\begingroup$

Rosanswers logo

The "sec" and "nsec" values in the message header are always zero when recording using "rosbag::write". I provide a valid Time for the second parameter, but that only seems to affect the message body timestamp and playback timing, but not the header. Is that expected?

I am converting some odometry and depth image information that was collected in Windows to a rosbag containing tf, depth_image, and camera_info messages (using rosbag API in C++)for consumption by the slam_gmapping node.

The rosbag I create looks correct and it plays back OK (correct timing) but the map is not generated. I looked at the code, and the slam_gmapping node is using a tf::MessageFilter. When I turn on DEBUG messages, I see messages like this "MessageFilter [target=/odom]: Added message in frame camera_depth_frame at time 0.000". The message queue fills up with messages with time 0.0000. When I inspect my bag with rqt_bag the header.sec and header.nsec are always zero, so I thought maybe that is the issue.

I have called "rosparam set use_sim_time true", but that does not help. Why is the header stamp always zero, and is that what is causing the tf::MessageFilter to never synch?


Originally posted by gershon on ROS Answers with karma: 73 on 2014-01-27

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I figured out how to set the header.
It is the geometry_msgs::TransformStamped that has a .header and .stamp... not the tf::tfMessage (which is a list of geometry_msgs)

-G


Originally posted by gershon with karma: 73 on 2014-01-27

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.