Hi,
when I try to get my current lanelet in survival mode (= no goal region specified), I always get none because of the code in lanelets_of_position(). As you can see, every lanelet that was found before is removed from the list if its costs are -1 (= cannot reach the goal lanelet from there)
while len(correctLanelets) > 0:
if self.dict_lanelets_costs[correctLanelets[0]] == -1:
correctLanelets.pop(0)
else:
break
return correctLanelets
However, every lanelet is assigned -1 in the survival mode as this part of initialize_lanelets_costs() shows:
for lanelet in self.scenario.lanelet_network.lanelets:
self.dict_lanelets_costs[lanelet.lanelet_id] = -1
if self.list_ids_lanelets_goal is not None:
...
My question therefore is, how can I get my current lanelet in survival mode in order to avoid nearby obstacles?