- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中us.ihmc.robotics.math.frames.YoFrameVector2d.set()
方法的一些代码示例,展示了YoFrameVector2d.set()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YoFrameVector2d.set()
方法的具体详情如下:
包路径:us.ihmc.robotics.math.frames.YoFrameVector2d
类名称:YoFrameVector2d
方法名:set
暂无
代码示例来源:origin: us.ihmc/CommonWalkingControlModules
public void reset()
{
icpErrorIntegrated.set(0.0, 0.0);
}
代码示例来源:origin: us.ihmc/IHMCFootstepPlanning
private void setXYVectorFromPoseToPoseNormalize(YoFrameVector2d vectorToPack, FramePose fromPose, FramePose toPose)
{
if (fromPose.epsilonEquals(toPose, 1e-7, Double.MAX_VALUE))
{
vectorToPack.set(fromPose.getReferenceFrame(), 0.0, 0.0);
}
else
{
FrameVector2d frameTuple2d = vectorToPack.getFrameTuple2d();
frameTuple2d.setByProjectionOntoXYPlane(toPose.getFramePointCopy());
fromPose.checkReferenceFrameMatch(vectorToPack);
frameTuple2d.sub(fromPose.getX(), fromPose.getY());
frameTuple2d.normalize();
vectorToPack.setWithoutChecks(frameTuple2d);
}
}
代码示例来源:origin: us.ihmc/CommonWalkingControlModules
yoCoPError.get(robotSide).set(copError);
yoCoPErrorMagnitude.get(robotSide).set(copError.length());
代码示例来源:origin: us.ihmc/CommonWalkingControlModules
public void setDesiredVelocity(FrameVector2d newDesiredVelocity)
{
newDesiredVelocity.changeFrame(desiredVelocity.getReferenceFrame());
desiredVelocity.set(newDesiredVelocity);
}
代码示例来源:origin: us.ihmc/CommonWalkingControlModules
public void setValuesForFeedbackOnly(FramePoint2d desiredICP, FrameVector2d desiredICPVelocity, double omega0)
{
CapturePointTools.computeDesiredCentroidalMomentumPivot(desiredICP, desiredICPVelocity, omega0, tmpCMP);
controllerReferenceICP.set(desiredICP);
controllerReferenceICPVelocity.set(desiredICPVelocity);
controllerReferenceCMP.set(tmpCMP);
nominalReferenceICP.set(desiredICP);
nominalReferenceICPVelocity.set(desiredICPVelocity);
nominalReferenceCMP.set(tmpCMP);
}
代码示例来源:origin: us.ihmc/CommonWalkingControlModules
private void computeDesiredICPOffset()
{
pelvisPositionError.set(desiredPelvisPosition);
tempPosition2d.setToZero(pelvisZUpFrame);
tempPosition2d.changeFrame(worldFrame);
pelvisPositionError.sub(tempPosition2d);
pelvisPositionError.getFrameTuple2dIncludingFrame(tempError2d);
tempError2d.scale(controlDT);
pelvisPositionCumulatedError.add(tempError2d);
double cumulativeErrorMagnitude = pelvisPositionCumulatedError.length();
if (cumulativeErrorMagnitude > maximumIntegralError.getDoubleValue())
{
pelvisPositionCumulatedError.scale(maximumIntegralError.getDoubleValue() / cumulativeErrorMagnitude);
}
proportionalTerm.set(pelvisPositionError);
proportionalTerm.scale(proportionalGain.getDoubleValue());
integralTerm.set(pelvisPositionCumulatedError);
integralTerm.scale(integralGain.getDoubleValue());
desiredICPOffset.set(proportionalTerm);
desiredICPOffset.add(integralTerm);
}
代码示例来源:origin: us.ihmc/CommonWalkingControlModules
public void computeReferenceFromSolutions(ArrayList<YoFramePoint2d> footstepSolutions, ArrayList<FrameVector2d> entryOffsets, ArrayList<FrameVector2d> exitOffsets,
FramePoint2d previousStanceExitCMP, FramePoint2d stanceEntryCMP, FramePoint2d stanceExitCMP, FramePoint finalICP, YoFramePoint2d beginningOfStateICP,
double omega0, int numberOfFootstepsToConsider)
{
finalICP.getFrameTuple2d(finalICP2d);
footstepRecursionMultiplierCalculator.computeICPPoints(finalICP2d, footstepSolutions, entryOffsets, exitOffsets, previousStanceExitCMP, stanceEntryCMP,
stanceExitCMP, beginningOfStateICP.getFrameTuple2d(), numberOfFootstepsToConsider, tmpEndPoint, tmpReferencePoint, tmpReferenceVelocity);
CapturePointTools.computeDesiredCentroidalMomentumPivot(tmpReferencePoint, tmpReferenceVelocity, omega0, tmpCMP);
actualEndOfStateICP.set(tmpEndPoint);
controllerReferenceICP.set(tmpReferencePoint);
controllerReferenceICPVelocity.set(tmpReferenceVelocity);
controllerReferenceCMP.set(tmpCMP);
}
代码示例来源:origin: us.ihmc/CommonWalkingControlModules
public void computeNominalValues(ArrayList<YoFramePoint2d> upcomingFootstepLocations, ArrayList<FrameVector2d> entryOffsets, ArrayList<FrameVector2d> exitOffsets,
FramePoint2d previousStanceExitCMP, FramePoint2d stanceEntryCMP, FramePoint2d stanceExitCMP, FramePoint finalICP, YoFramePoint2d beginningOfStateICP,
double omega0, int numberOfFootstepsToConsider)
{
finalICP.getFrameTuple2d(finalICP2d);
footstepRecursionMultiplierCalculator.computeICPPoints(finalICP2d, upcomingFootstepLocations, entryOffsets, exitOffsets,
previousStanceExitCMP, stanceEntryCMP, stanceExitCMP, beginningOfStateICP.getFrameTuple2d(), numberOfFootstepsToConsider, tmpEndPoint,
tmpReferencePoint, tmpReferenceVelocity);
CapturePointTools.computeDesiredCentroidalMomentumPivot(tmpReferencePoint, tmpReferenceVelocity, omega0, tmpCMP);
nominalEndOfStateICP.set(tmpEndPoint);
nominalReferenceICP.set(tmpReferencePoint);
nominalReferenceICPVelocity.set(tmpReferenceVelocity);
nominalReferenceCMP.set(tmpCMP);
}
代码示例来源:origin: us.ihmc/CommonWalkingControlModules
rhoRateDefaultWeight.set(momentumOptimizationSettings.getRhoRateDefaultWeight());
rhoRateHighWeight.set(momentumOptimizationSettings.getRhoRateHighWeight());
desiredCoPWeight.set(momentumOptimizationSettings.getCoPWeight());
copRateDefaultWeight.set(momentumOptimizationSettings.getCoPRateDefaultWeight());
copRateHighWeight.set(momentumOptimizationSettings.getCoPRateHighWeight());
代码示例来源:origin: us.ihmc/CommonWalkingControlModules
public boolean isRotating(FramePoint2d cop,
FramePoint2d desiredCop,
FrameLine2d lineOfRotation)
{
cop.checkReferenceFrameMatch(soleFrame);
desiredCop.checkReferenceFrameMatch(soleFrame);
lineOfRotation.checkReferenceFrameMatch(soleFrame);
if (!lineOfRotation.isPointOnLine(cop)) return false;
copError2d.setToZero(soleFrame);
copError2d.sub(desiredCop, cop);
yoCopError.set(copError2d);
perpendicularCopError.set(lineOfRotation.distance(desiredCop));
boolean errorAboveThreshold = perpendicularCopError.getDoubleValue() >= perpendicluarCopErrorThreshold.getDoubleValue();
perpendicularCopErrorAboveThreshold.set(errorAboveThreshold);
double acos = perpendicularCopError.getDoubleValue() / copError2d.length();
angleBetweenCopErrorAndLine.set(Math.acos(Math.abs(acos)));
boolean angleInBounds = angleBetweenCopErrorAndLine.getDoubleValue() <= angleThreshold.getDoubleValue();
angleOkay.set(angleInBounds);
boolean correctSide = lineOfRotation.isPointOnRightSideOfLine(desiredCop);
desiredCopOnCorrectSide.set(correctSide);
return errorAboveThreshold && angleInBounds && correctSide;
}
}
代码示例来源:origin: us.ihmc/IHMCSimulationToolkit
@Override
public void doControl()
{
// update the linear momentum rate by numerical differentiation of the robot momentum
simulatedRobot.getRootJoint().physics.recursiveComputeLinearMomentum(linearMomentum);
yoLinearMomentum.set(linearMomentum);
momentumChange.update();
momentumChange.get(linearMomentumRate);
// get mass and COM position from the robot
double totalMass = simulatedRobot.computeCenterOfMass(comPosition);
comPosition2d.set(comPosition.getX(), comPosition.getY());
// now compute the COM acceleration
comAcceleration.set(linearMomentumRate.getX(), linearMomentumRate.getY());
comAcceleration.scale(1.0 / totalMass);
// CMP = COM - 1/omega^2 * COMAcc
double omega0 = Math.sqrt(-gravity / comPosition.getZ());
cmp.set(comAcceleration);
cmp.scale(- 1.0 / (omega0 * omega0));
cmp.add(comPosition2d);
yoCmp.set(cmp);
}
代码示例来源:origin: us.ihmc/DarpaRoboticsChallenge
@Override
public void doControl()
{
// update the linear momentum rate by numerical differentiation of the robot momentum
simulatedRobot.getRootJoint().physics.recursiveComputeLinearMomentum(linearMomentum);
yoLinearMomentum.set(linearMomentum);
momentumChange.update();
momentumChange.get(linearMomentumRate);
// get mass and COM position from the robot
double totalMass = simulatedRobot.computeCenterOfMass(comPosition);
comPosition2d.set(comPosition.getX(), comPosition.getY());
// now compute the COM acceleration
comAcceleration.set(linearMomentumRate.getX(), linearMomentumRate.getY());
comAcceleration.scale(1.0 / totalMass);
// CMP = COM - 1/omega^2 * COMAcc
double omega0 = Math.sqrt(-gravity / comPosition.getZ());
cmp.set(comAcceleration);
cmp.scale(- 1.0 / (omega0 * omega0));
cmp.add(comPosition2d);
yoCmp.set(cmp);
}
代码示例来源:origin: us.ihmc/IHMCFootstepPlanning
@Override
public double calculateCost(FramePose stanceFoot, FramePose swingStartFoot, FramePose idealFootstep, FramePose candidateFootstep, double percentageOfFoothold)
{
double cost = footstepBaseCost.getDoubleValue();
setXYVectorFromPoseToPoseNormalize(forwardCostVector, swingStartFoot, idealFootstep);
setXYVectorFromPoseToPoseNormalize(backwardCostVector, idealFootstep, swingStartFoot);
inwardCostVector.set(forwardCostVector.getY(), -forwardCostVector.getX());
outwardCostVector.set(-forwardCostVector.getY(), forwardCostVector.getX());
upwardCostVector.set(0.0, 0.0, 1.0);
downwardVector.set(0.0, 0.0, -1.0);
setVectorFromPoseToPose(idealToCandidateVector, idealFootstep, candidateFootstep);
setOrientationFromPoseToPose(idealToCandidateOrientation, idealFootstep, candidateFootstep);
double downwardPenalizationWeightConsideringStancePitch = downwardCostScalar.getDoubleValue();
if (stanceFoot.getPitch() < 0)
{
downwardPenalizationWeightConsideringStancePitch += -stanceFoot.getPitch() * stancePitchDownwardCostScalar.getDoubleValue();
}
cost += penalizeCandidateFootstep(forwardCostVector, forwardCostScalar.getDoubleValue());
cost += penalizeCandidateFootstep(backwardCostVector, backwardCostScalar.getDoubleValue());
cost += penalizeCandidateFootstep(inwardCostVector, inwardCostScalar.getDoubleValue());
cost += penalizeCandidateFootstep(outwardCostVector, outwardCostScalar.getDoubleValue());
cost += penalizeCandidateFootstep(upwardCostVector, upwardCostScalar.getDoubleValue());
cost += penalizeCandidateFootstep(downwardVector, downwardPenalizationWeightConsideringStancePitch);
cost += angularCostScalar.getDoubleValue() * Math.abs(idealToCandidateOrientation.getYaw().getDoubleValue());
cost += angularCostScalar.getDoubleValue() * Math.abs(idealToCandidateOrientation.getPitch().getDoubleValue());
cost += angularCostScalar.getDoubleValue() * Math.abs(idealToCandidateOrientation.getRoll().getDoubleValue());
cost += (1.0 - percentageOfFoothold) * negativeFootholdLinearCostScalar.getDoubleValue();
return cost;
}
代码示例来源:origin: us.ihmc/CommonWalkingControlModules
icpError.set(currentICP);
icpError.sub(solutionHandler.getControllerReferenceICP());
controllerFeedbackCMPDelta.set(desiredCMPDelta);
代码示例来源:origin: us.ihmc/CommonWalkingControlModules
icpError.set(capturePoint);
icpError.sub(desiredCapturePoint);
icpErrorIntegrated.set(0.0, 0.0);
tempControl.add(icpIntegral);
feedbackPart.set(tempControl);
desiredCMP.add(tempControl);
代码示例来源:origin: us.ihmc/CommonWalkingControlModules
copCommandWeightVector.set(copCommandWeight.getDoubleValue(), copCommandWeight.getDoubleValue());
代码示例来源:origin: us.ihmc/CommonWalkingControlModules
yoDesiredICPVelocity.set(desiredCapturePointVelocity2d);
代码示例来源:origin: us.ihmc/CommonWalkingControlModules
copCommandWeightVector.set(copCommandWeight.getDoubleValue(), copCommandWeight.getDoubleValue());
copCommandWeightVector.get(tempVector2d);
centerOfPressureCommand.setWeight(tempVector2d);
代码示例来源:origin: us.ihmc/IHMCHumanoidBehaviors
pelvisShiftScaleFactor.set(0.4, 0.7);
我有一组称为 nets 的整数集,我正在尝试对其进行迭代以确定是否已将来自或来自的整数添加到现有集合中;如果是这样,我将它们添加到现有集合中(这是为了跟踪电网中所有短路的组合)。 但是,我无法让 se
很奇怪:A 是一个集合,B 是一个集合的集合: Set A=new HashSet(); Set > B=new HashSet>(); 我给他们加了东西,输出 System.out.println
在 Agda 中,forall 的类型以这样的方式确定以下所有类型都是Set1 (其中 Set1 是 Set 的类型, A 的类型是 Set ): Set → A A → Set Set → Set
在 haskell 中我可以写一个函数 f where f :: Set a -> Set a -> Set a 如果我采用 Set Int 类型的两组 s1 和 s2,然后执行 f s1 s2 它将
在使用 Spring 时,我遇到了一个奇怪的问题。我有一个类,它接受一个集合作为输入,因为该类是底层框架的,所以我无法更改它。这是它的声明 private Set evaluate; public S
我是流的新手,我想通过将流操作应用于其条目集来修改 map ,但由于编译错误我无法这样做。 下面的代码只是创建了一个新的 map 对象并为其分配了一些整数值。然后它尝试通过在其条目集上应用流操作来删除
无论我看什么,我都会看到集合的输入是这样完成的: Set set = new HashSet(); 但是,我像这样定义我的集合 Set set = new HashSet(); 而且我仍然进行类型检查
我想对于 set -e 我可以捕获信号,但其他的我不知道。 最佳答案 为了完整性: set -e:如果命令失败则退出 set -u:如果在设置之前引用变量,则会出现错误 set -x:显示运行的命令
Set 维护唯一记录,并在尝试复制现有元素时更新现有记录。 考虑以下两种情况。您认为两者之间哪一个代码更快、更高效? 场景 1:使用 addAll() Set uniqueSet = new Hash
我在 Fedora 上做这个 问题: (sandbox)[root@localhost mysite]# django-admin.py runserver Error: Could not impo
https://codeforces.com/contest/1435/submission/96757666->使用set.upper_bound() https://codeforces.com/
使用 MySQL,我已将连接字符集设置为 UTF-8: SET NAMES 'utf8mb4'; SET CHARACTER SET 'utf8mb4'; 这样我就能以 UTF-8 格式返回所有内容,
在 Spring 3 MVC 中,我有一个称为 SettingsController 的 Controller ,它具有用于显示用户列表的 displayUsers()、saveUser() 和 de
我正在创建一个使用语法的程序,并查看该语法是否为 LL (1)。我想使用模块Set,但是我不知道如何进行,当然set的元素的类型是char,你能帮忙吗? 最佳答案 此答案假设您已经知道如何确定语法是否
好的,所以我重新整理了这篇文章,使其更容易理解(对所有的 Pastebin 感到抱歉,但堆栈溢出在代码格式化方面很愚蠢) 请注意,我不打算存储如下所述的大量数据。我使用我所说的数量的主要原因是为了尽可
我有一个密码,我保存在 Settings.settings 文件中并且我希望该部分被加密。 This是我得到的提示,但我真的不知道如何应用它。 谁能给我一个关于如何加密这样的密码的想法? 最佳答案 您
我在网上搜索并找到了如何在设置中添加特定的自定义数据类型。 我自己插入数据,而不是在程序运行时通过代码插入数据。我的问题是如何将自定义数据类型添加到设计器中的组合框。现在我想通了,需要建议,如何添加这
我一直在尝试将自定义类的自定义集合添加到我的 winforms 项目的应用程序设置中,我觉得我已经尝试了六种不同的方法,包括 this way , this way , this way , 和 th
在 Visual Studio 2008 中调试我的项目时,我的 Settings.settings 文件在构建之间不断重置。有没有办法防止这种情况发生? 谢谢。 最佳答案 好的,我找到了我真正想要的
关闭。这个问题不符合 Stack Overflow guidelines 。它目前不接受答案。 想改善这个问题吗?更新问题,以便堆栈溢出为 on-topic。 4年前关闭。 Improve this
我是一名优秀的程序员,十分优秀!