autonomousvision / tuplan_garage

[CoRL'23] Parting with Misconceptions about Learning-based Vehicle Motion Planning
Other
521 stars 57 forks source link

some questions about nuplan dataset #27

Closed jessapinkman closed 10 months ago

jessapinkman commented 11 months ago

Hello, I met some issues, these made me confusing, I would appreaite it if u could help me.

Firstly, what's the different between the open-loop and closed-loop(NR)? I have read the paper of nuplan, and i know these are both non-reactive patterns, so they simulate agents by directly replaying logs. I think the difference is that planner know the new state in closed-loop(NR) in each step, so planner can correct its trajectory in future, but open-loop dont considers that. Do I understand correctly?Can you tell me more about the differences between these two modes?

Secondly, i am going to try to use my own controller based RL to control the background agents, but actually i dont know how. Have you ever tried before? And could you tell me how they implement background IDM in the nuplan-devkit in the code?

DanielDauner commented 11 months ago

Hi @jessapinkman, Thanks for your interest in our project! Let’s get to your questions.

1. Open-loop vs. Closed-loop

You’re right that the simulated agents are directly replaying from the logs in open-loop (OL) and in closed-loop non-reactive (CL-NR). In the closed-loop reactive (CL-R) task, the vehicles are simulated with IDM and other agents (pedestrians, bicycles, etc.) or obstacles are also taken from the recordings. The planner receives the current environment state and the past two seconds in all sub-challenges.

However, the ego vehicle is also replayed from the logs in OL. The OL metrics compare the planner and expert trajectories based on displacements and heading errors. Thus, the planner does not control the vehicle during the simulation. In CL-NR and CL-R, the ego vehicle is simulated based on the planner trajectory with an LQR controller and a kinematic bicycle model. The CL metrics consider collisions, progress, etc.

You can check out my thesis if you want further details. Here, I elaborate on the three sub-challenges, the simulation, and the metrics.

2. Custom Background Agents

I haven’t implemented custom background agents in nuPlan yet. However, the devkit offers interfaces for customization. For example, idm_agents contains the implementation for the background IDM agents. Moreover, in abstract_ml_agents you can find an implementation for learned background agents. You should be able to create custom background behaviors by adhering to the abstract_observation interface.

Let me know if you have further questions!

jessapinkman commented 11 months ago

Thank you very much! @DanielDauner I didn't expect you to reply to me so quickly. In fact, I asked a question in the repo "nuplan-devkit", but no one replied to me for a long time. So, I am very grateful for your reply, as the Chinese proverb goes, "Listening to your words is worth reading for ten years.".

Additionally, how does your planner perform in terms of driving style diversity, such as its lane changing frequency being similar to that of expert trajectories? Can I use your planner to train multiple drivers with different driving styles, such as aggressive driving or normal driving? Is that possible?

DanielDauner commented 11 months ago

Thanks for the kind words! Getting started with nuPlan is difficult, as it often requires looking up topics in the source code. Therefore, I am happy to help.

If you want varying driving styles of our planners, check out the config of PDM-Closed. You could adjust the IDM parameters, or trajectory samples to get different driving styles. Our planner does not take lane changes if they are not represented in the lane graph. However, you could adjust the centerline path to simulated cut-in scenarios.

jessapinkman commented 10 months ago

Well, getting start is not easy for me. Thanks again for your reply.

Also, I may have some details to ask you, so could you keep this issue open? I guarantee it won't last too long. Of course, if you feel that this is causing you trouble, you can simply turn it off.

DanielDauner commented 10 months ago

No worries, feel free to ask!