简体   繁体   English

使用卡尔曼滤波器检测碰撞

[英]Using kalman filter for detecting collision

According to that post kalman 2d filter in python it can predict trajectories using position and velocities. 根据使用python的 post kalman 2d过滤器,它可以使用位置和速度来预测轨迹。 My question is how to use that predicted trajectory for predicting a collision that might happen in 5 mins for example. 我的问题是如何使用该预测轨迹来预测可能在5分钟内发生的碰撞。 Assuming 2D Cartesian coordinates system. 假设二维笛卡尔坐标系。

As a rule a stack overflow question is a coding question - we're not really at that level here. 通常,堆栈溢出问题是一个编码问题-在这里我们并不是真正的那个问题。 There may be other communities which are a better match for the question. 可能还有其他社区更适合该问题。

That being said, a Kalman filter is not the best way to detect a potential collision. 话虽如此,卡尔曼滤波器并不是检测潜在碰撞的最佳方法。 There are two different problems: 有两个不同的问题:

  1. Estimate the position and velocity of the vehicles. 估计车辆的位置和速度。 Generally a Kalman filter is used for this. 一般卡尔曼滤波器用于此。

  2. Predict if the trajectories will result in a collision. 预测轨迹是否会导致碰撞。 The solution to this is not generally a Kalman filter. 解决方案通常不是卡尔曼滤波器。 It's a geometry problem. 这是一个几何问题。

    We have from the Kalman filters the position and velocity estimates for both vehicles at a common time. 我们通过卡尔曼滤波器在同一时间对两辆车的位置和速度进行了估算。 We construct line-segments for the time of interest for both vehicles. 我们针对两种车辆的关注时间构造线段。 The segments start at the current position estimates, and the direction is taken from the velocity vector. 这些段从当前位置估计开始,并且方向是从速度矢量中获取的。 The length of the line-segment is the product of how much time you're considering for collision detection and the magnitude of the individual velocity vector estimates. 线段的长度是您要考虑的碰撞检测时间与各个速度矢量估算值的乘积。

    Then the question of a collision becomes - do these two line-segments intersect? 然后,碰撞的问题就变成了-这两个线段是否相交? The Kalman filter is not used to detect if line-segments intersect. 卡尔曼滤波器不用于检测线段是否相交。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM