Skip to content

Commit

Permalink
fixes addressing @Ezward review
Browse files Browse the repository at this point in the history
  • Loading branch information
mgagvani committed Jul 1, 2024
1 parent e526ce7 commit 435d3fb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
10 changes: 6 additions & 4 deletions donkeycar/parts/lidar.py
Original file line number Diff line number Diff line change
Expand Up @@ -737,10 +737,12 @@ def run(self, measurements):
plot_polar_angle(draw, bounds, self.border_color, 0,
self.angle_direction, self.rotate_plot)

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

# data points
plot_polar_points(
Expand Down
9 changes: 0 additions & 9 deletions donkeycar/templates/complete.py
Original file line number Diff line number Diff line change
Expand Up @@ -882,15 +882,6 @@ def add_camera(V, cfg, camera_type):
'imu/gyr_x', 'imu/gyr_y', 'imu/gyr_z'],
threaded=False)

elif cfg.CAMERA_TYPE == "OAKD":
from donkeycar.parts.oak_d import OakD
cam = OakD(
enable_rgb=cfg.OAKD_RGB,
enable_depth=cfg.OAKD_DEPTH,
device_id=cfg.OAKD_ID)
V.add(cam, inputs=[],
outputs=['cam/image_array', 'cam/depth_array'],
threaded=True)

elif cfg.CAMERA_TYPE == "LIDAR_PLOT":
from donkeycar.parts.lidar import LidarPlot2
Expand Down

0 comments on commit 435d3fb

Please sign in to comment.