1,095
社区成员




你好,我想请问下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点即可?
https://bbs.csdn.net/topics/603010675 这里有dirToVehicle的含义,作者以前回复过的