Desired usage of the route_planner

Hi!

I was wondering how exactly the route planner is intended to be used. As far as I understand, the route_planner plans a high-level route on an empty street (no obstacles etc.). Therefore the resulting route is pretty simple.

Can the route planner take obstacles into account?
Is the intention to use the planned route or only the corresponding lanelets in a low-level-search algorithm?
How do you suggest to handle situations like this


Scenario: USA_Peach-3_1_T-1
Should this route from the route_planner look like this or is there an issue (e.g. caused by obstacles)?
Is it reasonable to use the route_planner for all possible problems?

Thanks! :slight_smile:

Hi, the route planner essentially plans a ‘route’ (list of lanelets) from the start lanelet to the goal lanelet, without considering obstacles (since it is just a high-level route). The reference path constructed from this route is fine except for the last bit (it should have continued till the end of the lanelet), but this is not related to the obstacles. I will look into that.

You can either use the route (list of lanelets) itself, or use the reference path as the guide for the lower level search. For example, you can compute the deviation of a primitive to the reference path (e.g. the Euclidean distance of the last state of a primitive to the reference path), and make this as a term in the heuristic function. As you can see, this is not the only factor that should be considered, the distance to goal is also important. The important thing to know is that we don’t have to “track” or “follow” the reference path. It is just used as a “guide” so that we are more likely to find a solution. Lastly, I don’t see an issue with using the route planner for all scenarios.

I took your advice and calculated the distance between the closest lanelet on the path and current position. When I return this function in heuristic in combination with the euclidean distance to the goal position, the search fails. I tried weights like 100:1, 1:100, 1:1,…
Should I try it with more combinations or does this mean there is something wrong with my function that calculates the distance to the path?

Thank you in advance

Hi, I would suggest using an IDE/editor (e.g. PyCharm, VS Code, …) to debug/examine the behavior of your planner when it executes. By this, you will be able to see the values of terms in your heuristic function and improve/adjust/change the function accordingly.