nuplan-devkit icon indicating copy to clipboard operation
nuplan-devkit copied to clipboard

How to retrieve the trajectory of ego vehicle more efficiently?

Open Zhenlin-Xu opened this issue 1 year ago • 0 comments

HI, community!

I am trying to extract the ego vehicle's trajectories (center.x and center.y of the vehicle at each time instant) using the NuPlanScenario.get_future_ego_trajectory(). But the query is so slow. This method uses the execute_many() to retrieve multiple rows already, but it still takes a lot of time even on the mini dataset.

I also tried trajdata which provides a unified API for loading different vehicle trajectory datasets. But it is still slow. So I think the main bottleneck is the SQL query to retrieve data from the DB files.

Do you have any idea how to tackle this problem?

Thanks in advance!

Zhenlin-Xu avatar Jun 25 '24 07:06 Zhenlin-Xu