Tidy up lidar tracker and its protos
This commit is contained in:
@@ -1,27 +1,26 @@
|
||||
import persontracking.lidar_tracker_pb2 as lidar_tracker_pb2
|
||||
from persontracking.lidar_tracker_pb2_grpc import PersonTrackingServicer
|
||||
from persontracking.lidar_cache import LidarCache\
|
||||
|
||||
from persontracking.lidar_cache import LidarCache
|
||||
from multiprocessing import Process
|
||||
|
||||
|
||||
class LidarServicer(PersonTrackingServicer):
|
||||
lidar_thread = None
|
||||
|
||||
def __init__(self):
|
||||
self.cache = LidarCache(measurements=100)
|
||||
self.cache.do_scanning()
|
||||
|
||||
def set_tracking_group(self, request, context):
|
||||
pass
|
||||
|
||||
def stop_tracking(self, request, context):
|
||||
self.cache.stop_scanning()
|
||||
|
||||
def get_scan_data(self, request, context):
|
||||
pass
|
||||
self.lidar_thread.join()
|
||||
self.lidar_thread = None
|
||||
|
||||
def start_tracking(self, request, context):
|
||||
'''
|
||||
Starts the lidar cache.
|
||||
'''
|
||||
pass
|
||||
|
||||
if self.lidar_thread is None:
|
||||
self.lidar_thread = Process(target=self.cache.do_scanning)
|
||||
|
||||
Reference in New Issue
Block a user