ApolloAuto / apollo

An open autonomous driving platform
Apache License 2.0
24.99k stars 9.66k forks source link

Current time is smaller than the first trajectory point produced by the Planning module. #14855

Open LIIHWF opened 1 year ago

LIIHWF commented 1 year ago

System information

Steps to reproduce the issue:

I'm using MODE_MOCK to simulate Apollo Autopilot, and found that the first trajectory point produced by the Planning module can be larger than the current time. Here is how I triggered this problem:

Is that the correct result? Do I need to configure any parameter to improve it?

YuqiHuai commented 1 year ago

Maybe the issue you described is causing SimControl to produce weird scenarios ...

https://user-images.githubusercontent.com/34195403/228130073-e2a86225-22c9-401f-a4b5-9c9e8abf84e2.mp4

LIIHWF commented 1 year ago

@YuqiHuai Thanks for your video!

So the update frequency of the Planning module must be below 10Hz? Is the time interval of the trajectory points determined by any configuration parameter?

Does this issue also affect real-world control?

YuqiHuai commented 1 year ago

@LIIHWF Based on https://github.com/ApolloAuto/apollo/blob/b00c030ac02c54f98579d3d3e879dbf52f0d1d53/modules/dreamview/backend/sim_control_manager/dynamic_model/perfect_control/sim_perfect_control.h#L167

I would guess the developers are expecting the Prediction frequency to be 10 Hz, and since Planning is triggered by Prediction then Planning should also be producing messages at 10 Hz. I haven't looked into the details of trajectory points' time intervals and I am also hoping someone more knowledgeable about this can determine what is causing the issue and why SimControl is shown to be teleporting back and forth.

I also guess this wouldn't have a real-world effect. Because Apollo sends control commands to LG SVL and I haven't seen anything weird about ego car movement in SVL-based scenarios besides the shaking issue that might have been caused by delays.

starrye commented 1 year ago

@LIIHWF Based on

https://github.com/ApolloAuto/apollo/blob/b00c030ac02c54f98579d3d3e879dbf52f0d1d53/modules/dreamview/backend/sim_control_manager/dynamic_model/perfect_control/sim_perfect_control.h#L167

I would guess the developers are expecting the Prediction frequency to be 10 Hz, and since Planning is triggered by Prediction then Planning should also be producing messages at 10 Hz. I haven't looked into the details of trajectory points' time intervals and I am also hoping someone more knowledgeable about this can determine what is causing the issue and why SimControl is shown to be teleporting back and forth.

I also guess this wouldn't have a real-world effect. Because Apollo sends control commands to LG SVL and I haven't seen anything weird about ego car movement in SVL-based scenarios besides the shaking issue that might have been caused by delays.

apollo的planning日志有什么异常的输出吗?比如一直replan什么的

LIIHWF commented 1 year ago

apollo的planning日志有什么异常的输出吗?比如一直replan什么的

Yes. In my case, the planning module reports warnings in the log:

[trajectory_stitcher.cc:156] current time smaller than the previous trajectory's first time

The parameter is_replan in the output is always true.

YuqiHuai commented 1 year ago

@starrye @LIIHWF Same here. I also noticed planning keeps sending "rerouting requests".