コード例 #1
0
        private void init()
        {
            try
            {
                rp = new RobotPostureProxy(ip, 9559);
                rp.goToPosture("StandZero", 1);
            }
            catch (Exception)
            {
                MessageBox.Show("IP Adresse von Nao nicht erreichbar, prüfen Sie die Konfiguration!", "Fehler");
                Application.Exit();
                throw new Exception("Cannot connect to Proxy. Check IP-Configuration!");
            }

            try
            {
                List <String> joints = new List <string> {
                    "LArm", "RArm"
                };

                //mp = new MotionProxy(ip, port);
                mpL = new MotionProxy(ip, port);
                mpR = new MotionProxy(ip, port);

                //mp.setStiffnesses(joints, 0.6f);
                //List<float> angles = mp.getAngles(new String[] { "RShoulderPitch", "RShoulderRoll", "RElbowRoll", "RElbowYaw", "RWristYaw" } ,true);
            }
            catch (Exception)
            {
                throw new Exception("Cannot connect to Proxy");
            }


            RArm = new RArm(mpR);
            LArm = new LArm(mpL);
        }
コード例 #2
0
ファイル: NaoHandler.cs プロジェクト: kinectNao/rednao
        private void init()
        {
            try
            {

                rp = new RobotPostureProxy(ip, 9559);
                rp.goToPosture("StandZero", 1);

            }
            catch (Exception)
            {
                MessageBox.Show("IP Adresse von Nao nicht erreichbar, prüfen Sie die Konfiguration!", "Fehler");
                Application.Exit();
                throw new Exception("Cannot connect to Proxy. Check IP-Configuration!");
            }

            try
            {
                List<String> joints = new List<string> { "LArm", "RArm" };

                //mp = new MotionProxy(ip, port);
                 mpL = new MotionProxy(ip, port);
                 mpR = new MotionProxy(ip, port);

                //mp.setStiffnesses(joints, 0.6f);
                //List<float> angles = mp.getAngles(new String[] { "RShoulderPitch", "RShoulderRoll", "RElbowRoll", "RElbowYaw", "RWristYaw" } ,true);

            }
            catch (Exception)
            {

                throw new Exception("Cannot connect to Proxy");
            }

            RArm = new RArm(mpR);
            LArm = new LArm(mpL);
        }