博客
关于我
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/

你可能感兴趣的文章
npm报错Failed at the node-sass@4.14.1 postinstall script
查看>>
npm报错fatal: Could not read from remote repository
查看>>
npm报错File to import not found or unreadable: @/assets/styles/global.scss.
查看>>
npm报错TypeError: this.getOptions is not a function
查看>>
npm报错unable to access ‘https://github.com/sohee-lee7/Squire.git/‘
查看>>
npm淘宝镜像过期npm ERR! request to https://registry.npm.taobao.org/vuex failed, reason: certificate has ex
查看>>
npm版本过高问题
查看>>
npm的“--force“和“--legacy-peer-deps“参数
查看>>
npm的安装和更新---npm工作笔记002
查看>>
npm的常用操作---npm工作笔记003
查看>>
npm的常用配置项---npm工作笔记004
查看>>
npm的问题:config global `--global`, `--local` are deprecated. Use `--location=global` instead 的解决办法
查看>>
npm编译报错You may need an additional loader to handle the result of these loaders
查看>>
npm设置淘宝镜像、升级等
查看>>
npm设置源地址,npm官方地址
查看>>
npm设置镜像如淘宝:http://npm.taobao.org/
查看>>
npm配置安装最新淘宝镜像,旧镜像会errror
查看>>
NPM酷库052:sax,按流解析XML
查看>>
npm错误 gyp错误 vs版本不对 msvs_version不兼容
查看>>
npm错误Error: Cannot find module ‘postcss-loader‘
查看>>