/// <summary> /// Convert ROS-spaced TfQuaternion from TfListener to Unity-spaced Quaternion /// </summary> /// <param name="quat">A TfQuaternion as returned by the TransformListener class.</param> /// <returns>A quaternion</returns> public static Quaternion QuatTfToUnity(TfQuaternion quat) { Quaternion tfQ = new Quaternion(-(float)quat.x, -(float)quat.z, -(float)quat.y, (float)quat.w); // Right hand to Left Hand return(tfQ); }
/// <summary> /// Convert ROS-spaced TfQuaternion from TfListener to Unity-spaced Quaternion /// </summary> /// <param name="quat">A TfQuaternion as returned by the TransformListener class.</param> /// <returns>A quaternion</returns> public static Quaternion QuatTfToUnity(TfQuaternion quat) { return(new Quaternion((float)quat.x, (float)quat.y, (float)quat.z, (float)quat.w)); // TASK: not yet implemented }