mark
- ros timestamp converted to floating point format
double time =ros::Time::now().toSec(); //把时间戳转化成浮点型格式
- Convert floating point format to ros timestamp
odom.header.stamp = ros::Time().fromSec(time); //把浮点型变成时间戳
mark
double time =ros::Time::now().toSec(); //把时间戳转化成浮点型格式
odom.header.stamp = ros::Time().fromSec(time); //把浮点型变成时间戳