ApolloAuto / apollo

An open autonomous driving platform
Apache License 2.0
25.2k stars 9.71k forks source link

Why convert Cartesian to Frenet coordinate system? #4299

Closed lesun90 closed 6 years ago

lesun90 commented 6 years ago

Why convert Cartesian to Frenet coordinate system? what is the purpose and advantage of the Frenet coordinate system

Thank you.

jilinzhou commented 6 years ago

This same paper "Optimal Trajectory Generation for Dynamic Street Scenarios in a Frenet Frame" also explains this question. https://pdfs.semanticscholar.org/0e4c/282471fda509e8ec3edd555e32759fedf4d7.pdf

A bit of math about plane curve may help the understanding of the appendix in the paper.

berthu commented 6 years ago

If you don't convert to Frenet and other local coordinate systems, you would have to do some strange things like parameterize both X and Y positions with respect to time, and also solve for polynomials with very large coefficients.

IanKirwan commented 4 years ago

Why convert Cartesian to Frenet coordinate system? what is the purpose and advantage of the Frenet coordinate system

@lesun90 I'm sure you have a better understanding by now, but for anyone else with this question on their mind; The Cartesian system does not care about the road. The Frenet system is representing an object and its trajectory with respect to a reference path, which in the autonomous driving domain is the road or lane that your vehicle is on. This dramatically simplifies the problem of calculating where things really are, and what implications they may have. For instance if you are travelling around a sharp bend, the stationary vehicle in front of you will not be on the longitudinal axis of your vehicle until the last moment. It is however on the path that your vehicle is following and will mean that your vehicle must take some action other than persisting rigidly with that path. The Frenet system will tell you in simple terms where this vehicle is with respect to you and the road you are on i.e the distance along the road you are on and it's lateral position with respect to the centreline (if you use the centreline as your reference path). HTH.