Beispiel #1
0
    // Use this for initialization
    void Start()
    {
        Application.targetFrameRate = TargetFrameRate;
        if (OculusCamera == null)       //Try to find OVRCameraRig component
        {
            OculusCamera = GameObject.FindObjectOfType <OVRCameraRig> ();
        }

        if (RobotConnector == null)
        {
            RobotConnector = gameObject.GetComponent <RobotConnectionComponent> ();
        }

        if (Configuration == null)
        {
            _customConfigurations = true;
            Configuration         = gameObject.AddComponent <TELUBeeConfiguration> ();
        }
        else
        {
            _customConfigurations = false;
        }

        Init();

        if (Debugger != null)
        {
            //		Debugger.AddDebugElement(new DebugCameraSettings(Configuration));
        }


        RobotConnector.AddDependencyNode(this);

        //	GStreamerCore.Ref ();
    }
 void StartRobot(RobotConnectionComponent r)
 {
     if(!r.IsRobotStarted())
         r.StartUpdate();
     else
         r.EndUpdate();
 }
Beispiel #3
0
    // Use this for initialization
    void Start()
    {
        if (RobotConnector == null)
        {
            RobotConnector = gameObject.GetComponent <RobotConnectionComponent> ();
        }

        if (Configuration == null)
        {
            _customConfigurations = true;
            Configuration         = gameObject.AddComponent <TELUBeeConfiguration> ();
        }
        else
        {
            _customConfigurations = false;
        }

        Init();

        if (Debugger != null)
        {
            //		Debugger.AddDebugElement(new DebugCameraSettings(Configuration));
        }


        RobotConnector.AddDependencyNode(this);

        //	GStreamerCore.Ref ();
    }
Beispiel #4
0
 // Use this for initialization
 void Start()
 {
     _impl = new ImplSinHeadController();
     Robot = GetComponent <RobotConnectionComponent> ();
     Body  = GetComponent <TxKitBody> ();
     Robot.AddDependencyNode(this);
 }
 // Use this for initialization
 void Start()
 {
     _manager = GameObject.FindObjectOfType <PresenceLayerManagerComponent> ();
     _robot   = GetComponent <RobotConnectionComponent> ();
     _robot.AddDependencyNode(this);
     _body = _robot.gameObject.GetComponent <TxKitBody> ();
 }
Beispiel #6
0
    // Use this for initialization
    void Start()
    {
        if (RobotConnector == null)
        {
            RobotConnector = gameObject.GetComponent <RobotConnectionComponent>();
        }
        _isConnected = false;
        _handsPort   = 7010;
        //if (HandRenderer == null)
        //	HandRenderer = GetComponent<LeapMotionRenderer> ();
        RobotConnector.AddDependencyNode(this);

        if (RobotConnector.IsRobotStarted())
        {
            OnRobotConnected(RobotConnector.Robot, RobotConnector.Ports);
        }

        if (SourceImage == null)
        {
            SourceImage = Utilities.WhiteTexture;
        }

        _imageGrabber = new GstUnityImageGrabber();
        //         _textureSource = new WebCamTexture(1280,720);
        //         _textureSource.Play();
    }
Beispiel #7
0
 public override void OnInputDisconnected(NodeBase src, string srcSlotName, string targetSlotName)
 {
     base.OnInputDisconnected(src, srcSlotName, targetSlotName);
     if (targetSlotName == "set_Robot")
     {
         Robot = null;
     }
 }
Beispiel #8
0
    // Use this for initialization
    void Start()
    {
        if (RobotConnector == null)
        {
            RobotConnector = gameObject.GetComponent <RobotConnectionComponent> ();
        }

        RobotConnector.AddDependencyNode(this);
    }
 void StartRobot(RobotConnectionComponent r)
 {
     if (!r.IsRobotStarted())
     {
         r.StartUpdate(false);
     }
     else
     {
         r.EndUpdate();
     }
 }
 void Connect(RobotConnectionComponent r)
 {
     if (!r.IsConnected)
     {
         r.ConnectRobot();
     }
     else
     {
         r.DisconnectRobot();
     }
 }
Beispiel #11
0
    // Use this for initialization
    void Start()
    {
        if (RobotConnector == null)
        {
            RobotConnector = gameObject.GetComponent <RobotConnectionComponent> ();
        }

        switch (HeadControllerType)
        {
        case AppManager.HeadControllerType.Oculus:
            HeadController = new OculusHeadController();
            break;

                        #if STEAMVR_ENABLED
        case AppManager.HeadControllerType.SteamVR:
            HeadController = new SteamVRHeadController();
            break;
                        #endif
        case AppManager.HeadControllerType.Keyboard:
            HeadController = new KeyboardHeadController();
            break;

        case AppManager.HeadControllerType.Custom:
            break;

        default:
            HeadController = new OculusHeadController();
            break;
        }
        switch (BaseControllerType)
        {
        case AppManager.BaseControllerType.None:
            BaseController = null;
            break;

        case AppManager.BaseControllerType.Oculus:
        default:
            BaseController = new OculusBaseController();
            break;
        }


        RobotConnector.AddDependencyNode(this);
    }
 public DebugRobotStatus(RobotConnectionComponent r)
 {
     Robot = r;
 }
Beispiel #13
0
 public DebugRobotStatus(RobotConnectionComponent r)
 {
     Robot = r;
     Body  = r.GetComponent <TxKitBody> ();
 }
 void Connect(RobotConnectionComponent r)
 {
     if(!r.IsConnected)
         r.ConnectRobot();
     else r.DisconnectRobot();
 }