public void ImportJointData_DefaultAxis_Succeeds(Joint.Axis axis, Quaternion expectedAnchorRotation)
        {
            var joint = new Joint(
                name: "custom_joint", type: "continuous", parent: "base", child: "link",
                axis: axis);

            GameObject baseObject = new GameObject("base");
            GameObject linkObject = new GameObject("link");

            linkObject.transform.parent = baseObject.transform;

            UrdfJoint.Create(baseObject, UrdfJoint.JointTypes.Fixed);
            TestUrdfJointPlanar urdfJoint        = linkObject.AddComponent <TestUrdfJointPlanar>();
            ArticulationBody    articulationBody = linkObject.GetComponent <ArticulationBody>();

            urdfJoint.TestImportJointData(joint);

            UnityEngine.Assertions.Assert.AreApproximatelyEqual(expectedAnchorRotation.w, articulationBody.anchorRotation.w);
            UnityEngine.Assertions.Assert.AreApproximatelyEqual(expectedAnchorRotation.x, articulationBody.anchorRotation.x);
            UnityEngine.Assertions.Assert.AreApproximatelyEqual(expectedAnchorRotation.y, articulationBody.anchorRotation.y);
            UnityEngine.Assertions.Assert.AreApproximatelyEqual(expectedAnchorRotation.z, articulationBody.anchorRotation.z);

            Object.DestroyImmediate(baseObject);
        }
        public void GetAxis_JointAxis_Succeeds()
        {
            var axis = new Joint.Axis(new double[] { 1, 2, 3 });

            Assert.AreEqual(new Vector3(-2, 3, 1), TestUrdfJoint.Axis(axis));
        }
 public static Vector3 Axis(Joint.Axis axis) => GetAxis(axis);