本文整理了Java中us.ihmc.robotics.math.frames.YoMatrix.get()
方法的一些代码示例,展示了YoMatrix.get()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YoMatrix.get()
方法的具体详情如下:
包路径:us.ihmc.robotics.math.frames.YoMatrix
类名称:YoMatrix
方法名:get
暂无
代码示例来源:origin: us.ihmc/IHMCRoboticsToolkit
public void getAndReshape(DenseMatrix64F matrixToPack)
{
matrixToPack.reshape(getNumberOfRows(), getNumberOfColumns());
get(matrixToPack);
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit-test
yoMatrix.get(denseMatrix);
fail("Should throw an exception if the size isn't right!");
yoMatrix.get(checkMatrix);
代码示例来源:origin: us.ihmc/CommonWalkingControlModules
public void setInputs(DenseMatrix64F a, DenseMatrix64F b, DenseMatrix64F momentumDotWeight, DenseMatrix64F jSecondary, DenseMatrix64F pSecondary,
DenseMatrix64F weightMatrixSecondary, DenseMatrix64F WRho, DenseMatrix64F Lambda, DenseMatrix64F WRhoSmoother, DenseMatrix64F rhoPrevAvg,
DenseMatrix64F WRhoCop, DenseMatrix64F QRho, DenseMatrix64F c, DenseMatrix64F rhoMin)
{
//A,b,c
momentumOptimizerWithGRFPenalizedSmootherNativeInput.setCentroidalMomentumMatrix(a);
momentumOptimizerWithGRFPenalizedSmootherNativeInput.setMomentumDotEquationRightHandSide(b);
momentumOptimizerWithGRFPenalizedSmootherNativeInput.setMomentumDotWeight(momentumDotWeight);
//Js ps Ws
momentumOptimizerWithGRFPenalizedSmootherNativeInput.setSecondaryConstraintJacobian(jSecondary);
momentumOptimizerWithGRFPenalizedSmootherNativeInput.setSecondaryConstraintRightHandSide(pSecondary);
momentumOptimizerWithGRFPenalizedSmootherNativeInput.setSecondaryConstraintWeight(weightMatrixSecondary);
//Wrho, Lambda
momentumOptimizerWithGRFPenalizedSmootherNativeInput.setGroundReactionForceRegularization(WRho);
momentumOptimizerWithGRFPenalizedSmootherNativeInput.setJointAccelerationRegularization(Lambda);
//WRho, Rho_pavg , WRhoCop
momentumOptimizerWithGRFPenalizedSmootherNativeInput.setRateOfChangeOfGroundReactionForceRegularization(WRhoSmoother);
momentumOptimizerWithGRFPenalizedSmootherNativeInput.setRhoPreviousAverage(rhoPrevAvg);
momentumOptimizerWithGRFPenalizedSmootherNativeInput.setCenterOfPressurePenalizedRegularization(WRhoCop);
//QRho,c
momentumOptimizerWithGRFPenalizedSmootherNativeInput.setContactPointWrenchMatrix(QRho);
momentumOptimizerWithGRFPenalizedSmootherNativeInput.setWrenchEquationRightHandSide(c);
//Rho_min
momentumOptimizerWithGRFPenalizedSmootherNativeInput.setRhoMin(rhoMin);
//Wrho
rhoPreviousYoMatrix.get(rhoPrevious);
momentumOptimizerWithGRFPenalizedSmootherNativeInput.setRhoPrevious(rhoPrevious);
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public void getAndReshape(DenseMatrix64F matrixToPack)
{
matrixToPack.reshape(getNumberOfRows(), getNumberOfColumns());
get(matrixToPack);
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit-test
@ContinuousIntegrationTest(estimatedDuration = 0.0)
@Test(timeout = 30000)
public void testSimpleYoMatrixExample()
{
int maxNumberOfRows = 4;
int maxNumberOfColumns = 8;
YoVariableRegistry registry = new YoVariableRegistry("testRegistry");
YoMatrix yoMatrix = new YoMatrix("testMatrix", maxNumberOfRows, maxNumberOfColumns, registry);
assertEquals(maxNumberOfRows, yoMatrix.getNumberOfRows());
assertEquals(maxNumberOfColumns, yoMatrix.getNumberOfColumns());
DenseMatrix64F denseMatrix = new DenseMatrix64F(maxNumberOfRows, maxNumberOfColumns);
yoMatrix.get(denseMatrix);
JUnitTools.assertMatrixEqualsZero(denseMatrix, 1e-10);
Random random = new Random(1984L);
DenseMatrix64F randomMatrix = RandomGeometry.nextDenseMatrix64F(random, maxNumberOfRows, maxNumberOfColumns);
yoMatrix.set(randomMatrix);
DenseMatrix64F checkMatrix = new DenseMatrix64F(maxNumberOfRows, maxNumberOfColumns);
yoMatrix.get(checkMatrix);
JUnitTools.assertMatrixEquals(randomMatrix, checkMatrix, 1e-10);
assertEquals(registry.getVariable("testMatrix_0_0").getValueAsDouble(), checkMatrix.get(0, 0), 1e-10);
}
内容来源于网络,如有侵权,请联系作者删除!