[AD Fundamentals] Prediction

Authored by Tony Feng

Created on Jan. 13th, 2022

Last Modified on Jan. 13th, 2022

Intro

This sereis of posts contains notes from the course Self-Driving Fundamentals: Featuring Apollo published by Udacity & Baidu Apollo. This course aims to deliver key parts of self-driving cars, including HD Map, localization, perception, prediction, planning and control. I posted these “notes” (what I’ve learnt) for study and review only.


Prediction Approaches

Neither approach (model-based or data-driven) is strictly better than the other but there are certain situations in which one is more useful than the other.

Model-based Prediction

The approach is intuitive, which incorporates with our existing knowledge of physics, traffic laws and human behavior.

  • Constructing different models for scenarios to indicate different vehicle behaviors.
  • Observing the vehicle to see if the movement matches one of the models.
  • E.g. Determining maximum safe turning speed on a wet road.

Data-driven Prediction

  • Feeding the data to train a machine learning model.
  • E.g. Predicting the behavior of an unidentified object sitting on the road.

Lane Sequence Prediction

  • A model-based prediction adopted by Apollo
  • Diviing the road into multiple lane segments.
  • Each segment covers a region in which car motion can be easy to describe.
  • Grouping vehicle behaviors into different patterns and describning those patterns as sequences of lane segments.


Obstacle Status

  • Position
  • Speed
  • Direction
  • Acceleration
  • Position inside the lane segment
    • The longitudinal distances from the object to the lane segement boundaries
    • The lateral distances from the object to the lane segement boundaries
  • State info from previous timesteps

Target Lane Prediction

Lane Segment Transitions

The goal of lane prediction is to generate trajectories for objects on the road. This is quite complicated.

We can look at predicting the transitions between lane segments. We can make this choice by calculating the probabilities for each lane sequence.

RNN for Target Lane Prediction

Apollo provides one RNN model for the lane sequences and another RNN model for the associated objects states.

Apollo then concatenates the outputs of these two RNNs and feeds them into another NN which estimates the probabilty for each lane sequence.

Trajectory Generation

Trajectory generation is the final step of lane prediction. How to generate the most likely trajectories after predicting the lance sequence?

  • Setting constraints between A and B
    • Assuming the car will align with the center of the target lane.
    • Ignoring trajectories that are impossible to be physically executed by the vehicle.
    • Considering the vehicle’s current state
  • Constructing a motion model given the initial state and final state
    • E.g. Polynomial model

Prediction Demo

Video Link


MIT License
Last updated on Jan 17, 2023 15:51 EST
Built with Hugo
Theme Stack designed by Jimmy