lgsvl / simulator

A ROS/ROS2 Multi-robot Simulator for Autonomous Vehicles
Other
2.28k stars 781 forks source link

How to Trigger/ Switch different motion/local planners in Apollo 6.0 ? #1424

Closed marcusvinicius178 closed 3 years ago

marcusvinicius178 commented 3 years ago

Hi Someone here was able to use different local planners available in ApolloAuto version 6.0 or another previous Apollo version?

I am aware they have 4 different planners:

image

I am not sure if all of them are obstacle avoidance planners = local planners) or if they are also mission planners or behavior planners. The fact is that there are some rare issues related to motion planning usage, of users that attempted to change and trigger these planners in Apollo: https://github.com/ApolloAuto/apollo/issues/2429

However I repeated some of these hints and still did not work (at least for Apollo 6.0). My complete issue is described here: https://github.com/ApolloAuto/apollo/issues/13763

I would really appreciate if someone knows how to make these available planners useful ( How to properly compile them and set the suitable config files on planning module folder) I am really stuck on that, and I would like that the Ego vehicle avoided the obstacle, which is not happening as you can check below at the END of this video:

https://www.youtube.com/watch?v=9keDL75MS8M

https://www.youtube.com/watch?v=LRfhsuCyXXw&list=PL_d_YiRmUA3nnTRmF8QJKyPoEQhrdvpP2&index=1

The car stopped behind the NPC Static Agent forever....and any local planner to overtake it was triggered. That is why I which to launch other planners to see different behaviors and hopely some of these 4 available draws a trajectory to avoid this obstacle.

Thanks in advance

EricBoiseLGSVL commented 3 years ago

@lemketron ?

marcusvinicius178 commented 3 years ago

Hi @EricBoiseLGSVL I have checked from Apollo Documentation, a nice Framework called Dreamland, to test motion planners and algorithms with different scenarios: https://bce.apollo.auto/introduction?locale=en-us

However I could not complete the profile registration to get access to the "Task Management" tab so far. They do not accept cell phones outside China!?? Also I have no idea from the spots it is written in Mandarin, to select the proper region I am. Have you already used this tool, or know how to create a profile there?

The complete description with the error pictures are depicted below: https://github.com/ApolloAuto/apollo/issues/13799

EricBoiseLGSVL commented 3 years ago

@marcusvinicius178 yes, some features of Apollo may not be available outside China, or has not be open sourced. You can contact the team on the github but there is no guarantee you will get access. We will keep an eye out and if/when we will try to integrate into SVL Simulator.

marcusvinicius178 commented 3 years ago

Hi @EricBoiseLGSVL my answer was still not answered I believe. My last comment is not the answer of this issue, just another feature consideration. Sorry to make you confuse.

EricBoiseLGSVL commented 3 years ago

@marcusvinicius178 you are asking about Apollo planners. We can keep this issue open for a little while to see if anyone can help but since this is a issues page for svl simulator, we will need to mark this out of scope and close soon. I recommend posting on Apollo's issue page and even link it here, but we can't keep large open ended questions open like this.

marcusvinicius178 commented 3 years ago

Hi Eric, ok in this way I am going to close the issue. I believe it is not just to switch the planners in Apollo. But also the predictor and evaluator, once Apollo generates the trajectory based on obtacle behavior + scenario environment and finally send these inputs to the decision-making...something like that according to their documentation...

Secnario_based_planning

Habilitar_diferente_planner_módulo_H2E high_penalty_lateral_offset

optimization_ensure_collision_avoidance

Open_Space_used_JUST_for_Paking_planner driving_scenarios

E2E_driving_mode

I will try to change these codes a little bit as they suggest and see if I get some result. I was used with ROS1-navigation Stack where the user could apply different global/local planners, however for automous vehicles, it seems that is not so trivial and not just the "raw" planner will be the responsible to draw the trajectory, but the other modules described here as well....

EricBoiseLGSVL commented 3 years ago

Good luck and let us know what you find. :)

marcusvinicius178 commented 3 years ago

Ok @EricBoiseLGSVL It is easier than I though to change the planners: It is required just to change the name of the planner on the file planning_config.pb.txt from PUBLIC_ROAD to the one you need (my case Lattice).

The issue was that I could not visualize the planner working due EXTREME COMPLEXITY of the San Francisco scenario. Which made the Localization, Transform, Planning modules do not work properly.

As you can check in videos below on minute 1:20 the LATTICE planner worked on Single_Lane_Road scenario (SImple Scenario):

https://www.youtube.com/watch?v=wOC9skKuzUA

On TASKS panel, specifically on center of the screen in minute 3:30 you will see all the modules on GREEN color, which means they are working properly). Look into Module Delay topics:

image

However when I use the LATTICE planner with SAN FRANCISCO Scenario the planner fails, as you can check:

https://www.youtube.com/watch?v=a6UKYE7xmMY

In console there are messages telling : "RAW IMU message Delay IMU message is 54423 cycles 524.204 seconds behind current time" "RAW GPS message Delay IMU message is 52414 cycles 524.342 seconds behind current time"

The MODULE DELAY panel has bolded Planning module with RED image

I believe that this happens because the GPU is intensively working in other complex modules (PERCEPTION) and then allocated its power/cores to deal with the complex scenario. As a consequence the LOCALIZATION module is in second plan, prejudicing the TRANSFORM of data (From GPS coordinate to the Vehicle coordinate). In addition the PLATTICE planner always work on SIMControl (Dreamview DEbug internal Simulator). The Apollo 5.0 or Apollo 6.0 as you can check:

https://youtu.be/gGxte-e4w94

https://www.youtube.com/watch?v=bSlR05ihxq4

Therefore I conclude the error just occur when using the SVL simulator. Then what I need is a powerful machine or a machine with better clock frequency or both? Or is this error not related to the computational resources?

Please @EricBoiseLGSVL @lemketron which is a suitable machine to deal with this DELAY on Input messages (GPS, IMU) to run in SanFrancisco scenario... I do not understand why the Lattice planner fails with complex scenarios, but the PUBLIC_ROAD planner does not fail on SAN FRANCISCO or any scenario.

Could you specify which Desktop/Machine should I rent and where could I rent?

The Paperspace machines were not able to deal with (Tested already V100, P6000, P6000x2, RTX5000x2) Just to solve this issue that happens on Complex scenarios.

Thanks in advance