Skip to content

Commit 669ce2f

Browse files
committed
Refactor ai method in Driver class to remove camera data and update lidar handling
1 parent c182b2d commit 669ce2f

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/HL/Driver.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ def __init__(self, context_size=0, horizontal_size=0):
1616
def omniscent(self, lidar_data, camera_data):
1717
return self.ai_update_lidar_camera(lidar_data, camera_data)
1818

19-
def ai(self, lidar_data, camera_data):
20-
return self.ai_update_lidar(lidar_data, camera_data)
19+
def ai(self, lidar_data):
20+
return self.ai_update_lidar(lidar_data)
2121

2222
def simple_minded(self, lidar_data):
2323
return self.farthest_distants(lidar_data)
@@ -51,7 +51,6 @@ def ai_update_lidar_camera(self, lidar_data, camera_data):
5151
return angle, vitesse
5252

5353
def ai_update_lidar(self, lidar_data):
54-
raise NotImplementedError("This method doesn't work anymore")
5554
lidar_data = np.array(lidar_data, dtype=np.float32)
5655
# 2 vectors direction and speed. direction is between hard left at index 0 and hard right at index 1. speed is between min speed at index 0 and max speed at index 1
5756
vect = self.ai_session.run(None, {'input': lidar_data[None]})[0][0]

0 commit comments

Comments
 (0)