-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Difference in Cart2FRT and FRT2Cart in transformation.m #10
Comments
Hi Iman, Unfortunately I cannot replicate this issue as I don't have a running Matlab license at the moment. How large is the error between the results and does it stay similar when you try different distances from the reference path and curvatures? Best regards |
I have been using the same transformation.m code. The errors vary with the query position. The error is greater in the x direction. I have attached the results for two query objects. I first use Cart2FRT and then use its output as input to FRT2Cart and calculate the error between the chosen point and the and the result after transforming back and forth. Both these of the errors are for the case where ds = 0.001 (i.e. the length of faRefX and faRefY are 50933). For instance, the error for the second obstacle is more than 10 cm in x direction and 0.58 cm in y direction. |
I ran a slightly modified version of The calculated Here is the code I used for
|
How Can I transformation from Frenet coordinates to Cartesian coordinates? |
The short answer is that you need to locate yourself on your reference frame with the s and d coordinates. Another important point is that you should have X and Y information given by your reference frame. |
@fjp, thanks for your replay. |
Hi all, |
@imanask thanks a lot for sharing your corrected solution. If I ever find time to work on this again I would be very interested to add some unit tests for @elwaaamr I am not sure I understand your issue, but if you have (an array of) the s (longitudinal) and d (lateral) coordinates, together with your reference path that is given the the x-y-frame, then it should be straight forward to use the |
Hi Franz,
I would first like to thank you for building such a repo. I was trying out the transformation.m file. At the end of the code, we compare transform from Cartesian to Frenet and back to Cartesian. The results are not the same and we have some error in both the x and y positions. I thought this could be due to the ds=0.1. However, reducing ds by orders of magnitude did not help much in reducing the error. Is there any specific reason for this or is there a bug in the code that we need to look for?
Thanks,
Iman
The text was updated successfully, but these errors were encountered: