gpt4 book ai didi

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

转载 作者:知者 更新时间:2024-03-16 00:02:40 29 4
gpt4 key购买 nike

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

YoFramePoint.setAndMatchFrame介绍

暂无

代码示例

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

public void setInitialConditions(FramePoint initialPosition)
{
 this.initialPosition.setAndMatchFrame(initialPosition);
}

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

/**
* Put the constant CMP's on the footsteps.
*
* @param constantCMPsToPack List that will be packed with the constant CMP locations
* @param footstepList List containing the footsteps
* @param firstFootstepIndex Integer describing the index of the first footstep to consider when laying out the CMP's
* @param lastFootstepIndex Integer describing the index of the last footstep to consider when laying out the CMP's
*/
public static void computeConstantCMPsOnFeet(List<YoFramePoint> constantCMPsToPack, List<FramePoint> footstepList, int firstFootstepIndex,
                      int lastFootstepIndex)
{
 for (int i = firstFootstepIndex; i <= lastFootstepIndex; i++)
 {
   YoFramePoint constantCMP = constantCMPsToPack.get(i);
   // Put the constant CMP at the footstep location
   constantCMP.setAndMatchFrame(footstepList.get(i));
 }
}

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

public void setAndMatchFrame(FramePoint framePoint, FrameOrientation frameOrientation)
{
 boolean notifyListeners = true;
 position.setAndMatchFrame(framePoint, notifyListeners);
 orientation.setAndMatchFrame(frameOrientation, notifyListeners);
}

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

public void setInitialConditions(FramePoint initialPosition, FrameVector initialVelocity)
{
 this.initialPosition.setAndMatchFrame(initialPosition);
 this.initialVelocity.setAndMatchFrame(initialVelocity);
}

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

public void setFinalConditions(FramePoint finalPosition, FrameVector finalVelocity)
{
 this.finalPosition.setAndMatchFrame(finalPosition);
 this.finalVelocity.setAndMatchFrame(finalVelocity);
}

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

public void setAndMatchFrame(FramePoint framePoint, FrameOrientation frameOrientation)
{
 boolean notifyListeners = true;
 position.setAndMatchFrame(framePoint, notifyListeners);
 orientation.setAndMatchFrame(frameOrientation, notifyListeners);
}

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

@Override
 public void variableChanged(YoVariable<?> v)
 {
   getFrameTupleIncludingFrame(localFramePoint);
   point.setAndMatchFrame(localFramePoint);
 }
});

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

public void setFinalConditions(FramePoint finalPosition, FrameVector finalVelocity)
{
 this.finalPosition.setAndMatchFrame(finalPosition);
 this.finalVelocity.setAndMatchFrame(finalVelocity);
}

代码示例来源: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/CommonWalkingControlModules

public void updateCircleFrame(FramePoint circleCenter, FrameVector circleNormal)
{
 circleOrigin.setAndMatchFrame(circleCenter);
 rotationAxis.setAndMatchFrame(circleNormal);
 rotationAxis.normalize();
 circleFrame.update();
}

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

public void setDesiredHandPose(RobotSide robotSide, FramePoint desiredHandPosition, FrameOrientation desiredHandOrientation)
{
 yoDesiredHandPositions.get(robotSide).setAndMatchFrame(desiredHandPosition);
 yoDesiredHandOrientations.get(robotSide).setAndMatchFrame(desiredHandOrientation);
}

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

/**
* Update the basics: capture point, omega0, and the support polygons.
*/
public void update()
{
 centerOfMassPosition.setToZero(centerOfMassFrame);
 yoCenterOfMass.setAndMatchFrame(centerOfMassPosition);
 double omega0 = momentumBasedController.getOmega0();
 CapturePointTools.computeDesiredCentroidalMomentumPivot(yoDesiredCapturePoint, yoDesiredICPVelocity, omega0, yoPerfectCMP);
 icpPlanner.getFinalDesiredCapturePointPosition(yoFinalDesiredICP);
}

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

private void updatePositionVisualization()
{
 yoDesiredLinearAcceleration.setAndMatchFrame(desiredLinearAcceleration);
 accelerationControlModule.getBodyFixedPoint(tempPosition);
 yoCurrentPosition.setAndMatchFrame(tempPosition);
 accelerationControlModule.getBodyFixedPointCurrentLinearVelocity(tempLinearVelocity);
 yoCurrentLinearVelocity.setAndMatchFrame(tempLinearVelocity);
}

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

private void visualizeTrajectory()
{
 yoInitialPosition.getFrameTupleIncludingFrame(initialPosition);
 yoInitialPositionWorld.setAndMatchFrame(initialPosition);
 yoFinalPosition.getFrameTupleIncludingFrame(finalPosition);
 yoFinalPositionWorld.setAndMatchFrame(finalPosition);
 for (int i = 0; i < numberOfBalls; i++)
 {
   double t = (double) i / ((double) numberOfBalls - 1) * desiredTrajectoryTime.getDoubleValue();
   compute(t, false);
   yoCurrentPosition.getFrameTupleIncludingFrame(ballPosition);
   ballPosition.changeFrame(worldFrame);
   bagOfBalls.setBallLoop(ballPosition);
 }
 reset();
}

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

private void visualizeTrajectory()
{
 yoInitialPosition.getFrameTupleIncludingFrame(initialPosition);
 yoInitialPositionWorld.setAndMatchFrame(initialPosition);
 yoFinalPosition.getFrameTupleIncludingFrame(finalPosition);
 yoFinalPositionWorld.setAndMatchFrame(finalPosition);
 for (int i = 0; i < numberOfBalls; i++)
 {
   double t = (double) i / ((double) numberOfBalls - 1) * trajectoryTime.getDoubleValue();
   compute(t, false);
   yoCurrentPosition.getFrameTupleIncludingFrame(ballPosition);
   ballPosition.changeFrame(worldFrame);
   bagOfBalls.setBallLoop(ballPosition);
 }
 reset();
}

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

public void setFinalPoseWithoutFinalVelocity(FramePoint finalPosition, FrameOrientation finalOrientation)
{
 this.finalPosition.set(finalPosition);
 this.finalOrientation.set(finalOrientation);
 finalPositionForViz.setAndMatchFrame(finalPosition);
 finalOrientationForViz.setAndMatchFrame(finalOrientation);
 this.finalVelocity.setToZero();
 this.finalAngularVelocity.setToZero();
}

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

private void updatePositionVisualization()
{
 desiredSpatialAcceleration.getLinearPart(desiredLinearAcceleration);
 yoDesiredLinearAcceleration.setAndMatchFrame(desiredLinearAcceleration);
 tempPosition.setToZero(accelerationControlModule.getTrackingFrame());
 yoCurrentPosition.setAndMatchFrame(tempPosition);
 accelerationControlModule.getEndEffectorCurrentLinearVelocity(tempLinearVelocity);
 yoCurrentLinearVelocity.setAndMatchFrame(tempLinearVelocity);
}

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

public void submitFeedbackControlCommand(PointFeedbackControlCommand command)
{
 if (command.getEndEffector() != endEffector)
   throw new RuntimeException("Wrong end effector - received: " + command.getEndEffector() + ", expected: " + endEffector);
 base = command.getBase();
 output.set(command.getPointAccelerationCommand());
 accelerationControlModule.setGains(command.getGains());
 command.getBodyFixedPointIncludingFrame(tempPosition);
 accelerationControlModule.setPointToControl(tempPosition);
 command.getIncludingFrame(tempPosition, tempLinearVelocity, feedForwardLinearAcceleration);
 yoDesiredPosition.setAndMatchFrame(tempPosition);
 yoDesiredLinearVelocity.setAndMatchFrame(tempLinearVelocity);
 yoFeedForwardLinearAcceleration.setAndMatchFrame(feedForwardLinearAcceleration);
}

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

public void updateSteeringWheel(FramePoint center, FrameVector rotationAxis, FrameVector zeroAxis)
{
 steeringWheelCenter.setAndMatchFrame(center);
 steeringWheelRotationAxis.setAndMatchFrame(rotationAxis);
 steeringWheelRotationAxis.normalize();
 steeringWheelZeroAxis.setAndMatchFrame(zeroAxis);
 steeringWheelZeroAxis.normalize();
 steeringWheelFrame.update();
 steeringWheelFramePose.setToZero(steeringWheelFrame);
 steeringWheelFramePose.changeFrame(worldFrame);
 yoSteeringWheelFramePose.set(steeringWheelFramePose);
}

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

public void submitFeedbackControlCommand(SpatialFeedbackControlCommand command)
{
 if (command.getEndEffector() != endEffector)
   throw new RuntimeException("Wrong end effector - received: " + command.getEndEffector() + ", expected: " + endEffector);
 base = command.getBase();
 output.set(command.getSpatialAccelerationCommand());
 accelerationControlModule.setGains(command.getGains());
 command.getControlFramePoseIncludingFrame(tempPosition, tempOrientation);
 accelerationControlModule.setBodyFixedControlFrame(tempPosition, tempOrientation);
 command.getIncludingFrame(tempPosition, tempLinearVelocity, feedForwardLinearAcceleration);
 yoDesiredPosition.setAndMatchFrame(tempPosition);
 yoDesiredLinearVelocity.setAndMatchFrame(tempLinearVelocity);
 yoFeedForwardLinearAcceleration.setAndMatchFrame(feedForwardLinearAcceleration);
 command.getIncludingFrame(tempOrientation, tempAngularVelocity, feedForwardAngularAcceleration);
 yoDesiredOrientation.setAndMatchFrame(tempOrientation);
 yoDesiredAngularVelocity.setAndMatchFrame(tempAngularVelocity);
 yoFeedForwardAngularAcceleration.setAndMatchFrame(feedForwardAngularAcceleration);
}

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