Exemplo n.º 1
0
        public void InitializeStructure()
        {
            _dhParam   = DHParameterFactory.GetDhParameterForRobot(RobotModels.Kuka_KR270_R2700);
            _testRobot = new Robot("testRobi", RobotManufacturer.Kuka, RobotModels.Kuka_KR270_R2700);
            _testRobot.SetJoint6ToFlangeTcpTrafo(RobotManufacturer.Kuka);
            _inverse = new InverseKinematics();

            var rand = new Random(DateTime.Now.Millisecond);

            testAnglesDeg = new double[] { 30 * rand.NextDouble(), -80 - 30 * rand.NextDouble(), 30 * rand.NextDouble(), 30 * rand.NextDouble(), 30 * rand.NextDouble(), 30 * rand.NextDouble() };
            testAnglesRad = new double[] {
                testAnglesDeg[0].DegToRad(),
                testAnglesDeg[1].DegToRad(),
                testAnglesDeg[2].DegToRad(),
                testAnglesDeg[3].DegToRad(),
                testAnglesDeg[4].DegToRad(),
                testAnglesDeg[5].DegToRad()
            };

            for (int i = 0; i < testAnglesRad.Length; i++)
            {
                _testRobot.Joints[i].DhParameter.Theta = testAnglesRad[i];
            }

            _testRobot.SetJoint6ToFlangeTcpTrafo(RobotManufacturer.Kuka);
        }
Exemplo n.º 2
0
        public Robot(string name, RobotManufacturer robotBrand, RobotModels robotModel)
        {
            ModelName = name;
            Joints    = new SortedList <int, Joint>();

            var dhParams = DHParameterFactory.GetDhParameterForRobot(robotModel);

            for (int i = 0; i < dhParams.Count; i++)
            {
                Joints.Add(i, new RotationalJoint(0, 360, dhParams[i]));
            }

            Kinematic = new RobotKinematics(dhParams);

            InitializeMember();
            Joint6ToFlangeTrafo = RobotBaseDataProvider.GetJoint6ToFlangeTransformation(robotBrand);
        }
Exemplo n.º 3
0
 public void InitializeTestVariables()
 {
     _dhParam = DHParameterFactory.GetDhParameterForRobot(RobotModels.Kuka_KR270_R2700);
 }