gpt4 book ai didi

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

转载 作者:知者 更新时间:2024-03-14 21:54:49 27 4
gpt4 key购买 nike

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

YoFramePoint2d.<init>介绍

暂无

代码示例

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

public YoArtifactPosition(String name, DoubleYoVariable x, DoubleYoVariable y, GraphicType type, Color color, double radius)
{
 this(name, new YoFramePoint2d(x, y, ReferenceFrame.getWorldFrame()), type, color, radius);
}

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

private YoArtifactOval(String name, DoubleYoVariable centerX, DoubleYoVariable centerY, DoubleYoVariable radiusX, DoubleYoVariable radiusY, Color color)
{
 this(name, new YoFramePoint2d(centerX, centerY, ReferenceFrame.getWorldFrame()),
       new YoFrameVector2d(radiusX, radiusY, ReferenceFrame.getWorldFrame()), color);
}

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

public YoFrameConvexPolygon2d(String namePrefix, String nameSuffix, ReferenceFrame referenceFrame, int maxNumberOfVertices, YoVariableRegistry registry)
{
 this.numVertices = new IntegerYoVariable(namePrefix + "NumVertices" + nameSuffix, registry);
 numVertices.addVariableChangedListener(this);
 this.referenceFrame = referenceFrame;
 for (int i = 0; i < maxNumberOfVertices; i++)
 {
   YoFramePoint2d point = new YoFramePoint2d(namePrefix + "_" + i + "_", nameSuffix, referenceFrame, registry);
   point.attachVariableChangedListener(this);
   yoFramePoints.add(point);
 }
 convexPolygon2dForReading = new FrameConvexPolygon2d(referenceFrame);
 convexPolygon2dForWriting = new FrameConvexPolygon2d(referenceFrame);
}

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

public YoPlaneContactState(String namePrefix, RigidBody rigidBody, ReferenceFrame planeFrame, List<FramePoint2d> contactFramePoints,
   double coefficientOfFriction, YoVariableRegistry parentRegistry)
{
 this.registry = new YoVariableRegistry(namePrefix + getClass().getSimpleName());
 this.inContact = new BooleanYoVariable(namePrefix + "InContact", registry);
 this.coefficientOfFriction = new DoubleYoVariable(namePrefix + "CoefficientOfFriction", registry);
 this.coefficientOfFriction.set(coefficientOfFriction);
 this.rigidBody = rigidBody;
 this.planeFrame = planeFrame;
 parentRegistry.addChild(registry);
 this.contactNormalFrameVector = new FrameVector(planeFrame, 0.0, 0.0, 1.0);
 contactPoints = new ArrayList<YoContactPoint>(contactFramePoints.size());
 for (int i = 0; i < contactFramePoints.size(); i++)
 {
   YoContactPoint contactPoint = new YoContactPoint(namePrefix, i, contactFramePoints.get(i), this, registry);
   contactPoint.setInContact(true);
   contactPoints.add(contactPoint);
 }
 inContact.set(true);
 totalNumberOfContactPoints = contactPoints.size();
 contactPointCentroid = new YoFramePoint2d(namePrefix + "ContactPointCentroid", planeFrame, registry);
 contactPointCentroid.setToNaN();
 hasContactStateChanged = new BooleanYoVariable(namePrefix + "HasChanged", registry);
}

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

public ICPOptimizationSolutionHandler(ICPOptimizationParameters icpOptimizationParameters, FootstepRecursionMultiplierCalculator footstepRecursionMultiplierCalculator,
   boolean visualize, YoVariableRegistry registry, YoGraphicsListRegistry yoGraphicsListRegistry)
{
 this.footstepRecursionMultiplierCalculator = footstepRecursionMultiplierCalculator;
 actualEndOfStateICP = new YoFramePoint2d("actualEndOfStateICP", worldFrame, registry);
 controllerReferenceICP = new YoFramePoint2d("controllerReferenceICP", worldFrame, registry);
 controllerReferenceICPVelocity = new YoFrameVector2d("controllerReferenceICPVelocity", worldFrame, registry);
 controllerReferenceCMP = new YoFramePoint2d("controllerReferenceCMP", worldFrame, registry);
 nominalEndOfStateICP = new YoFramePoint2d("nominalEndOfStateICP", worldFrame, registry);
 nominalReferenceICP = new YoFramePoint2d("nominalReferenceICP", worldFrame, registry);
 nominalReferenceICPVelocity = new YoFrameVector2d("nominalReferenceICPVelocity", worldFrame, registry);
 nominalReferenceCMP = new YoFramePoint2d("nominalReferenceCMP", worldFrame, registry);
 controllerCostToGo = new DoubleYoVariable("costToGo", registry);
 controllerFootstepCostToGo = new DoubleYoVariable("footstepCostToGo", registry);
 controllerFootstepRegularizationCostToGo = new DoubleYoVariable("footstepRegularizationCostToGo", registry);
 controllerFeedbackCostToGo = new DoubleYoVariable("feedbackCostToGo", registry);
 controllerFeedbackRegularizationCostToGo = new DoubleYoVariable("feedbackRegularizationCostToGo", registry);
 controllerDynamicRelaxationCostToGo = new DoubleYoVariable("dynamicRelaxationCostToGo", registry);
 footstepDeadband = new DoubleYoVariable("footstepDeadband", registry);
 footstepSolutionResolution = new DoubleYoVariable("footstepSolutionResolution", registry);
 useDiscontinuousDeadband = new BooleanYoVariable("useDiscontinuousDeadband", registry);
 footstepWasAdjusted = new BooleanYoVariable("footstepWasAdjusted", registry);
 footstepDeadband.set(icpOptimizationParameters.getAdjustmentDeadband());
 footstepSolutionResolution.set(icpOptimizationParameters.getFootstepSolutionResolution());
 useDiscontinuousDeadband.set(icpOptimizationParameters.useDiscontinuousDeadband());
 //if (yoGraphicsListRegistry != null)
 //   setupVisualizers(yoGraphicsListRegistry, visualize);
}

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

YoFramePoint2d vertex = new YoFramePoint2d(x, y, worldFrame);
vertexBuffer.add(vertex);

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

public SettableFootSwitch(ContactablePlaneBody foot, RobotQuadrant quadrant, double totalRobotWeight, YoVariableRegistry registry)
{
 this.hasFootHitGround = new BooleanYoVariable(quadrant.getCamelCaseName() + "_SettableFootSwitch", registry);
 this.totalRobotWeight = totalRobotWeight;
 this.foot = foot;
 hasFootHitGround.set(false);
 yoResolvedCoP = new YoFramePoint2d(foot.getName() + "ResolvedCoP", "", foot.getSoleFrame(), registry);
}

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

DoubleYoVariable desiredCoPy = (DoubleYoVariable) scs.getVariable(desiredCoPNameSpace, desiredCoPName + "Y");
ReferenceFrame soleFrame = referenceFrames.getSoleFrame(robotSide);
YoFramePoint2d desiredCoP = new YoFramePoint2d(desiredCoPx, desiredCoPy, soleFrame);
desiredCoPsUpdatedFromSCS.put(robotSide, desiredCoP);

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

stanceEntryCMP = new YoFramePoint2d(yoNamePrefix + "StanceEntryCMP", worldFrame, registry);
stanceExitCMP = new YoFramePoint2d(yoNamePrefix + "StanceExitCMP", worldFrame, registry);
previousStanceExitCMP = new YoFramePoint2d(yoNamePrefix + "PreviousStanceExitCMP", worldFrame, registry);

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

String listName = getClass().getSimpleName();
YoFramePoint2d cop2d = new YoFramePoint2d(copName + "2d", "", contactableBody.getSoleFrame(), registry);
centersOfPressure2d.put(contactableBody, cop2d);
cops.put(contactableBody, footCenter2d);
YoFramePoint2d yoCop = new YoFramePoint2d(contactableBody.getName() + "CoP", contactableBody.getSoleFrame(), registry);
yoCop.set(footCenter2d);
yoCops.put(contactableBody, yoCop);

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

DoubleYoVariable desiredCoPy = (DoubleYoVariable) scs.getVariable(desiredCoPNameSpace, desiredCoPName + "Y");
ReferenceFrame soleFrame = referenceFrames.getSoleFrame(robotSide);
YoFramePoint2d desiredCoP = new YoFramePoint2d(desiredCoPx, desiredCoPy, soleFrame);
desiredCoPsUpdatedFromSCS.put(robotSide, desiredCoP);

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

YoFramePoint2d vertex = new YoFramePoint2d(name + "Vertex" + i, worldFrame, registry);
vertex.setToNaN();
vertexBuffer.add(vertex);

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

public KinematicsBasedFootSwitch(String footName, SideDependentList<? extends ContactablePlaneBody> bipedFeet, double switchZThreshold, double totalRobotWeight, RobotSide side, YoVariableRegistry parentRegistry)
{
 registry = new YoVariableRegistry(footName + getClass().getSimpleName());
 foot = bipedFeet.get(side);
 ContactablePlaneBody oppositeFoot = bipedFeet.get(side.getOppositeSide());
 otherFeet = new ContactablePlaneBody[] {oppositeFoot};
 this.totalRobotWeight = totalRobotWeight;
 hitGround = new BooleanYoVariable(footName + "hitGround", registry);
 fixedOnGround = new BooleanYoVariable(footName + "fixedOnGround", registry);
 soleZ = new DoubleYoVariable(footName + "soleZ", registry);
 ankleZ = new DoubleYoVariable(footName + "ankleZ", registry);
 this.switchZThreshold = new DoubleYoVariable(footName + "footSwitchZThreshold", registry);
 this.switchZThreshold.set(switchZThreshold);
 yoResolvedCoP = new YoFramePoint2d(footName + "ResolvedCoP", "", foot.getSoleFrame(), registry);
 parentRegistry.addChild(registry);
}

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

public YoFramePoint2d buildUpdatedYoFramePointForVisualizationOnly()
{
 if (yoFramePointInWorld == null)
 {
   final ReferenceFrame worldFrame = ReferenceFrame.getWorldFrame();
   if (!isReferenceFrameRegistered(worldFrame))
    registerReferenceFrame(worldFrame);
   yoFramePointInWorld = new YoFramePoint2d(namePrefix, worldFrame.getName(), worldFrame, registry);
   attachVariableChangedListener(new VariableChangedListener()
   {
    private final FramePoint2d localFramePoint = new FramePoint2d();
    private final YoFramePoint2d point = yoFramePointInWorld;
    @Override
    public void variableChanged(YoVariable<?> v)
    {
      getFrameTuple2dIncludingFrame(localFramePoint);
      point.setAndMatchFrame(localFramePoint);
    }
   });
 }
 return yoFramePointInWorld;
}

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

public ICPProportionalController(ICPControlGains gains, double controlDT, YoVariableRegistry parentRegistry)
{
 this.controlDT = controlDT;
 icpVelocityDirectionFrame = new Vector2dZUpFrame("icpVelocityDirectionFrame", worldFrame);
 icpPosition = new YoFramePoint("icpPosition", ReferenceFrame.getWorldFrame(), registry);
 parentRegistry.addChild(registry);
 captureKpParallelToMotion = gains.getYoKpParallelToMotion();
 captureKpOrthogonalToMotion = gains.getYoKpOrthogonalToMotion();
 captureKi = gains.getYoKi();
 captureKiBleedoff = gains.getYoKiBleedOff();
 feedbackPartMaxRate = gains.getFeedbackPartMaxRate();
 rateLimitFeedbackPart = feedbackPartMaxRate != null;
 if (rateLimitFeedbackPart)
   rateLimitedCMPOutput = new YoFramePoint2d("icpControlRateLimitedCMPOutput", "", worldFrame, registry);
 else
   rateLimitedCMPOutput = null;
}

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

/**
* Quadruped version, assumes flat ground
* @param footName name for yovariable registry and yovariable names
* @param quadrupedFeet all the feet
* @param switchZThreshold difference in z between the lowest foot and the foot inquestion before assuming foot is in contact
* @param totalRobotWeight
* @param quadrant the foot in question
* @param parentRegistry
*/
public KinematicsBasedFootSwitch(String footName, QuadrantDependentList<? extends ContactablePlaneBody> quadrupedFeet, double switchZThreshold, double totalRobotWeight, RobotQuadrant quadrant, YoVariableRegistry parentRegistry)
{
 registry = new YoVariableRegistry(footName + getClass().getSimpleName());
 foot = quadrupedFeet.get(quadrant);
 
 ContactablePlaneBody acrossBodyFrontFoot = quadrupedFeet.get(quadrant.getAcrossBodyFrontQuadrant());
 ContactablePlaneBody acrossBodyHindFoot = quadrupedFeet.get(quadrant.getAcrossBodyHindQuadrant());
 ContactablePlaneBody sameSideFoot = quadrupedFeet.get(quadrant.getSameSideQuadrant());
 otherFeet = new ContactablePlaneBody[] {acrossBodyFrontFoot, acrossBodyHindFoot, sameSideFoot};
 
 this.totalRobotWeight = totalRobotWeight;
 hitGround = new BooleanYoVariable(footName + "hitGround", registry);
 fixedOnGround = new BooleanYoVariable(footName + "fixedOnGround", registry);
 soleZ = new DoubleYoVariable(footName + "soleZ", registry);
 ankleZ = new DoubleYoVariable(footName + "ankleZ", registry);
 this.switchZThreshold = new DoubleYoVariable(footName + "footSwitchZThreshold", registry);
 this.switchZThreshold.set(switchZThreshold);
 yoResolvedCoP = new YoFramePoint2d(footName + "ResolvedCoP", "", foot.getSoleFrame(), registry);
 parentRegistry.addChild(registry);
}

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

desiredCoPCommandInSoleFrame = new YoFramePoint2d(namePrefix + "DesiredCoPCommand", planeFrame, registry);

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

public ExplorationHelper(ContactableFoot contactableFoot, FootControlHelper footControlHelper, String prefix, YoVariableRegistry registry)
{
 footholdExplorationActive = new BooleanYoVariable(prefix + "FootholdExplorationActive", registry);
 timeExploring = new DoubleYoVariable(prefix + "TimeExploring", registry);
 startTime = new DoubleYoVariable(prefix + "StartTime", registry);
 yoCurrentCorner = new IntegerYoVariable(prefix + "CurrentCornerExplored", registry);
 centerOfPressureCommand.setContactingRigidBody(contactableFoot.getRigidBody());
 explorationParameters = footControlHelper.getWalkingControllerParameters().getOrCreateExplorationParameters(registry);
 if (explorationParameters != null)
   copCommandWeight = explorationParameters.getCopCommandWeight();
 else
   copCommandWeight = null;
 soleFrame = footControlHelper.getContactableFoot().getSoleFrame();
 partialFootholdControlModule = footControlHelper.getPartialFootholdControlModule();
 YoGraphicsListRegistry graphicObjectsListRegistry = footControlHelper.getMomentumBasedController().getDynamicGraphicObjectsListRegistry();
 if (graphicObjectsListRegistry != null)
 {
   yoDesiredCop = new YoFramePoint2d(prefix + "DesiredExplorationCop", ReferenceFrame.getWorldFrame(), registry);
   String name = prefix + "Desired Center of Pressure for Exploration";
   YoArtifactPosition artifact = new YoArtifactPosition(name, yoDesiredCop.getYoX(), yoDesiredCop.getYoY(), GraphicType.BALL, Color.BLUE, 0.003);
   graphicObjectsListRegistry.registerArtifact(prefix + getClass().getSimpleName(), artifact);
 }
 else
 {
   yoDesiredCop = null;
 }
}

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

artifacts.add(new YoArtifactPolygon("Safe CMP Area", yoSafeCMPArea, Color.CYAN, false));
yoCapturePoint = new YoFramePoint2d("CapturePointForMomentum", worldFrame, registry);
artifacts.add(new YoArtifactPosition("Capture Point For Momentum", yoCapturePoint.getYoX(), yoCapturePoint.getYoY(), GraphicType.BALL, Color.BLUE, 0.01));

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

upcomingFootstepLocations.add(new YoFramePoint2d("upcomingFootstepLocation" + i, worldFrame, registry));
footstepSolutions.add(new YoFramePoint2d("footstepSolutionLocation" + i, worldFrame, registry));

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