MATLAB: Deviation of vehicle from Lane Center

Automated Driving Toolboxcentercurvedeviationdistanceestimationvehicle

Hi guys,
could someone explain to me, how the "Estimate Lane Center" block in this example works? I dont really understand the explanation text
The Estimate Lane Center subsystem outputs the data from lane sensors to the lane keeping controller. The detector in this example is configured to report the left and right lane boundaries of the current lane in the current field-of-view of the camera. Each boundary is modeled as a length of a curve whose curvature varies linearly with distance (clothoid curve). To feed this data to a controller, offset both of the detected curves toward the center of the lane by the width of the car and a small margin (1.8 m total). Weight each of the resulting centered curves by the strength of the detection and pass the averaged result to the controller.
I just want to know how the deviation of the vehicle from the lane center is calculated

Best Answer

The Estimate Lane Center subsystem outputs the lane offset data to the Lane keeping controller. The previewed curvature provides the centerline of lane curvature and the lateral deviation measures the distance between the vehicle and the centerline of the lane. The relative yaw angle measures the yaw angle difference between the vehicle and the road.
So, to keep the vehicle in the middle of the lane the controller reduces lateral deviation and the relative yaw angle , by controlling the steering angle.
Related Question