gpt4 book ai didi

us.ihmc.robotics.math.frames.YoFramePoint.scale()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-15 23:28:40 28 4
gpt4 key购买 nike

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

YoFramePoint.scale介绍

暂无

代码示例

代码示例来源:origin: us.ihmc/CommonWalkingControlModules

/**
* Given a desired capturePoint location and an initial position of the capture point,
* compute the constant CMP that will drive the capture point from the
* initial position to the final position.
* @param cmpToPack
* @param finalDesiredCapturePoint
* @param initialCapturePoint
* @param omega0 the natural frequency &omega; = &radic;<span style="text-decoration:overline;">&nbsp; g / z0&nbsp;</span> of the biped.
* @param stepTime
*/
public static void computeConstantCMPFromInitialAndFinalCapturePointLocations(YoFramePoint cmpToPack, YoFramePoint finalDesiredCapturePoint,
                                       YoFramePoint initialCapturePoint, double omega0, double stepTime)
{
 double exponentialTerm = Math.exp(-omega0 * stepTime);
 cmpToPack.scaleSub(exponentialTerm, finalDesiredCapturePoint, initialCapturePoint);
 cmpToPack.scale(1.0 / (exponentialTerm - 1.0));
}

代码示例来源:origin: us.ihmc/CommonWalkingControlModules

/**
* Put the constant CMP in the middle of the two given footsteps.
* @param constantCMPToPack YoFramePoint that will be packed with the constant CMP location
* @param firstFootstep FramePoint holding the position of the first footstep
* @param secondFootstep FramePoint holding the position of the second footstep
*/
public static void putConstantCMPBetweenFeet(YoFramePoint constantCMPToPack, FramePoint firstFootstep, FramePoint secondFootstep)
{
 constantCMPToPack.setAndMatchFrame(firstFootstep);
 constantCMPToPack.add(secondFootstep);
 constantCMPToPack.scale(0.5);
}

代码示例来源:origin: us.ihmc/IHMCStateEstimation

private void updateCurrents()
{
 if (numberOfFeetTrusted.getIntegerValue() == numberOfFeet)
 {
   for (int i = 0; i < numberOfFeet; i++)
   {
    RigidBody foot = allFeet.get(i);
    footPosition.setToZero(footSoleFrames.get(foot));
    currentFootPositions.get(foot).setAndMatchFrame(footPosition);
   }
   currentAverageFootPosition.setToZero();
   for (int i = 0; i < numberOfFeet; i++)
   {
    RigidBody foot = allFeet.get(i);
    currentAverageFootPosition.add(currentFootPositions.get(foot));
   }
   currentAverageFootPosition.scale(1.0 / numberOfFeet);
 }
 else
 {
   for (int i = 0; i < numberOfFeet; i++)
    currentFootPositions.get(allFeet.get(i)).setToNaN();
   currentAverageFootPosition.setToNaN();
 }
}

代码示例来源:origin: us.ihmc/IHMCStateEstimation

public void update()
{
 if (footRawCoPPositionsInWorld != null)
 {
   overallRawCoPPositionInWorld.setToZero();
   double totalFootForce = 0.0;
   for (int i = 0; i < footList.size(); i++)
   {
    RigidBody rigidBody = footList.get(i);
    footSwitches.get(rigidBody).computeAndPackCoP(tempRawCoP2d);
    tempRawCoP.setIncludingFrame(tempRawCoP2d.getReferenceFrame(), tempRawCoP2d.getX(), tempRawCoP2d.getY(), 0.0);
    tempRawCoP.changeFrame(worldFrame);
    footRawCoPPositionsInWorld.get(rigidBody).set(tempRawCoP);
    footSwitches.get(rigidBody).computeAndPackFootWrench(tempWrench);
    double singleFootForce = tempWrench.getLinearPartZ();
    totalFootForce += singleFootForce;
    tempRawCoP.scale(singleFootForce);
    overallRawCoPPositionInWorld.add(tempRawCoP);
   }
   overallRawCoPPositionInWorld.scale(1.0 / totalFootForce);
 }
}

代码示例来源:origin: us.ihmc/IHMCStateEstimation

referenceAverageFootPosition.add(referenceFootPositions.get(foot));
referenceAverageFootPosition.scale(1.0 / trustedFeet.size());

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