Make the lidar streamer ready to work with main controller

This commit is contained in:
Piv
2020-04-16 21:12:12 +09:30
parent 65c19e7494
commit ed371d3a2f
9 changed files with 53 additions and 23 deletions

View File

View File

@@ -2,8 +2,11 @@ from tracking.devices.mock_lidar import MockLidar
from rplidar import RPLidar
import tracking.lidar_loader as loader
connection = "TEST"
# connection = '/dev/ttyUSB0'
def get_lidar(connection: str):
def get_lidar():
# Need a way to configure this, maybe with environment variables
if connection == 'TEST':
return MockLidar(loader.load_scans_bytes_file("tracking/out.pickle"))
else: