本文整理了Java中us.ihmc.robotics.math.trajectories.providers.YoVariableDoubleProvider
类的一些代码示例,展示了YoVariableDoubleProvider
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YoVariableDoubleProvider
类的具体详情如下:
包路径:us.ihmc.robotics.math.trajectories.providers.YoVariableDoubleProvider
类名称:YoVariableDoubleProvider
暂无
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit-test
@ContinuousIntegrationTest(estimatedDuration = 0.0)
@Test(timeout = 30000)
public void testConstructor2()
{
YoVariableDoubleProvider provider2 = new YoVariableDoubleProvider(yoValue);
assertEquals(value1, provider2.getValue(), EPSILON);
provider2.set(value2);
assertEquals(value2, provider2.getValue(), EPSILON);
}
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit-test
trajectoryTimeProvider = new YoVariableDoubleProvider("trajectoryTime", registry);
trajectoryTimeProvider.set(trajectoryTime);
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public GenericStateMachine(String name, String switchTimeName, Class<E> enumType, E initialState, YoDouble timeVariable, YoVariableRegistry registry)
{
this(name, switchTimeName, enumType, initialState, new YoVariableDoubleProvider(timeVariable), registry);
}
代码示例来源:origin: us.ihmc/CommonWalkingControlModules
offsetHeightAboveGroundTrajectoryOutput.set(offsetHeightTrajectoryGenerator.getValue());
double z = splineOutput[0] + offsetHeightAboveGroundTrajectoryOutput.getValue();
double dzds = splineOutput[1];
double ddzdds = splineOutput[2];
代码示例来源:origin: us.ihmc/CommonWalkingControlModules
private void computeSwingTimeRemaining()
{
if (!currentTimeWithSwingSpeedUp.isNaN())
{
double swingTimeRemaining = (swingTimeProvider.getValue() - currentTimeWithSwingSpeedUp.getDoubleValue()) / swingTimeSpeedUpFactor.getDoubleValue();
this.swingTimeRemaining.set(swingTimeRemaining);
}
else
{
this.swingTimeRemaining.set(swingTimeProvider.getValue() - getTimeInCurrentState());
}
}
代码示例来源:origin: us.ihmc/CommonWalkingControlModules
private void computeDesiredsForFreeMotion()
{
boolean blockToMaximumPitch = tempYawPitchRoll[1] > maximumToeOffAngleProvider.getValue();
if (blockToMaximumPitch)
{
toeOffDesiredPitchAngle.set(maximumToeOffAngleProvider.getValue());
toeOffDesiredPitchVelocity.set(0.0);
}
else
{
toeOffDesiredPitchAngle.set(desiredOrientation.getPitch());
toeOffDesiredPitchVelocity.set(footTwist.getAngularPartY());
}
toeOffDesiredPitchAcceleration.set(0.0);
}
代码示例来源:origin: us.ihmc/CommonWalkingControlModules
soleFrame = contactableFoot.getSoleFrame();
maximumToeOffAngleProvider = new YoVariableDoubleProvider(namePrefix + "MaximumToeOffAngle", registry);
maximumToeOffAngleProvider.set(footControlHelper.getWalkingControllerParameters().getMaximumToeOffAngle());
代码示例来源:origin: us.ihmc/IHMCRoboticsToolkit
public GenericStateMachine(String name, String switchTimeName, Class<E> enumType, DoubleYoVariable timeVariable, YoVariableRegistry registry)
{
this(name, switchTimeName, enumType, null, new YoVariableDoubleProvider(timeVariable), registry);
}
代码示例来源:origin: us.ihmc/CommonWalkingControlModules
private void handleInitializeToCurrent()
{
if (initializeToCurrent.getBooleanValue())
{
initializeToCurrent.set(false);
desiredPosition.setToZero(pelvisFrame);
desiredPosition.changeFrame(frameOfLastFoostep);
double heightOffset = desiredPosition.getZ() - splineOutput[0];
offsetHeightAboveGround.set(heightOffset);
offsetHeightAboveGroundTrajectoryTimeProvider.set(0.0);
offsetHeightAboveGroundChangedTime.set(yoTime.getDoubleValue());
offsetHeightTrajectoryGenerator.clear();
offsetHeightTrajectoryGenerator.appendWaypoint(0.0, heightOffset, 0.0);
offsetHeightTrajectoryGenerator.initialize();
isTrajectoryOffsetStopped.set(false);
}
}
代码示例来源:origin: us.ihmc/CommonWalkingControlModules
@Override
public void variableChanged(YoVariable<?> v)
{
offsetHeightAboveGroundChangedTime.set(yoTime.getDoubleValue());
double previous = offsetHeightTrajectoryGenerator.getValue();
offsetHeightTrajectoryGenerator.clear();
offsetHeightTrajectoryGenerator.appendWaypoint(0.0, previous, 0.0);
offsetHeightTrajectoryGenerator.appendWaypoint(offsetHeightAboveGroundTrajectoryTimeProvider.getValue(),
offsetHeightAboveGround.getDoubleValue(), 0.0);
offsetHeightTrajectoryGenerator.initialize();
}
});
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit-test
@ContinuousIntegrationTest(estimatedDuration = 0.0)
@Test(timeout = 30000)
public void testConstructor1()
{
YoVariableDoubleProvider provider1 = new YoVariableDoubleProvider("provider1", registry);
assertEquals(0.0, provider1.getValue(), EPSILON);
provider1.set(value2);
assertEquals(value2, provider1.getValue(), EPSILON);
}
代码示例来源:origin: us.ihmc/ihmc-common-walking-control-modules-test
private void testSimpleTrajectory(int numDesiredSplines)
YoVariableDoubleProvider stepTimeProvider = new YoVariableDoubleProvider("", new YoVariableRegistry(""));
stepTimeProvider.set(0.8);
PositionProvider initialPositionProvider = new ConstantPositionProvider(new FramePoint3D(worldFrame, new double[] {-0.1, 2.3, 0.0}));
VectorProvider initialVelocityProvider = new ConstantVectorProvider(new FrameVector3D(worldFrame, new double[] {0.2, 0.0, -0.05}));
代码示例来源:origin: us.ihmc/IHMCRoboticsToolkit
public GenericStateMachine(String name, String switchTimeName, Class<E> enumType, E initialState, DoubleYoVariable timeVariable, YoVariableRegistry registry)
{
this(name, switchTimeName, enumType, initialState, new YoVariableDoubleProvider(timeVariable), registry);
}
代码示例来源:origin: us.ihmc/CommonWalkingControlModules
this.yoTime = yoTime;
offsetHeightAboveGroundChangedTime.set(yoTime.getDoubleValue());
offsetHeightAboveGroundTrajectoryTimeProvider.set(0.5);
offsetHeightAboveGround.set(defaultOffsetHeightAboveGround);
offsetHeightAboveGroundPrevValue.set(defaultOffsetHeightAboveGround);
代码示例来源:origin: us.ihmc/CommonWalkingControlModules
/**
* Request the swing trajectory to speed up using the given speed up factor.
* It is clamped w.r.t. to {@link WalkingControllerParameters#getMinimumSwingTimeForDisturbanceRecovery()}.
* @param speedUpFactor
* @return the current swing time remaining for the swing foot trajectory
*/
public double requestSwingSpeedUp(double speedUpFactor)
{
if (isSwingSpeedUpEnabled.getBooleanValue() && (speedUpFactor > 1.1 && speedUpFactor > swingTimeSpeedUpFactor.getDoubleValue()))
{
speedUpFactor = MathTools.clipToMinMax(speedUpFactor, swingTimeSpeedUpFactor.getDoubleValue(), maxSwingTimeSpeedUpFactor.getDoubleValue());
// speedUpFactor = MathTools.clipToMinMax(speedUpFactor, 0.7, maxSwingTimeSpeedUpFactor.getDoubleValue());
// if (speedUpFactor < 1.0) speedUpFactor = 1.0 - 0.5 * (1.0 - speedUpFactor);
swingTimeSpeedUpFactor.set(speedUpFactor);
if (currentTimeWithSwingSpeedUp.isNaN())
currentTimeWithSwingSpeedUp.set(currentTime.getDoubleValue());
}
computeSwingTimeRemaining();
return swingTimeRemaining.getValue();
}
代码示例来源:origin: us.ihmc/ihmc-common-walking-control-modules-test
private void testSimpleTrajectory(int numDesiredSplines)
YoVariableDoubleProvider stepTimeProvider = new YoVariableDoubleProvider("", new YoVariableRegistry(""));
stepTimeProvider.set(0.8);
YoVariableDoubleProvider timeRemainingProvider = new YoVariableDoubleProvider("", new YoVariableRegistry(""));
PositionProvider initialPositionProvider = new ConstantPositionProvider(new FramePoint3D(worldFrame, new double[] {-0.1, 2.3, 0.0}));
VectorProvider initialVelocityProvider = new ConstantVectorProvider(new FrameVector3D(worldFrame, new double[] {0.2, 0.0, -0.05}));
timeRemainingProvider.set(stepTimeProvider.getValue() - tIntoStep);
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public GenericStateMachine(String name, String switchTimeName, Class<E> enumType, YoDouble timeVariable, YoVariableRegistry registry)
{
this(name, switchTimeName, enumType, null, new YoVariableDoubleProvider(timeVariable), registry);
}
代码示例来源:origin: us.ihmc/CommonWalkingControlModules
finalSwingHeightOffset.set(footControlHelper.getWalkingControllerParameters().getDesiredTouchdownHeightOffset());
replanTrajectory = new BooleanYoVariable(namePrefix + "SwingReplanTrajectory", registry);
swingTimeRemaining = new YoVariableDoubleProvider(namePrefix + "SwingTimeRemaining", registry);
内容来源于网络,如有侵权,请联系作者删除!