예제 #1
0
        /// <summary>
        /// Get the joints list of Cylindical Robot
        /// </summary>
        /// <param name="l1">z offset</param>
        /// <param name="l2">z offset</param>
        /// <param name="l3">radius offset</param>
        /// <returns></returns>
        public static List <IJoint> GetCylindical(double l1, double l2, double l3)
        {
            RotationJoint phi = new RotationJoint
            {
                Length        = l1,
                TransformAxis = TransformType.RotateZ
            };

            TranslationJoint h = new TranslationJoint
            {
                Length        = l2,
                TransformAxis = TransformType.AxisZ
            };

            // Just assume the initial state of this joint is pointing to Y axis
            TranslationJoint r = new TranslationJoint
            {
                Length        = l3,
                TransformAxis = TransformType.AxisY
            };

            List <IJoint> joints = new List <IJoint>
            {
                phi,
                h,
                r
            };

            return(joints);
        }
예제 #2
0
        /// <summary>
        /// Get a configuration of Spherical robot
        /// </summary>
        /// <param name="l1"></param>
        /// <param name="l2"></param>
        /// <param name="l3"></param>
        /// <returns></returns>
        public static List <IJoint> GetSpherical(double l1, double l2, double l3)
        {
            RotationJoint phi = new RotationJoint
            {
                Length        = l1,
                TransformAxis = TransformType.RotateZ
            };

            RotationJoint theta = new RotationJoint
            {
                Length        = l2,
                TransformAxis = TransformType.RotateX
            };

            TranslationJoint r = new TranslationJoint
            {
                Length        = l3,
                TransformAxis = TransformType.AxisZ
            };

            return(new List <IJoint>
            {
                phi,
                theta,
                r
            });
        }
예제 #3
0
        public static List <IJoint> GetArticulated(double l1, double l2, double l3)
        {
            RotationJoint th1 = new RotationJoint
            {
                Length        = l1,
                TransformAxis = TransformType.RotateZ
            };
            RotationJoint th2 = new RotationJoint
            {
                Length        = l2,
                TransformAxis = TransformType.RotateX
            };
            RotationJoint th3 = new RotationJoint
            {
                Length        = l3,
                TransformAxis = TransformType.RotateX
            };

            return(new List <IJoint>
            {
                th1,
                th2,
                th3
            });
        }
예제 #4
0
        public static List <IJoint> Get6DOFRobot(params double[] link)
        {
            if (link.Count() != 6)
            {
                throw new ArgumentException("6 DoF Robot should have 6 links", "link");
            }
            RotationJoint th1 = new RotationJoint
            {
                Length        = link[0],
                TransformAxis = TransformType.RotateZ
            };
            RotationJoint th2 = new RotationJoint
            {
                Length        = link[1],
                TransformAxis = TransformType.RotateY
            };
            RotationJoint th3 = new RotationJoint
            {
                Length        = link[2],
                TransformAxis = TransformType.RotateY
            };
            RotationJoint th4 = new RotationJoint
            {
                Length        = link[3],
                TransformAxis = TransformType.RotateZ
            };
            RotationJoint th5 = new RotationJoint
            {
                Length        = link[4],
                TransformAxis = TransformType.RotateY
            };
            RotationJoint th6 = new RotationJoint
            {
                Length        = link[5],
                TransformAxis = TransformType.RotateZ
            };

            return(new List <IJoint> {
                th1, th2, th3, th4, th5, th6
            });
        }