目录
1、速腾16线激光测试参考:
源码地址:
https://github.com/RoboSense-LiDAR/ros_rslidar
多线激光使用、建图总结见:
https://blog.csdn.net/xingdou520/article/details/85098314
2、测试目的:
1、测试速腾聚创ROS驱动程序的执行过程,数据流向;
2、确认pub的数据格式,时间戳问题;
3、每一场数据包含的激光测量的具体角度问题确认。
4、点云格式确认,是否可以自定义点云格式,从而减小数据拷贝造成的时间、资源浪费。
3、测试结果:
1、rslidar_driver每次pub一场数据的时候,每场数据的起始角度都不一样。
2、每一场数据超过360度,在361-364度之间。
3、rslidar_driver驱动程序,每一场数据包含84个UDP数据包(rslidarPacket.msg每个数据包1248字节数据),每个包间隔1.1-1.4ms,合起来刚好100ms一场数据。每次读取84个完整数据包后pub一次数据(rslidarSacn.msg),
4、驱动程序发布数据的时间戳是激光传感器传上来的最后一包的数据的时候,ROS给数据添加的时间戳。
double time1 = ros::Time::now().toSec();
UDP方式读取一包数据
// Average the times at which we begin and end reading. Use that to
// estimate when the scan occurred. Add the time offset.
double time2 = ros::Time::now().toSec();
pkt->stamp = ros::Time((time2 + time1) / 2.0 + time_offset); //时间戳
5、rslidar_pointcloud包作用,订阅rslidarSacn.msg,并根据标定文件将原始数据转为sensor_msgs::PointCloud2数据发布出去。
/** @brief Callback for raw scan messages.
原始激光数据的回调函数
*/
void Convert::processScan