public void IKP()
 {
     Debug.Log("IKP");
     UpdateIKPParameters();
     IKPResults = _hexaRequester.ReqIKP(IKPParams);
     UpdateIKPResults();
 }
Exemple #2
0
    public void IKP()
    {
        //try
        //{
        Debug.Log("IKP");
        UpdateIKPParameters();
        //if (IKPParams.)
        //{

        //}
        _IKPResult = _hexaRequester.ReqIKP(IKPParams);
        Debug.Log(_IKPResult.ResState);
        if (_IKPResult.ResState == "OK")
        {
            UpdateIKPResults();
            _hexaAnimationController.Animate(IKPParams, _IKPResult.AcuatorAngels);
            Infobox.text = "Time of IKP calculation: " + _IKPResult.CalcTime.ToString() + " ms.";
        }
        else if (_IKPResult.ResState == "Failed")
        {
            Infobox.text = "Cannot calculate the IKP with the input parameters.";
            Debug.Log("failed");
        }
        else
        {
            Infobox.text += _IKPResult.Message;
        }
        //}
        //catch (System.Exception e)
        //{
        //    Infobox.text += e.Message;
        //}
    }