Coordinate transformation from Cartesian to Frenet Frame

조회 수: 41 (최근 30일)
Suvo Ganguli
Suvo Ganguli 2021년 3월 9일
답변: Cameron Stabile 2023년 1월 26일
Can anyone tell me how to convert from Cartesian to Frenet Frame for a vehicle driving on a curved road? In other words how do I convert from (x,y) -> (s,d) where is along the curve and d is perpendicular to the curve?
Is there a Matlab code someone can share?
For example if the vehicle is 1 m off centerline and driving along the arc of a circle at speed 1 m/s, then the coordinates at every 1 sec in Cartesian and Frenet frame are given by:
x = cos(theta) ... [with the appropriate scalings for radius and speed]
y = sin(theta) ... [with the appropriate scalings for radius and speed]
s = (0, 1, 2, ...)
d = (1, 1, 1, ...)
I have been looking into Matlab codes but the solutions I got are in the form of (T, N, B) - the tangent, normal and binormal. How do I convert them to distance along the centerline and perpendicular to the centerline?
Thanks.
  댓글 수: 1
M I
M I 2021년 5월 21일
i recently found this: https://github.com/fjp/frenet/blob/master/matlab/Cart2FRT.m

댓글을 달려면 로그인하십시오.

채택된 답변

Cameron Stabile
Cameron Stabile 2023년 1월 26일
Hi Suvo,
The referencePathFrenet feature from the Navigation Toolbox might be of use to you. The feature fits a piece-wise clothoid spline between a set of or waypoints, after which you can convert between Cartesian and Frenet space.
There are a number of tools at your disposal, which loosely fall into the following categories:
Projection XY point to Curve:
Conversion between Cartesian and Frenet
Evaluating Curve at Arclength (S)
There are also a number of examples that show how this can be applied to road-based planners, a good one to get you started could be Highway Trajectory Planning Using Frenet Reference Path.
Hope this helps,
Cameron

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Motion Planning에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by