Skip to content
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

Trajectory coordinate transformation causes the trajectory to be unsmooth #9

Closed
suannairen opened this issue Apr 29, 2024 · 4 comments

Comments

@suannairen
Copy link

Hello, I found that when processing the past trajectory of the ego vehicle, after the global coordinates are converted into local coordinates, the trajectory will become very unsmooth, but the real trajectory in the future will be smooth after this transformation. I found that when converting the past and future global coordinates, using two different functions resulted in different results.
They are convert_absolute_to_relative_poses, convert_absolute_quantities_to_relative (there may be problems)
Since the trajectory of the agent vehicle is also processed using convert_absolute_quantities_to_relative, this trajectory is also not smooth.
Below is the code diagram and the visualization you provided, the non-smooth trajectory that exists
13
9833c9f300c7b99bafefc92b627ad397
0e2c3131a48862edd2959945c9aaa667
fb8fa958f54cad65e71f47693fa5130b

How to solve this problem

@MCZhi
Copy link
Owner

MCZhi commented Apr 30, 2024

Hello @suannairen, thank you for bringing this to my attention. Since I am using the functions provided by the nuPlan devkit, I am not exactly sure why the noise is occurring. However, I believe that the lack of smoothness in the trajectories should not negatively affect the network's performance. Nevertheless, if you still wish to obtain smoother trajectories, you can try using the convert_absolute_to_relative_poses function with some minor adjustments.

@DanielDauner
Copy link

I have seen this non-smoothness in nuPlan before, often due to floating-point precision. When transforming from global to local coordinates (or vice versa), it's best to use float64 (aka double precision). The internal functions of nuPlan sometimes don't consider that. The less smooth trajectories should not really affect performance, though.

@suannairen
Copy link
Author

@

你好@suannairen,谢谢您让我注意到这一点。由于我使用 nuPlan devkit 提供的功能,因此我不确定为什么会出现噪音。但是,我相信欠缺平滑度不应该对网络的性能产生负面影响。因此,如果您仍然希望获得更平滑的体重,您可以尝试使用该convert_absolute_to_relative_poses功能进行一些简短的调整。

Thank you!

@suannairen
Copy link
Author

我以前在nuPlan中见过这种不平滑的情况,通常是由于浮点精度造成的。当从全局坐标转换为局部坐标(或反之亦然)时,最好使用float64(也称为双精度)。 nuPlan 的内部函数有时不考虑这一点。不过,不太平滑的计算不会真正影响性能。

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants