local planner 代码实现

彭晨202 彭晨202 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区

你好,我想请问下local planner 中代码实现的理解。我看到在local planner 中,需要对感知的点以机器人为中心在其周围进行一定角度的旋转(<360 度),如下代码:

for (int rotDir = 0; rotDir < 36; rotDir++) {
              float rotAng = (10.0 * rotDir - 180.0) * PI / 180;
              float angDiff = fabs(joyDir - (10.0 * rotDir - 180.0));
              if (angDiff > 180.0) {
                angDiff = 360.0 - angDiff;
              }
              // if the target is over 90 deg, ignore the point
              if ((angDiff > dirThre && !dirToVehicle) || 
                  (fabs(10.0 * rotDir - 180.0) > dirThre && fabs(joyDir) <= 90.0 && dirToVehicle) ||
                  ((10.0 * rotDir > dirThre && 360.0 - 10.0 * rotDir > dirThre) && fabs(joyDir) > 90.0 && dirToVehicle)) {
                continue;
              }
}

这里是假设机器人可以原地360度旋转来调整姿态的原因吗?可否详细说明下参数“dirToVehicle”的意思?如果我所控制的是Ackerman 的车,且offline 产生的轨迹已经覆盖了机器人所有的可行范围,那是不是不需要这步操作,而只需要crop 其所可行范围内的感知3D点即可?

...全文
评论 2
收藏 已收藏
分享
返回顶部