博客
关于我
pointcloud_to_laserscan源码改动,实现激光雷达前部识别
阅读量:591 次
发布时间:2019-03-11

本文共 1024 字,大约阅读时间需要 3 分钟。

激光雷达的0点位置在接口处,源码的范围为[-3.1416-3.1416]逆时针排列。在制定激光雷达参数时,必须确保angular_max大于angular_min,并根据实际环境进行相关调整。

pointcloud_to_laserscan_nodelet.cpp源文件中,以下是关键的代码片段所关注的参数设置:

// 检查点云的高度是否在合理范围内if (*iter_z > max_height_ || *iter_z < min_height_) {    NODELET_DEBUG("rejected for height %f not in range (%f, %f)\n", *iter_z, min_height_, max_height_);    continue;}// 检查点云的投影范围是否在合理范围内double range = hypot(*iter_x, *iter_y);if (range < range_min_ || range > range_max_) {    NODELET_DEBUG("rejected for range %f not in range [%f, %f]\n", range, range_min_, range_max_);    continue;}// 检查角度是否在激光雷达的有效范围内double angle = atan2(*iter_y, *iter_x);if (angle < output.angle_min || angle > output.angle_max) {    NODELET_DEBUG("rejected for angle %f not in range [%f, %f]\n", angle, output.angle_min, output.angle_max);    continue;}

此外,激光雷达的映射范围角度增量设置应与实际部署环境相符。由于angular_max必须大于angular_min,建议在初始化时设置为以下范围:

angle_min_: -M_PI  // 开始角度angle_max_: M_PI   // 结束角度angle_increment_: M_PI / 180.0 // 单个角度点的增量

通过以上设置,可以确保激光雷达的扫描范围在逻辑上是自洽的,避免因角度范围设置错误导致的扫描异常。

转载地址:http://dmntz.baihongyu.com/

你可能感兴趣的文章
Python 中的 Pillow 不允许我打开图像(“超出限制“)
查看>>
Python 中的 threading 模块和 multiprocessing 模块有何区别?
查看>>
Python 中的 threading 模块和 multiprocessing 模块有何区别?
查看>>
Python 中的 Turtle 库详解
查看>>
Python 中的 __slots__ 属性有什么作用?
查看>>
Python 中的... 三点、箭头(->)、/ 分别的作用
查看>>
python读取json数据的id_python处理JSON数据
查看>>
Python 中的Duck Typing
查看>>
Python 中的for in 遍历生成字典、添加判断条件if
查看>>
Python 中的Lock与RLock
查看>>
Python 中的range(),arange()函数
查看>>
Python 中的内存管理机制
查看>>
Python 中的函数包装器:模型运行时和调试
查看>>
Python 中的列表理解和 lambda
查看>>
Python 中的多层for in嵌套循环使用
查看>>
Python 中的多线程(01/4)
查看>>
Python 中的多进程(01/2):简介
查看>>
Python 中的多进程(02/2):进程之间的通信)
查看>>
Python 中的字符串、列表、元组和字典数据类型的特点和使用场景
查看>>
Python 中的属性访问器是什么?如何使用 @property 装饰器?
查看>>