/// <summary>
        /// Remove a publisher from this connection
        /// </summary>
        /// <param name="publisher"></param>
        public void Unadvertise(ROSBridgePublisher publisher)
        {
            if (this.IsConnected)
            {
                this.webSocket.Send(ROSBridgeMsg.UnAdvertiseTopic(publisher.Topic));
            }

            this.publishers.Remove(publisher);
        }
        /// <summary>
        /// Add a publisher to this connection. There can be many publishers.
        /// </summary>
        /// <typeparam name="Tpub">Publisher type to advertise</typeparam>
        /// <param name="topic">Topic to advertise on</param>
        /// <returns>A publisher which can be used to broadcast data on the given topic</returns>
        public ROSBridgePublisher <Tmsg> Advertise <Tmsg>(string topic, uint queueSize = 0) where Tmsg : ROSMessage
        {
            ROSBridgePublisher <Tmsg> publisher = (ROSBridgePublisher <Tmsg>)Activator.CreateInstance(typeof(ROSBridgePublisher <Tmsg>), new object[] { topic, queueSize });

            publisher.SetConnection(this);

            this.publishers.Add(publisher);

            if (this.IsConnected)
            {
                this.webSocket.Send(ROSBridgeMsg.AdvertiseTopic(publisher.Topic, publisher.Type));
            }

            return(publisher);
        }
        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();
        }