Use PAIR socket for slam, tidy up python stuff.
This commit is contained in:
@@ -31,6 +31,10 @@ class SlamStreamer:
|
||||
to calling this method, and changing those values after
|
||||
calling this method will have no effect.
|
||||
'''
|
||||
|
||||
# Block until user opens zmq.
|
||||
self._socket.recv()
|
||||
|
||||
# Adapted from BreezySLAM rpslam example.
|
||||
# Connect to Lidar unit
|
||||
lidar = Lidar(self._lidar_connection)
|
||||
@@ -77,7 +81,7 @@ class SlamStreamer:
|
||||
return zmq.Context.instance()
|
||||
|
||||
def _create_tcp_pub_socket(self):
|
||||
return self._create_context().socket(zmq.PUB)
|
||||
return self._create_context().socket(zmq.PAIR)
|
||||
|
||||
def _start_socket(self, socket, port):
|
||||
socket.bind('tcp://*:' + str(self._port))
|
||||
|
||||
Reference in New Issue
Block a user