Compare commits

...

2 Commits

Author SHA1 Message Date
Sebastian Lorenz 09ca5b6c44
Merge 7e9f4b4cef into 1ef3f55c95 2024-07-31 15:31:40 +02:00
sebplorenz 7e9f4b4cef Added not None check for net-vector in turn decision, fixes #6467 2023-05-11 16:43:28 +02:00
1 changed files with 2 additions and 1 deletions

View File

@ -360,7 +360,8 @@ class GlobalRoutePlanner(object):
if select_edge['type'] == RoadOption.LANEFOLLOW:
if neighbor != route[index+1]:
sv = select_edge['net_vector']
cross_list.append(np.cross(cv, sv)[2])
if sv is not None:
cross_list.append(np.cross(cv, sv)[2])
next_cross = np.cross(cv, nv)[2]
deviation = math.acos(np.clip(
np.dot(cv, nv)/(np.linalg.norm(cv)*np.linalg.norm(nv)), -1.0, 1.0))