Minor fixes
This commit is contained in:
parent
e930958297
commit
1408f6de53
|
@ -33,7 +33,9 @@ class GlobalRoutePlanner(object):
|
|||
This method traces a route between a starting and ending point.
|
||||
IF 'with_options' is True (deafult behavior), returns a list of [carla.Waypoint, RoadOption],
|
||||
being RoadOption a high level represnetation of what the direction of the route.
|
||||
If 'with_options' is False, the road options are computed, returning a list of carla.Waypoint
|
||||
If 'with_options' is False, the road options are computed, returning a list of carla.Waypoint.
|
||||
This might be interseting, for example, when computing a route in chunks, getting all the waypoint
|
||||
first and then adding the options
|
||||
|
||||
:param origin (carla.Waypoint): starting point of the route
|
||||
:param destination (carla.Waypoint): ending point of the route
|
||||
|
@ -120,7 +122,7 @@ class GlobalRoutePlanner(object):
|
|||
else:
|
||||
dot = 1
|
||||
|
||||
if 0 < dot < math.cos(math.radians(45)):
|
||||
if dot < math.cos(math.radians(45)):
|
||||
if lane_change_type:
|
||||
# Last lane change waypoint
|
||||
new_option = lane_change_type
|
||||
|
|
|
@ -308,13 +308,13 @@ def _retrieve_options(list_waypoints, current_waypoint):
|
|||
# the beggining of an intersection, therefore the
|
||||
# variation in angle is small
|
||||
next_next_waypoint = next_waypoint.next(3.0)[0]
|
||||
link = compute_connection(current_waypoint, next_next_waypoint)
|
||||
link = _compute_connection(current_waypoint, next_next_waypoint)
|
||||
options.append(link)
|
||||
|
||||
return options
|
||||
|
||||
|
||||
def compute_connection(current_waypoint, next_waypoint, threshold=35):
|
||||
def _compute_connection(current_waypoint, next_waypoint, threshold=35):
|
||||
"""
|
||||
Compute the type of topological connection between an active waypoint (current_waypoint) and a target waypoint
|
||||
(next_waypoint).
|
||||
|
|
Loading…
Reference in New Issue