ApolloAuto / apollo

An open autonomous driving platform
Apache License 2.0
24.81k stars 9.65k forks source link

[Prediction Bug] Apollo can not correctly predict the trajectory of a vehicle in the intersection. #14637

Open AV-Security opened 1 year ago

AV-Security commented 1 year ago

Describe the bug

When the ego passed through the intersection, there was an NPC vehicle on the left side traveling at a constant speed, and the ego's inaccurate prediction of its trajectory led to a collision.

*Note: Simulator platform was LGSVL and the perception results were ground-truth data provided by LGSVL.

System information OS Platform and Distribution: Ubuntu 18.04 Apollo installed from (source or binary): source Apollo version : 6.0 (master branch - commit b5bd74112e2ec5d7c65cad6bea592353de566156)

To Reproduce

The video corresponding to the collision scenario is in the attachment.

Expected behavior

The ego should be able to stop early at the intersection or accelerate away from it early to evade the NPC.

Additional context

It seems that the speed changes greatly in the predicted trajectory output by the JoinlyPredictionPlanningEvaluator in this scenario, which is inconsistent with the state of NPC driving at a constant speed.

Demo Video

https://user-images.githubusercontent.com/87695978/194473072-96c67dfd-bb68-48da-a7b0-69478da37007.mp4

Attachments

Collision Video

ntutangyun commented 1 year ago

If you're using the ground truth perception, with ground truth velocity, then there is nothing wrong with the predicted trajectory of the vehicle.

Before making the right turn, Apollo made an OVERTAKE decision believing that at its current speed it could overtake the truck.

However, what Apollo didn't take into consideration is that it needs to decelerate such that it could make this sharp right turn. And due to this deceleration, it cannot OVERTAKE the truck anymore...

So I think this is a planning issue instead of the prediction issue., similar to issue here.

AV-Security commented 1 year ago

@ntutangyun thanks for your comments. I understand that this collision may be avoided by fixing the problem of planning. However, we try to replace the prediction result of the prediction module with the actual trajectory of NPC in our test and find that the ego will stop and wait in front of the intersection instead of colliding with the NPC. So we believe that even if the ground truth perception data is provided, the difference between the prediction output trajectory and the actual trajectory will still affect the planning decisions and result in the collision.

ntutangyun commented 1 year ago

if you examine the video closely. you'll notice that the in yhe beginning of the test case, there is no predicted trajectory of the truck. and the predicted trajectory has to grow for a few seconds before it overlaps with the ego's trajectory.

and it is within these few seconds that Apollo believes its path is obstacle-free and decides to enter the intersection. apollo seems to be have a initial speed as well...

So i think it is due to this unusual start condition of the test case.

if you add more distance for apollo and let it run in the more or less steady state before entering hte junction and give it sufficient time to make predictions of the truck. it should be able to stop and give way to the crossing vehicle.

if it doesn't. then it would fails probably due to the same reason i mentioned earlier. that it should give way instead of overtake. and it is for sure a planning issue.