示例#1
0
 private void setUpjointAngleDictionary()
 {
     foreach (String x in NAOConversion.listOfTheJoint())
     {
         this.jointAngles.Add(x, 0f);
     }
 }
示例#2
0
        public void startStreamAngles(Dictionary <string, float> angles)
        {
            foreach (String x in NAOConversion.listOfTheJoint())
            {
                AngleBox.Text += x + " : " + angles[x].ToString();
            }

            AngleBox.Text += Environment.NewLine;
        }
示例#3
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);
        }
示例#4
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]);
                }
            }
        }