Skip to content

Commit c4cda03

Browse files
mgagvaniDocGarbanzo
authored andcommitted
fixes addressing @Ezward review
1 parent ed9ca8d commit c4cda03

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed

donkeycar/parts/lidar.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -737,10 +737,12 @@ def run(self, measurements):
737737
plot_polar_angle(draw, bounds, self.border_color, 0,
738738
self.angle_direction, self.rotate_plot)
739739

740-
# handle no data yet
741-
if measurements is None:
742-
print("bruh")
743-
return np.asarray(self.frame)
740+
# data points
741+
if measurements:
742+
plot_polar_points(
743+
draw, bounds, self.mark_fn, self.point_color, self.mark_px,
744+
[(distance, angle) for distance, angle, _, _, _ in measurements],
745+
self.max_distance, self.angle_direction, self.rotate_plot)
744746

745747
# data points
746748
plot_polar_points(

donkeycar/templates/complete.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -882,15 +882,6 @@ def add_camera(V, cfg, camera_type):
882882
'imu/gyr_x', 'imu/gyr_y', 'imu/gyr_z'],
883883
threaded=False)
884884

885-
elif cfg.CAMERA_TYPE == "OAKD":
886-
from donkeycar.parts.oak_d import OakD
887-
cam = OakD(
888-
enable_rgb=cfg.OAKD_RGB,
889-
enable_depth=cfg.OAKD_DEPTH,
890-
device_id=cfg.OAKD_ID)
891-
V.add(cam, inputs=[],
892-
outputs=['cam/image_array', 'cam/depth_array'],
893-
threaded=True)
894885

895886
elif cfg.CAMERA_TYPE == "LIDAR_PLOT":
896887
from donkeycar.parts.lidar import LidarPlot2

0 commit comments

Comments
 (0)