Exemple #1
0
        public void Start()
        {
            GameObject wso = GameObject.Find("WebsocketClient");

#if UNITY_EDITOR
            wsc = wso.GetComponent <WebsocketClient>();
#else
            wsc = wso.GetComponent <UWPWebSocketClient>();
#endif
        }
Exemple #2
0
    void Start()
    {
        GameObject wso = GameObject.Find("WebsocketClient");

#if !UNITY_EDITOR
        wsc = wso.GetComponent <UWPWebSocketClient>();
#else
        wsc = wso.GetComponent <WebsocketClient>();
#endif
        GameObject.Find("ControlSphere").transform.position = GameObject.Find("right_wrist").transform.position; // moves the control sphere
        wsc.Advertise("ein/" + "right" + "/forth_commands", "std_msgs/String");
    }
Exemple #3
0
    void Start()
    {
        GameObject wso = GameObject.Find("WebsocketClient");

#if !UNITY_EDITOR
        wsc = wso.GetComponent <UWPWebSocketClient> ();
#else
        wsc = wso.GetComponent <WebsocketClient>();
#endif

        wsc.Subscribe(topic, "std_msgs/String", "none", 0);
    }
Exemple #4
0
        // Use this for initialization
        void Start()
        {
            Debug.Log("GraspManager Awake()");
            GameObject wso = GameObject.Find("WebsocketClient");

            graspObject.SetActive(false);

#if UNITY_EDITOR
            wsc = wso.GetComponent <WebsocketClient>();
            #else
            wsc = wso.GetComponent <UWPWebSocketClient>();
            #endif
            wsc.Advertise(graspSaveTopic, "std_msgs/String");
            wsc.Advertise(placeSaveTopic, "std_msgs/String");
        }
Exemple #5
0
        // Use this for initialization

        //void Awake() {
        void Start()
        {
            lastLoadLabels = "nothing";
            Debug.Log("Initialized Label Manager");
            //WTemplate = GameObject.Find("Waypoint0");
            //Labelpoints = new List<Label>();
            Debug.Log("LabelManager Awake()");
            GameObject wso = GameObject.Find("WebsocketClient");

            #if UNITY_EDITOR
            wsc = wso.GetComponent <WebsocketClient>();
#else
            wsc = wso.GetComponent <UWPWebSocketClient>();
#endif
            wsc.Advertise(labelSaveTopic, "std_msgs/String");
            wsc.Advertise(labelLoadITopic, "std_msgs/String");
            wsc.Subscribe(labelLoadTopic, "std_msgs/String", "none", 0);
        }
Exemple #6
0
        // Use this for initialization
        void Start()
        {
            //if build
            GameObject wso = GameObject.Find("WebsocketClient");

#if UNITY_EDITOR
            wsc = wso.GetComponent <WebsocketClient>();
#else
            wsc = wso.GetComponent <UWPWebSocketClient>();
#endif
            wsc.Subscribe(movoStateTopic, "std_msgs/String", "none", 0);
            wsc.Subscribe(movoPoseTopic, "std_msgs/String", "none", 0);
            wsc.Advertise(unityWaypointPubTopic, "std_msgs/String");
            wsc.Advertise(movoStateRequestTopic, "std_msgs/String");
            wsc.Advertise(movoPoseRequestTopic, "std_msgs/String");
            wsc.Advertise(moveitIdentityPoseRequestTopic, "std_msgs/String");

            currentlyNavigating   = false;
            hasPublishedWaypoints = false;
            frameCounter          = 0;
        }