Return empty in slam servicer
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import SlamController_pb2_grpc
|
||||
import SlamController_pb2_grpc
|
||||
import SlamController_pb2
|
||||
import slam_streamer as slam
|
||||
from threading import Thread
|
||||
|
||||
@@ -17,7 +18,9 @@ class SlamServicer(SlamController_pb2_grpc.SlamControlServicer):
|
||||
self.slam.map_meters = request.map_size_meters
|
||||
self.slam_thread = Thread(target=self.slam.start)
|
||||
self.slam_thread.start()
|
||||
return SlamController_pb2.Empty()
|
||||
|
||||
def stop_streaming(self, request, context):
|
||||
if self.slam_thread is not None:
|
||||
self.slam.stop_scanning()
|
||||
self.slam.stop_scanning()
|
||||
return SlamController_pb2.Empty()
|
||||
Reference in New Issue
Block a user