forked from hku-mars/FAST-LIVO2
-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
输出话题的时间辍可能混乱,可以使用如下函数代替原本的时间辍
rclcpp::Time get_ros_time(double timestamp)
{
int32_t sec = std::floor(timestamp);
auto nanosec_d = (timestamp - std::floor(timestamp)) * 1e9;
uint32_t nanosec = nanosec_d;
return rclcpp::Time(sec, nanosec);
}参考fast_lio的ros2迁移版https://github.com/DJTU-RM-TOE/FAST_LIO_ROS2/blob/ros2/include/common_lib.h
Metadata
Metadata
Assignees
Labels
No labels