gpt4 book ai didi

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

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

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

YoFramePoint.getFramePointCopy介绍

暂无

代码示例

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

/**
* @deprecated Creates garbage.
*/
public FramePoint getPositionCopy()
{
 return position.getFramePointCopy();
}

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

public FramePoint getPosition()
{
 return position.getFramePointCopy();
}

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

private List<FramePoint> getWaypointsAtGroundClearance(double groundClearance, double[] proportionsThroughTrajectoryForGroundClearance)
{
 FramePoint initialPosition = allPositions[0].getFramePointCopy();
 FramePoint finalPosition = allPositions[3].getFramePointCopy();
 positionSources[0].getPosition(initialPosition);
 positionSources[1].getPosition(finalPosition);
 initialPosition.changeFrame(referenceFrame);
 finalPosition.changeFrame(referenceFrame);
 List<FramePoint> waypoints = getWaypointsAtSpecifiedGroundClearance(initialPosition, finalPosition, groundClearance,
    proportionsThroughTrajectoryForGroundClearance);
 return waypoints;
}

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

protected void checkForCloseWaypoints()
{
 if (waypointsAreCloseTogether())
 {
   FramePoint midpoint = allPositions[waypointIndices[0]].getFramePointCopy();
   midpoint.add(allPositions[waypointIndices[1]].getFramePointCopy());
   midpoint.scale(0.5);
   for (int i = 0; i < 2; i++)
   {
    allPositions[waypointIndices[i]].set(midpoint);
   }
   waypointsAreTheSamePoint = true;
 }
 else
 {
   waypointsAreTheSamePoint = false;
 }
}

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

private void visualizeTrajectory()
{
 t0ForViz = timeIntoStep.getDoubleValue();
 tfForViz = swingTime.getDoubleValue();
 for (int i = 0; i < numberOfBallsInBag; i++)
 {
   tForViz = t0ForViz + (double) i / (double) (numberOfBallsInBag) * (tfForViz - t0ForViz);
   computePositionsForVis(tForViz);
   bagOfBalls.setBall(desiredPosition.getFramePointCopy(), i);
 }
}

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

private void visualizeSpline()
{
 double t0;
 double tf;
 double t;
 for (int i = 0; i < numberOfVisualizationMarkers; i++)
 {
   t0 = concatenatedSplinesWithArcLengthCalculatedIteratively.getT0();
   tf = concatenatedSplinesWithArcLengthCalculatedIteratively.getTf();
   t = t0 + (double) i / (double) (numberOfVisualizationMarkers) * (tf - t0);
   compute(t);
   trajectoryBagOfBalls.setBall(desiredPosition.getFramePointCopy(), i);
 }
 for (int i = 0; i < nonAccelerationEndpointIndices.length; i++)
 {
   fixedPointBagOfBalls.setBall(allPositions[nonAccelerationEndpointIndices[i]].getFramePointCopy(), YoAppearance.AliceBlue(), i);
 }
}

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

private List<FramePoint> getWaypointsForObstacleClearance(double swingHeight)
 waypoints.add(allPositions[endpointIndices[0]].getFramePointCopy());
 waypoints.add(allPositions[endpointIndices[1]].getFramePointCopy());

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

private void setConcatenatedSplines(YoConcatenatedSplines concatenatedSplines)
{
 double[] nonAccelerationEndpointTimes = new double[4];
 double[] accelerationEndpointTimes = new double[2];
 FramePoint[] nonAccelerationEndpointPositions = new FramePoint[4];
 FrameVector[] nonAccelerationEndpointVelocities = new FrameVector[4];
 for (int i = 0; i < 4; i++)
 {
   nonAccelerationEndpointTimes[i] = allTimes[nonAccelerationEndpointIndices[i]].getDoubleValue();
   nonAccelerationEndpointPositions[i] = allPositions[nonAccelerationEndpointIndices[i]].getFramePointCopy();
   nonAccelerationEndpointVelocities[i] = allVelocities[nonAccelerationEndpointIndices[i]].getFrameVectorCopy();
 }
 for (int i = 0; i < 2; i++)
 {
   accelerationEndpointTimes[i] = allTimes[accelerationEndpointIndices[i]].getDoubleValue();
 }
 concatenatedSplines.setCubicLinearQuinticLinearCubic(nonAccelerationEndpointTimes, nonAccelerationEndpointPositions, nonAccelerationEndpointVelocities,
    accelerationEndpointTimes);
}

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

private List<FramePoint> getWaypointsAtGroundClearances(double[] groundClearances, double[] proportionsThroughTrajectoryForGroundClearance)
{
 FramePoint initialPosition = allPositions[0].getFramePointCopy();
 FramePoint finalPosition = allPositions[3].getFramePointCopy();
 positionSources[0].getPosition(initialPosition);
 positionSources[1].getPosition(finalPosition);
 initialPosition.changeFrame(referenceFrame);
 finalPosition.changeFrame(referenceFrame);
 List<FramePoint> waypoints = new ArrayList<FramePoint>();
 waypoints.add(new FramePoint(initialPosition.getReferenceFrame()));
 waypoints.add(new FramePoint(initialPosition.getReferenceFrame()));
 for (int i = 0; i < 2; i++)
 {
   FramePoint waypoint = waypoints.get(i);
   waypoint.set(initialPosition);
   FrameVector offsetFromInitial = new FrameVector(waypoint.getReferenceFrame());
   offsetFromInitial.set(finalPosition);
   offsetFromInitial.sub(initialPosition);
   offsetFromInitial.scale(proportionsThroughTrajectoryForGroundClearance[i]);
   waypoint.add(offsetFromInitial);
   waypoint.setZ(waypoints.get(i).getZ() + groundClearances[i]);
 }
 return waypoints;
}

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

private void setAccelerationEndpointPositions()
{
 for (int i : new int[] {0, 1})
 {
   FrameVector waypointToEndpoint = getWaypointToEndpoint(i);
   FrameVector oppositeWaypointToEndpoint = getOppositeWaypointToEndpoint(i);
   double scaleFactor = waypointToEndpoint.dot(oppositeWaypointToEndpoint) / oppositeWaypointToEndpoint.length()
      * linearSplineLengthFactor.getDoubleValue();
   oppositeWaypointToEndpoint.normalize();
   oppositeWaypointToEndpoint.scale(scaleFactor);
   allPositions[accelerationEndpointIndices[i]].set(allPositions[waypointIndices[i]].getFramePointCopy());
   allPositions[accelerationEndpointIndices[i]].add(oppositeWaypointToEndpoint);
 }
}

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

public void variableChanged(YoVariable<?> v)
 {
   if (legInverseKinematicsCalculators == null)
    return;
   reader.read();
   sdfRobot.update();
   if (sliderSpace.getEnumValue() == SliderSpace.CARTESIAN)
   {
    for (RobotSide robotSide : RobotSide.values())
    {
      YoFramePose footIK = feetIKs.get(robotSide);
      FramePoint position = footIK.getPosition().getFramePointCopy();
      FrameOrientation orientation = footIK.getOrientation().getFrameOrientationCopy();
      FramePose framePose = new FramePose(position, orientation);
      framePose.changeFrame(fullRobotModel.getPelvis().getBodyFixedFrame());
      framePose.getPose(desiredTransform);
      legInverseKinematicsCalculators.get(robotSide).solve(desiredTransform);
      YoFramePose handIK = handIKs.get(robotSide);
      position = handIK.getPosition().getFramePointCopy();
      orientation = handIK.getOrientation().getFrameOrientationCopy();
      framePose = new FramePose(position, orientation);
      framePose.changeFrame(fullRobotModel.getChest().getBodyFixedFrame());
      framePose.getPose(desiredTransform);
      armInverseKinematicsCalculators.get(robotSide).solve(desiredTransform);
    }
    writer.updateRobotConfigurationBasedOnFullRobotModel();
   }
 }
}

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

public void variableChanged(YoVariable<?> v)
 {
   if (legInverseKinematicsCalculators == null)
    return;
   reader.read();
   sdfRobot.update();
   if (sliderSpace.getEnumValue() == SliderSpace.CARTESIAN)
   {
    for (RobotSide robotSide : RobotSide.values())
    {
      YoFramePose footIK = feetIKs.get(robotSide);
      FramePoint position = footIK.getPosition().getFramePointCopy();
      FrameOrientation orientation = footIK.getOrientation().getFrameOrientationCopy();
      FramePose framePose = new FramePose(position, orientation);
      framePose.changeFrame(fullRobotModel.getPelvis().getBodyFixedFrame());
      framePose.getPose(desiredTransform);
      legInverseKinematicsCalculators.get(robotSide).solve(desiredTransform);
      YoFramePose handIK = handIKs.get(robotSide);
      position = handIK.getPosition().getFramePointCopy();
      orientation = handIK.getOrientation().getFrameOrientationCopy();
      framePose = new FramePose(position, orientation);
      framePose.changeFrame(fullRobotModel.getChest().getBodyFixedFrame());
      framePose.getPose(desiredTransform);
      armInverseKinematicsCalculators.get(robotSide).solve(desiredTransform);
    }
    writer.updateRobotConfigurationBasedOnFullRobotModel();
   }
 }
}

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

swingLeg.set(robotQuadrant);
FramePoint initialPosition = new FramePoint(yoFootPositions.get(robotQuadrant).getFramePointCopy());
FramePoint desiredFootPosition = new FramePoint();
FramePoint footPosition = yoFootPosition.getFramePointCopy();
footPosition.changeFrame(ReferenceFrame.getWorldFrame());
fourFootSupportPolygon.setFootstep(robotQuadrant, footPosition);

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