ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Okay, I finally found the problem: I changed
pointCloud.header.stamp = ros::Time::now().toNSec();
to
pointCloud.header.stamp = ros::Time::now().toSec();
and it seems to be working with both the old bagfile and the new ones (and hopefully with the live image feed).
I wonder why I didn't try this out (at least I tried just ros::Time::now()
) but also why they use toNSec()
in an example on the pcl_ros wiki page. Gonna send them a notification.
I don't know whether they changed the format of the time being published by bagfiles or if the timestamps in nanoseconds of the newer ones just were out of the 32bit range and I'm honestly too lazy to find out as it's working now but if anyone knows the details I'd be interested to hear.