def __init__(self, config):
host = unrealcv.HOST
port = unrealcv.PORT
if 'endpoint' in config:
host, port = config['endpoint']
if 'port' in config:
port = config['port']
if 'hostname' in config:
host = config['hostname']
self.opencv_bridge = cv_bridge.CvBridge()
self._client_lock = threading.Lock()
self._client = unrealcv.Client(endpoint=(host, port))
self._client.connect()
if not self._client.isconnected():
raise RuntimeError("Could not connect to unrealcv simulator, is it running?")
# Service attributes
self._get_camera_view_service = None
评论列表
文章目录