Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 43e71290 authored by AUTERNAUD Alex's avatar AUTERNAUD Alex
Browse files

if can not find a path issue

parent af77249d
Branches
No related tags found
No related merge requests found
......@@ -69,6 +69,9 @@ class PathPlanner():
dx=dx,
coords=(x, y),
max_distance=self.max_d)
if len(xl) == 0 or len(yl) == 0 or len(vxl) == 0 or len(vyl) == 0:
return []
d_angle = np.arctan2(vxl[0], -vyl[0]) - pos[2]
if dl[0] < self.max_d_orientation: # if within range, set waypoint = target
wpt_pos = [self.target[0], self.target[1], self.target[2]]
......@@ -142,9 +145,10 @@ class PathPlanner():
continue
wpt = self.get_next_waypoint(robot_pose)
with lock:
shared_waypoint[0] = True
shared_waypoint[1] = float(wpt[0])
shared_waypoint[2] = float(wpt[1])
shared_waypoint[3] = float(wpt[2])
if wpt:
with lock:
shared_waypoint[0] = True
shared_waypoint[1] = float(wpt[0])
shared_waypoint[2] = float(wpt[1])
shared_waypoint[3] = float(wpt[2])
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment