Ejemplo n.º 1
0
        ///<summary>
        /// Send to the NAO the angle just computed.
        ///</summary>
        private void moveJoint()
        {
            //Activate whole body balance control
            //Fixing both left and right legs on a plane,
            //they can move only along X and Y axis and rotate aroun Z axis
            //Then set the balance constraint
            motioProxy.wbEnable(true);
            motioProxy.wbFootState("Fixed", "RLeg");
            motioProxy.wbFootState("Fixed", "LLeg");
            motioProxy.wbEnableBalanceConstraint(true, "Legs");
            System.Collections.ArrayList angles = new System.Collections.ArrayList();

            System.Collections.ArrayList joint = new System.Collections.ArrayList();
            foreach (String x in NAOConversion.listOfTheJoint())
            {
                motioProxy.setAngles(x, this.jointAngles[x], fractionSpeed);
                AnglesSent(jointAngles);
                //System.Console.WriteLine(this.jointAngles[x]);
                this.jointAngles[x] = 0f;
            }
            //motioProxy.angleInterpolationWithSpeed(joint, angles, fractionSpeed);
        }
Ejemplo n.º 2
0
        ///<summary>
        /// Send to the NAO the angle just computed.
        ///</summary>
        private void moveJoint()
        {
            //Activate whole body balance control
            //Fixing both left and right legs on a plane,
            //they can move only along X and Y axis and rotate aroun Z axis
            //Then set the balance constraint
            motioProxy.wbEnable(true);
            motioProxy.wbFootState("Fixed", "RLeg");
            motioProxy.wbFootState("Fixed", "LLeg");
            motioProxy.wbEnableBalanceConstraint(true, "Legs");

            foreach (String x in NAOConversion.listOfTheJoint())
            {
                motioProxy.setAngles(x, this.jointAngles[x], fractionSpeed);
                if (x == NAOConversion.HeadPitch || x == NAOConversion.HeadYaw)
                {
                    this.jointAngles[x] = 0f;
                }
                if (x == NAOConversion.LShoulderRoll)
                {
                    System.Console.WriteLine(this.jointAngles[x]);
                }
            }
        }