在室内测试了VLP16和HDL-32E两种激光雷达的数据输出。
根据官方手册25页左右给出的说明,激光探头是有安装误差和偏置的,因此想对偏置进行测试。
Coordinate Calculation Algorithm Sample Code After removing all the correction parameters except vertical correction, the calculation code is: firingData::computeCoords(guintl6 laserNum, boost::shared_ptr<CalibrationDB> db, GLpos_t &pos) { guintl6 idx = laserNum % VLS_LASER_PER_FIRING; boost::shared_ptr<CalibrationPoint> cal = db->getCalibration(laserNum); if (data->points[idx].distance == O) { coords[idx].setX(O.O); coords[idx].setY(O.O); coords[idx].setZ(O.O); return; } float distance = db->getDistLSB() * (float)data->points[idx].distance; II Get measured distance, distancel float cosVertAngle = cal->getCosVertCorrection(); float sinVertAngle = cal->getSinVertCorrection(); float cosRotAngle = rotCosTable[data->position]; float sinRotAngle = rotSinTable[data->position]; float xyDistance = distance * cosVertAngle; II Convert to X-Y plane coords[idx].setX(xyDistance * sinRotAngle + pos.getX()IVLS_DIM_SCALE); II Calculate X coordinate coords[idx].setY(xyDistance * cosRotAngle + pos.getY()IVLS_DIM_SCALE); II Calculate Y coordinate IICalculate Z coordinate coords[idx].setZ(distance * sinVertAngle + pos.getZ()IVLS_DIM_SCALE); }
其中的 pos.getX()IVLS_DIM_SCALE) pos.getY()IVLS_DIM_SCALE) pos.getZ()IVLS_DIM_SCALE) 就是偏置项。但是在附送的u盘或者github上下载的ros驱动中,这些偏置和校正都是0,(相比于速腾激光,每个激光都有对应的偏置文件),感觉很奇怪,按说如果不加偏置修正,测量出来的距离应该比实际距离来的小。因此进行实际测试。实际距离使用手持激光测距仪测量,精度可信。
测试环境如下图所示:
猜想会存在的误差
测试结果也是异常诡异,按说测量值应该小于实际距离,但是最终的结果,32线完美吻合,16线一左一右加起来反而比真实值大3-4cm!
实际距离 | 5.611m | 5.387m |
---|---|---|
VLP16 | 5.65m | 5.42m |
HDL-32E | 5.617m | 5.389m |