gpt4 book ai didi

us.ihmc.euclid.rotationConversion.YawPitchRollConversion.convertMatrixToYawPitchRoll()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-14 11:48:49 25 4
gpt4 key购买 nike

本文整理了Java中us.ihmc.euclid.rotationConversion.YawPitchRollConversion.convertMatrixToYawPitchRoll()方法的一些代码示例,展示了YawPitchRollConversion.convertMatrixToYawPitchRoll()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YawPitchRollConversion.convertMatrixToYawPitchRoll()方法的具体详情如下:
包路径:us.ihmc.euclid.rotationConversion.YawPitchRollConversion
类名称:YawPitchRollConversion
方法名:convertMatrixToYawPitchRoll

YawPitchRollConversion.convertMatrixToYawPitchRoll介绍

暂无

代码示例

代码示例来源:origin: us.ihmc/euclid-test

@Test
public void testGetRotationYawPitchRoll() throws Exception
{
 Random random = new Random(564651L);
 { // Test getRotationYawPitchRoll(double[] yawPitchRollToPack)
   RotationScaleMatrix rotationScaleMatrix = EuclidCoreRandomTools.nextRotationScaleMatrix(random, 10.0);
   double[] yawPitchRollActual = new double[3];
   rotationScaleMatrix.getRotationYawPitchRoll(yawPitchRollActual);
   double[] yawPitchRollExpected = new double[3];
   YawPitchRollConversion.convertMatrixToYawPitchRoll(rotationScaleMatrix.getRotationMatrix(), yawPitchRollExpected);
   EuclidCoreTestTools.assertYawPitchRollEquals(yawPitchRollExpected, yawPitchRollActual, EPS);
 }
 { // Test getRotationYaw(), getRotationPitch(), and getRotationRoll()
   RotationScaleMatrix rotationScaleMatrix = EuclidCoreRandomTools.nextRotationScaleMatrix(random, 10.0);
   double[] yawPitchRollActual = {rotationScaleMatrix.getRotationYaw(), rotationScaleMatrix.getRotationPitch(), rotationScaleMatrix.getRotationRoll()};
   double[] yawPitchRollExpected = new double[3];
   YawPitchRollConversion.convertMatrixToYawPitchRoll(rotationScaleMatrix.getRotationMatrix(), yawPitchRollExpected);
   EuclidCoreTestTools.assertYawPitchRollEquals(yawPitchRollExpected, yawPitchRollActual, EPS);
 }
}

代码示例来源:origin: us.ihmc/euclid-test

@Test
public void testGetEuler()
{
 Random random = new Random(65466L);
 RotationMatrix yawPitchRoll = new RotationMatrix(), expected;
 Vector3D eulerAngles = new Vector3D();
 Vector3D eulerAnglesCopy = new Vector3D();
 for (int i = 0; i < ITERATIONS; i++)
   try
   {
    expected = yawPitchRoll = EuclidCoreRandomTools.nextRotationMatrix(random);
    yawPitchRoll.getEuler(eulerAngles);
    YawPitchRollConversion.convertMatrixToYawPitchRoll(expected, eulerAnglesCopy);
    EuclidCoreTestTools.assertRotationVectorGeometricallyEquals(eulerAngles, eulerAnglesCopy, EPS);
    EuclidCoreTestTools.assertMatrix3DEquals(yawPitchRoll, expected, EPS);
   }
   catch (AssertionError e)
   {
    double pitch = YawPitchRollConversion.computePitch(yawPitchRoll);
    if (!Double.isNaN(pitch))
      throw e;
   }
}

代码示例来源:origin: us.ihmc/euclid-test

YawPitchRollReadOnly convertToYawPitchRoll()
{
  YawPitchRoll yawPitchRoll = new YawPitchRoll();
  switch (this)
  {
  case MATRIX:
   YawPitchRollConversion.convertMatrixToYawPitchRoll((RotationMatrixReadOnly) rotationHolder, yawPitchRoll);
   break;
  case AXISANGLE:
   YawPitchRollConversion.convertAxisAngleToYawPitchRoll((AxisAngleReadOnly) rotationHolder, yawPitchRoll);
   break;
  case QUATERNION:
   YawPitchRollConversion.convertQuaternionToYawPitchRoll((QuaternionReadOnly) rotationHolder, yawPitchRoll);
   break;
  case VECTOR:
   YawPitchRollConversion.convertRotationVectorToYawPitchRoll((Vector3DReadOnly) rotationHolder, yawPitchRoll);
   break;
  case YAW_PITCH_ROLL:
   yawPitchRoll.set((YawPitchRollReadOnly) rotationHolder);
   break;
  default:
   throw exception(this);
  }
  return yawPitchRoll;
}

代码示例来源:origin: us.ihmc/euclid-test

assertEquals(roll, actualRoll, EPSILON);
YawPitchRollConversion.convertMatrixToYawPitchRoll(matrix, actualYawPitchRoll);
assertEquals(yaw, actualYawPitchRoll[0], EPSILON);
assertEquals(pitch, actualYawPitchRoll[1], EPSILON);
assertEquals(roll, actualYawPitchRoll[2], EPSILON);
YawPitchRollConversion.convertMatrixToYawPitchRoll(matrix, actualEulerAngles);
assertEquals(yaw, actualEulerAngles.getZ(), EPSILON);
assertEquals(pitch, actualEulerAngles.getY(), EPSILON);

代码示例来源:origin: us.ihmc/euclid-test

assertEquals(roll, actualRoll, EPSILON);
YawPitchRollConversion.convertMatrixToYawPitchRoll(matrix, actualYawPitchRoll);
assertEquals(yaw, actualYawPitchRoll[0], EPSILON);
assertEquals(pitch, actualYawPitchRoll[1], EPSILON);
assertEquals(roll, actualYawPitchRoll[2], EPSILON);
YawPitchRollConversion.convertMatrixToYawPitchRoll(matrix, actualEulerAngles);
assertEquals(yaw, actualEulerAngles.getZ(), EPSILON);
assertEquals(pitch, actualEulerAngles.getY(), EPSILON);

代码示例来源:origin: us.ihmc/ihmc-manipulation-planning

YawPitchRollConversion.convertMatrixToYawPitchRoll(closestTransform.getRotationMatrix(), closestYPR);

代码示例来源:origin: us.ihmc/euclid-test

YawPitchRollConversion.convertMatrixToYawPitchRoll(matrix, expectedYPR);
EuclidCoreTestTools.assertYawPitchRollEquals(expectedYPR, actualYPR, getEpsilon());

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com