HKUST-Aerial-Robotics / A-LOAM

Advanced implementation of LOAM
Other
2.05k stars 789 forks source link

kittiHelper.cpp中时间戳问题 #34

Open bryantaoli opened 4 years ago

bryantaoli commented 4 years ago

if (to_bag) { bag_out.write("/image_left", ros::Time::now(), image_left_msg); bag_out.write("/image_right", ros::Time::now(), image_right_msg); bag_out.write("/velodyne_points", ros::Time::now(), laser_cloud_msg); bag_out.write("/path_gt", ros::Time::now(), pathGT); bag_out.write("/odometry_gt", ros::Time::now(), odomGT); } 是不是应该写成: if(timestamp == 0.0) { bag_out.write("/image_left", ros::TIME_MIN, image_left_msg); bag_out.write("/image_right", ros::TIME_MIN, image_right_msg); bag_out.write("/velodyne_points", ros::TIME_MIN, laser_cloud_msg); bag_out.write("/path_gt", ros::TIME_MIN, pathGT); bag_out.write("/odometry_gt", ros::TIME_MIN, odomGT); } else { bag_out.write("/image_left", ros::Time().fromSec(timestamp), image_left_msg); bag_out.write("/image_right", ros::Time().fromSec(timestamp), image_right_msg); bag_out.write("/velodyne_points", ros::Time().fromSec(timestamp), laser_cloud_msg); bag_out.write("/path_gt", ros::Time().fromSec(timestamp), pathGT); bag_out.write("/odometry_gt", ros::Time().fromSec(timestamp), odomGT); }