New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use/modify/implement new algorithm in planning module? #3462
Comments
|
You can implement a new planner (modules/planning/planner/planner.h) for your new algorithm. |
|
That not really what I looking for. Right now I just want to play around/modify the existing Planners, but it seems they do not work and I don't know why. Can you explain/tell me what wrong here? Thank you. |
|
"Like I said, in the log file planning.INFO, the output is routing not ready; skip the planning cycle. the EMPlanner only goto the Init() function, the plan() function is never called." "And if the planning cycle is skipped, why the car still shows the planning line in the dreaming view." |
|
thank you for your reply. |
|
Did you generate a routing? Only turning on the routing module will not generate one. After you filtered the planning in the rosbag and started your own planning, you can click Default Routing in the Dreaview to generate a routing message. |
|
I think the filter should be "topic != '/apollo/planning'" (not == ). The topic will be kept if it the expression is true. To start planning module, please (1) build the project you have modified (using bash apollo.sh build) (2) run the planning binary in a separate terminal (using bash scripts/planning.sh), or just turn on the planning from dreamview. |
|
I follow all your suggestion, but still not works. in new terminal: And the log file for planning.INFO
Another question, how to switch to another planner. I search around and see someone mention to make a change in the planning.proto to switch planner. I did but it seems do not work. Before
After
I also try to change " planner_type = 0" but it give a build error
I also did try to change RTK = 5, and planner_type = 5, but it not work either. Thank you for your support and being patient with me. |
|
Which routing did you choose? I tested "Route: sunnyvale loop" and it works. |
|
I figure it out, has to choose the "Route: sunnyvale loop reverse", only that I can see the route (red line). Another question: |
|
--- to change to another planner, please (1) add your planner name in planning_config.proto (line 31 - 35); (2) define the config of your own planner in planning_config.proto (after line 29); (3) change "planner_type : EM" to the one you have in planning_config.pb.txt. --- Because the car in the rosbag has position info pre-recorded, it cannot follow your planning trajectory. If you want to make the car follow a generated path, you need to turn on the "SimControl" button (tasks->others) in the dreamview. Under the sim-control mode, the dreamview will receive the planning trajectory and help to move the car for you to mimic the driving process. |
|
thank. I got all i need now. |
How to choose the "Route: sunnyvale loop reverse"? |
|
Hi @lianglia-apollo I read you know how to add or switch to a new planner. I am using Apollo 6.0 now. And I tried to change the planner from ROAD_PUBLIC to LATTICE defined in the planning_config.pb.txt as you and this post #13650 suggested: However the planner did not work. I mean the planning module is disabled on dreamview when I turn it on, as you can check here: Then after this I also attempt to change the code below from file planning_config.proto: I changed from 1 (Public_Road planner type) to 3 (Lattice planner) and compiled the workspace again with success. What am I doing wrong? Is it possible to swich Apollo 6.0 planners? Could you please provide a step-by-step to how to change the planners? Which files I need to modify the code and which lines? Thanks a lot for some reply! |
|
Hi @lianglia-apollo could you kindly say me how to define the LATTICE planner config (just an example). It seems that this is the code missing for me enable/ change for the Lattice Planner. I have done a lot of attempts to change the planner. Please take a look: |




Hi,
I want to implement a new planner algorithm, I am still new to Apollo, right now, I just want to know how the framework work.
I have several questions about using the planning module in Apollo.
When running the demo (demo.bad and demo_2.bag), the log data recorded that
routing not ready; skip the planning cycle.in planning.cc andRouting is not ready.in reference_line_provider.cc . I do turn on the planner and routing modules in the Module Controller, but the routing module keeps turning off.If it skips the planning cycle why the car still seems to have a planner line to follow in the DreamView visualization, can you explain what happens here?
How to use RTK planner? I change the planning_config.proto but it still uses the EM planner.
Thank you.
The text was updated successfully, but these errors were encountered: