예제 #1
0
 void OnRobotStopUpdate()
 {
     RobotCommunicator.SetData(TxKitBody.ServiceName, "HeadPosition", Vector3.zero.ToExportString(), false, false);
     RobotCommunicator.SetData(TxKitBody.ServiceName, "HeadRotation", Quaternion.identity.ToExportString(), false, false);
     RobotCommunicator.SetData(TxKitBody.ServiceName, "Speed", Quaternion.identity.ToExportString(), false, false);
     RobotCommunicator.SetData(TxKitBody.ServiceName, "Rotation", "0", false, false);
 }
예제 #2
0
    public void ConnectRobot(RobotInfo roboIfo)
    {
        if (RobotCommunicator == null)
        {
            return;
        }
        if (_robotStatus.Connected)
        {
            RobotCommunicator.Disconnect();
        }

        _robotStatus.Connected = RobotCommunicator.Connect(roboIfo);
        RobotCommunicator.ClearData(true);
        //	m_roboComm->Connect("127.0.0.1",3000);
        RobotCommunicator.SetUserID("yamens");
        RobotCommunicator.ConnectUser(true);
        string addrStr = Utilities.LocalIPAddress();

        /*
         * addrStr += "," + _ports.LeftEyeVideo.ToString();
         * addrStr += "," + _ports.RightEyeVideo.ToString();
         * addrStr += "," + _ports.AudioPort.ToString();
         * addrStr += "," + _ports.HandsPort.ToString();
         * addrStr += "," + _ports.ClockPort.ToString();
         * addrStr += "," + _ports.Rtcp.ToString();*/

        addrStr += "," + DataCommunicator.GetPort();
        RobotCommunicator.SetData("", "Connect", addrStr, true, false);

        addrStr = DataCommunicator.GetPort().ToString();        //_ports.CommPort.ToString();
        RobotCommunicator.SetData("", "CommPort", addrStr, true, false);
    }