Self Driving Car Engineer Nanodegree Program -- Path Planning 3.3 Prediction

3.3 Prediction

3.3.1 Introduction and overview

  By making a successful prediction. you were able to make a decision that got you to your destination safely and efficiently.
  The responsibility of the prediction module is to do the following: We take as input a map of the world and data from sensor fusion and generate as output some predictions of the future state. Typically, these predictions are represented by a set of possible trajectories like that two dotted arrows.

  Two main classes of prediction techniques: model-based approaches and data-driven approaches. There, model-based approaches use mathematical models of motion to predict trajectories and data-driven approaches rely on machine learning and examples to learn from.

3.3.2 I/O Recap

  In reality the predictions we make extend to a horizon of 10-20 seconds. The trajectories shown have 0.5 second resolution. In reality we would generate slightly finer-grained predictions.

3.3.3 Model-Based vs Data-Driven Approaches


在这里插入图片描述

3.4.5 Data Driven Example - Trajectory Clustering

3.5.7 Thinking about Model Based Approaches

  Data driven approaches can be very useful particularly when we have access to plenty of training data. But in some ways purely data driven approaches are naive since they rely on solely on historical evidence to make predictions about likey future behavior. Ideally, we would also like to include, in our predictions, all the insights we have about driver behavior, physics, or vehicle dynamics. This is where model based approaches can help.

Model Based Approaches
for each dynamic object nearby:

  1. identify common driving behaviors (change lane, turn left, cross street, etc…)
  2. Define process model for each behavior. A process model is a mathematical description of object motion for behavior. It is a function which can be used to compute the state of the object at time t+1 from the state at time t. The process model must incorporate some uncertainty which represents how much we trust our model. If you keep running the process models your uncertainty will increase.
  3. Update beliefs by comparing the observation with the output of the process model. Use the process models to computes the probability of each behavior. This is done by taking the observed state of the object at time t-1, running the process models to compute the expected state of the object at time t. Then we compare the observed state of the object at time t with what our process models predicted. And we use a multimodal estimation algorithm to derive the probability of each meneuver.
  4. Trajectory Generation. Predict a trajectory for each behavior.

3.5.8 Frenet Coordinates

  Frenet Coordinates are a way of representing position on a road in a more intuitive way than traditional (x,y) Cartesian Coordinates.

  With Frenet coordinates, we use the variables ss and dd to describe a vehicle’s position on the road. The ss coordinate represents distance along the road (also known as longitudinal displacement) and the dd coordinate represents side-to-side position on the road (also known as lateral displacement).

  Imagine a curvy road like the one below with a Cartesian coordinate system laid on top of it…
在这里插入图片描述

 Now instead of laying down a normal Cartesian grid, we do something like you see below…
在这里插入图片描述

  Here, we’ve defined a new system of coordinates. At the bottom we have s=0s=0 to represent the beginning of the segment of road we are thinking about and d=0d=0 to represent the center line of that road. To the left of the center line we have negative dd and to the right dd is positive.

在这里插入图片描述
在这里插入图片描述
In fact, if this vehicle were moving at a constant speed of v 0 v_0 v0, we could write a mathematical description of the vehicle’s position as:
s ( t ) = v 0 t s(t) = v_0t s(t)=v0t
d ( t ) = 0 d(t) = 0 d(t)=0
在这里插入图片描述
Straight lines are so much eaiser than curved ones.

3.5.9 Process Models

在这里插入图片描述
W: The uncertainty on the process model is storted. A classic choic to represent uncertainty is a multivariate Gausian with zero mean.
在这里插入图片描述

3.5.11 Multimodal Estimation

  Autonomous multiple model estimation (AMM):

3.5.12 Summary of Data Driven and Model Based Approaches

You saw how process models can vary in complexity from very simple…
[ s ˙ d ˙ ] = [ s 0 0 ] + w \large \begin{bmatrix} \dot{s}\\ \dot{d} \end{bmatrix} = \begin{bmatrix} s_{0} \\ 0 \end{bmatrix} + \mathbf{w} [s˙d˙]=[s00]+w

to very complex:

[ s ¨ d ¨ θ ¨ ] = [ θ ˙ d ˙ + a s − θ ˙ s ˙ + 2 m ( F c , f cos ⁡ δ + F c , r ) 2 I z ( l f F c , f − l r F c , r ) ] + w \large \begin{bmatrix} \ddot{s} \\ \ddot{d} \\ \ddot{\theta} \end{bmatrix} = \begin{bmatrix} \dot{\theta}\dot{d} + a_s \\ -\dot{\theta}\dot{s} + \frac{2}{m}(F_{c,f}\cos\delta + F_{c,r}) \\ \frac{2}{I_z} (l_f F_{c,f} - l_rF_{c,r}) \end{bmatrix} + \mathbf{w} s¨d¨θ¨=θ˙d˙+asθ˙s˙+m2(Fc,fcosδ+Fc,r)Iz2(lfFc,flrFc,r)+w

 Process Models are first used to compare a target vehicle’s observed behavior to the behavior we would expect for each of the maneuvers we’ve created models for. The pictures below help explain how process models are used to calculate these likelihoods.
在这里插入图片描述

 On the left we see two images of a car. At time k − 1 k-1 k1 we predicted where the car would be if it were to go straight vs go right. Then at time k k k we look at where the car actually is. The graph on the right shows the car’s observed s s s coordinate along with the probability distributions for where we expected the car to be at that time. In this case, the s s s that we observe is substantially more consistent with turning right than going straight.

AMM can be summarized with this equation:

μ k ( i ) = μ k − 1 ( i ) L k ( i ) ∑ j = 1 M μ k − 1 ( j ) L k ( j ) \large \mu_k^{(i)} = \frac{\mu_{k-1}^{(i)}L_k^{(i)}}{\sum_{j=1}^M\mu_{k-1}^{(j)}L_k^{(j)}} μk(i)=j=1Mμk1(j)Lk(j)μk1(i)Lk(i)

or, if we ignore the denominator (since it just serves to normalize the probabilities), we can capture the essence of this algorithm with

μ k ( i ) ∝ μ k − 1 ( i ) L k ( i ) \mu_k^{(i)} \propto \mu_{k-1}^{(i)}L_k^{(i)} μk(i)μk1(i)Lk(i)
where the μ k ( i ) \mu_k^{(i)} μk(i) is the probability that model number i i i is the correct model at time k k k and L k ( i ) L_k^{(i)} Lk(i) is the likelihood for that model (as computed by comparison to process model).

Trajectory Generation
Trajectory generation is straightforward once we have a process model. We simply iterate our model over and over until we’ve generated a prediction that spans whatever time horizon we are supposed to cover. Note that each iteration of the process model will necessarily add uncertainty to our prediction.

Naive Bayes: It assumes that all features contribute independently.
Gaussian Naive Bayes: assume individual probabilities has gaussian distributions.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值