Lidar fixes

This commit is contained in:
Piv
2020-04-15 21:41:09 +09:30
parent e09465e33c
commit 65c19e7494
2 changed files with 7 additions and 6 deletions

View File

@@ -4,13 +4,14 @@ from tracking.lidar_cache import LidarCache
from multiprocessing import Process
import messaging.message_factory as mf
from rplidar import RPLidar
from Messaging import messages
from messaging import messages
class LidarServicer(PersonTrackingServicer):
def __init__(self):
# TODO: Put the rplidar creation in a factory or something, to make it possible to test this servicer.
# Also, it would allow creating the service without the lidar being connected.
self.cache = LidarCache(RPLidar('/dev/ttyUSB0'), measurements=100)
self._mFactory = None
self._port = None