Пример #1
0
        void Start()
        {
            if (!ConfigManager.Instance.configInfo.rosbridgeIP.Equals(string.Empty))
            {
                this.rosBridgeIP   = ConfigManager.Instance.configInfo.rosbridgeIP;
                this.rosBridgePort = ConfigManager.Instance.configInfo.rosbridgePort;
            }

            this.webSocketConnection = new ROSBridgeWebSocketConnection(rosBridgeIP, rosBridgePort);

            this.stringPublisher = this.webSocketConnection.Advertise <std_msgs.String>(topicName);

            // Connect to ROSbridge server
            this.webSocketConnection.Connect();

            this.stringMessage = new std_msgs.String();
        }
 public void SetConnection(ROSBridgeWebSocketConnection webSocketConnection)
 {
     this.webSocketConnection = webSocketConnection;
 }