Skip to content

Commit 8947fca

Browse files
committed
Adjust lidar distance range in has_Crashed method for improved collision detection
1 parent d05555c commit 8947fca

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/HL/Car.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def stop(self):
153153

154154
def has_Crashed(self):
155155

156-
small_distances = [d for d in self.lidar.rDistance[360:720] if 0 < d < CRASH_DIST] # 360 to 720 is the front of the car. 1/3 of the fov of the lidar
156+
small_distances = [d for d in self.lidar.rDistance[300:780] if 0 < d < CRASH_DIST] # 360 to 720 is the front of the car. 1/3 of the fov of the lidar
157157
log.debug(f"Distances: {small_distances}")
158158
if len(small_distances) > 2:
159159
# min_index = self.lidar.rDistance.index(min(small_distances))

0 commit comments

Comments
 (0)