博客
关于我
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中实现ASCII码与字符相互转换
查看>>
Python中实现获取所有微信好友的头像并拼接成一张图片
查看>>
Python中对象的布尔值
查看>>
python中对集合的操作
查看>>
python中将列表转换为元组的时间复杂度,反之亦然
查看>>
Python中布尔表达式的求值
查看>>
python中很常用的10个内置函数整理(初学必备)
查看>>
python中打印二维列表数据
查看>>
python中打散数组shuffle
查看>>
Python中执行外部命令
查看>>
Python中拼接numpy数组-ChatGPT4o作答
查看>>
Python中提示:no module named 'PIL'
查看>>
Python中提示:UnicodeDecodeError: 'ascii' codec can't decode byte 0xe5 in position
查看>>
python中数据类型存储_浅谈Python中的数据类型
查看>>
python中文件最重要的功能是什么-学 Python 都用来干嘛的?
查看>>
python中文版语言_高盛最新调查:Python超过汉语成为未来最重要技能,你准备学哪种编程语言?...
查看>>
Python中文问题SyntaxError
查看>>
Python中方括号和括号括起来的列表有什么区别?
查看>>
python中时间处理_Python中处理时间的几种方法小结
查看>>
Python中枚举串口(包括虚拟端口)的跨平台方法是什么?
查看>>