erdos-project / pylot

Modular autonomous driving platform running on the CARLA simulator and real-world vehicles.
https://pylot.readthedocs.io/
Apache License 2.0
459 stars 132 forks source link

frenet_optimal_trajectory_planner error #282

Open zxkic opened 1 year ago

zxkic commented 1 year ago

Hello! It's me again. I tried the pylot on a new PC. I can run the RRS planner well while the frenet_optimal_trajectory cannot run. It shows no free pointer() and double free(). I check the code and found that the error occurs in the FrenetOptimalTrajectory.cpp. It exits in line 30 due to not enough waypoints, so the pointer called csp don't create but it deletes in line 69(in the function called "~FrentOptimalTrajectory()"). Then, I check the waypoints and found the waypoints in line 120 of fot_planner.py. I inserted some code to print the waypoints. As a result, the length of the waypoint is only one. So, I skip the exit code in FrenetOptimalTrajectory.cpp, then the fot planner runs well.

e8bb2890f078c9e5606b6b40840b301

pschafhalter commented 1 year ago

Hi, thanks for the report!

Looks like the Frenet implementation might need some extra code to handle the early exit when there's not enough waypoints. The planner is hosted at erdos-project/frenet_optimal_trajectory_planner. If you'd like to contribute your fix, I'd be happy to help you with the PR.