Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
227 changes: 0 additions & 227 deletions bin/autonomy_main.py

This file was deleted.

9 changes: 4 additions & 5 deletions bin/depth_camera_test.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from lib.depth_camera import DepthCamera
from lib.obstacle_avoidance import ObstacleDetectionCamera
from lib.cameras.obstacle_avoidance import ObstacleDetectionCamera
import time
import math
import os
Expand All @@ -8,7 +7,7 @@
camera_horizontal_fov = 90.0
compass_direction = 0.0
current_position = (0, 0)

"""
def _update_blocked_areas(depth_lists):
grid_ticker = {}
max_ticks = 40
Expand All @@ -35,13 +34,13 @@ def _update_blocked_areas(depth_lists):
out_list.append((math.floor(k[0] + math.cos(compass_direction)), math.floor(k[1] + math.sin(compass_direction))))
out_list.append(k)
print(out_list)

"""
def main():
print("Started")
camera = ObstacleDetectionCamera(2.4, 50, -0.3)
print("Initialized")
fun = lambda a : int(a)
time.sleep(5)
# time.sleep(5)
#while True:
# print(camera.read_markers())

Expand Down
3 changes: 2 additions & 1 deletion bin/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ def __init__(self):
self.drive = Drive(collection=self)
self.gps = GpsThread(collection=self)
self.imu = ImuThread(collection=self)
self.camera = ObstacleDetectionCamera(1.8, 240, -0.3, test=True)
self.depth_camera = DepthCameraThread(collection=self)
self.camera = ObstacleDetectionCamera(1.8, 240, -0.3, self.depth_camera)

# Main process
print("[Info] Initializing main thread...")
Expand Down
2 changes: 1 addition & 1 deletion bin/subsystems_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from network import ProtoSocket, Device
from network.src.generated.Protobuf.drive_pb2 import DriveCommand
from lib.drive import Drive
from lib.network.drive import Drive

socket = ProtoSocket(port=8000, device=Device.DASHBOARD, destination=("127.0.0.1", 8001))
drive = Drive(socket)
Expand Down
Loading