Error when use .py to run the code

Hi!
I have successfully run the tutorial in tum-cps / commonroad-search · GitLab using .ipynb
But when I try to copy this .ipynb file(tutorials/2_commonroad_search · master · tum-cps / commonroad-search · GitLab) to .py file for debug, the code gets stuck in this sentence

list_paths_primitives, _, _ = motion_planner.execute_search()

Then my computer crashed. I guess the program fell into some kind of infinite loop. But this doesn’t happen in .ipynb. Could you help me solve it? Thank you!

Hi salt0107fish,

Thank you for asking.

Would you mind telling me, which scenario are you running in the notebook?

Another hint on this: if the result of the scenario in batch processing is timeout, it means this scenario cannot be solved within the given amount of time. In tutorial 2, memory leakage could happen because we currently have no timeout protection for it. For debugging a timeout scenario, you might need to come up with some methods on your own.

Hope this can help you. Your further questions are always welcome.

Best,
Mingxuan

1 Like

Thank you for your reply!

I have solved the problem follow your instructions! As I didn’t change any configuration in the file tutorials/2_commonroad_search · master · tum-cps / commonroad-search · GitLab,
the scenario is ‘USA_Lanker-1_2_T-1
According to your suggestion, I set timeout judgment and solved the problem. The tutorial provides two motion primitives .xml files, but only one can find a valid path.

By the way, when I change the scenario to SinD ‘CHN_SinDD-7281_101_T-10.xml’, the code gets stuck in

motion_planner = MotionPlanner.create(scenario=scenario,
                                          planning_problem=planning_problem,
                                          automaton=automaton,
                                          motion_planner_type=type_motion_planner)

Could you help me?
Thank you very much!

Hi @salt0107fish ,

The scenario you mentioned is not in our database, so we can’t really test it. Regarding the motion primitives: You can generate an own set of motion primitives (e.g., with a more finer discretization), which can help if one wants the search-based -planner to find more solutions, e.g., in more complex scenario.

Best,
Gerald

Thank you very much!