Пример #1
0
        protected virtual void Start()
        {
            rosSocket = GetComponent <RosConnector>().RosSocket;

            publicationId     = rosSocket.Advertize(Topic, MessageTypes.RosMessageType(MessageProvider.MessageType));
            PublicationEvent += ReadMessage;
        }
Пример #2
0
 void Start()
 {
     // The ROS part
     rosSocket     = transform.GetComponent <RosConnector>().RosSocket;
     publicationId = rosSocket.Advertize(topic, "sensor_msgs/CompressedImage");
     message       = new SensorCompressedImage();
     sequenceId    = 0;
 }
Пример #3
0
 public CameraImagePublisher2(RosSocket _rosSocket, string _topic, int ql)
 {
     qualityLevel  = ql;
     topic         = _topic;
     rosSocket     = _rosSocket;
     publicationId = rosSocket.Advertize(topic, "sensor_msgs/CompressedImage");
     message       = new SensorCompressedImage();
     sequenceId    = 0;
 }
Пример #4
0
 public void Start()
 {
     ball   = GameObject.FindGameObjectWithTag("Ball");
     velSub = gameObject.GetComponent <VelocitySubscriber>();
     velSub.actionReceived = true;
     viewData             = new Texture2D(cam.targetTexture.width, cam.targetTexture.height);
     rosSocket            = transform.GetComponent <RosConnector>().RosSocket;
     img.format           = "png";
     time                 = Time.time;
     cam.depthTextureMode = DepthTextureMode.Depth;
     pub_id               = rosSocket.Advertize("camera/image", "sensor_msgs/CompressedImage");
 }
        void Start()
        {
            // The ROS part
            rosSocket     = transform.GetComponent <RosConnector>().RosSocket;
            publicationId = rosSocket.Advertize(topic, "geometry_msgs/Vector3");
            message       = new GeometryVector3();
            //sequenceId = 0;
            //message.x = 0;   // -y in ROS
            //message.y = 0;   // z in ROS
            //message.z = 0 ;  //x in ROS

            //rosSocket.Publish(publicationId, message);
        }
Пример #6
0
 // Use this for initialization
 void Start()
 {
     rosSocket = transform.GetComponent <RosConnector>().RosSocket;
     pub_id    = rosSocket.Advertize("reward", "std_msgs/String");
 }