us.ihmc.euclid.referenceFrame.ReferenceFrame.getWorldFrame()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(8.6k)|赞(0)|评价(0)|浏览(68)

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

ReferenceFrame.getWorldFrame介绍

暂无

代码示例

代码示例来源:origin: us.ihmc/euclid-frame

/**
* Creates a new line segment and initializes it to be same as the given line segment.
* <p>
* The reference frame is initialized to {@code ReferenceFrame.getWorldFrame()}.
* </p>
*
* @param lineSegment3DReadOnly the other line segment to copy. Not modified.
*/
public FrameLineSegment3D(LineSegment3DReadOnly lineSegment3DReadOnly)
{
 this(ReferenceFrame.getWorldFrame(), lineSegment3DReadOnly);
}

代码示例来源:origin: us.ihmc/ihmc-graphics-description

public YoGraphicTriangle(String name, AppearanceDefinition appearance, YoVariableRegistry registry)
{
 this(name, new YoFramePoint3D(name + "0", ReferenceFrame.getWorldFrame(), registry), new YoFramePoint3D(name + "1", ReferenceFrame.getWorldFrame(), registry),
    new YoFramePoint3D(name + "2", ReferenceFrame.getWorldFrame(), registry), appearance);
}

代码示例来源:origin: us.ihmc/ihmc-graphics-description

public YoGraphicVector(String name, YoDouble baseX, YoDouble baseY, YoDouble baseZ, YoDouble x, YoDouble y, YoDouble z, double scaleFactor,
           AppearanceDefinition appearance, boolean drawArrowhead)
{
 super(name);
 base = new YoFramePoint3D(baseX, baseY, baseZ, ReferenceFrame.getWorldFrame());
 vector = new YoFrameVector3D(x, y, z, ReferenceFrame.getWorldFrame());
 this.drawArrowhead = drawArrowhead;
 this.scaleFactor = scaleFactor;
 this.appearance = appearance;
}

代码示例来源:origin: us.ihmc/ihmc-graphics-description

public YoGraphicCylinder(String name, YoDouble baseX, YoDouble baseY, YoDouble baseZ, YoDouble x, YoDouble y, YoDouble z, AppearanceDefinition appearance,
            double lineThickness)
{
 super(name);
 base = new YoFramePoint3D(baseX, baseY, baseZ, ReferenceFrame.getWorldFrame());
 vector = new YoFrameVector3D(x, y, z, ReferenceFrame.getWorldFrame());
 this.lineThickness = lineThickness;
 this.appearance = appearance;
}

代码示例来源:origin: us.ihmc/euclid-frame

/**
* Creates a new pose 3D initialized with its position and orientation set to zero and its reference
* frame to {@code ReferenceFrame#getWorldFrame()}.
*/
public FramePose3D()
{
 setToZero(ReferenceFrame.getWorldFrame());
}

代码示例来源:origin: us.ihmc/euclid-frame

/**
* Creates a new frame point and initializes it coordinates to zero and its reference frame to
* {@link ReferenceFrame#getWorldFrame()}.
*/
public FramePoint3D()
{
 setToZero(ReferenceFrame.getWorldFrame());
}

代码示例来源:origin: us.ihmc/euclid-frame

/**
* Creates a new line, initializes its point and direction from the given line and its reference
* frame to {@code ReferenceFrame.getWorldFrame()}.
*
* @param line3DReadOnly the line used to initialize the point and direction of this. Not modified.
*/
public FrameLine3D(Line3DReadOnly line3DReadOnly)
{
 setIncludingFrame(ReferenceFrame.getWorldFrame(), line3DReadOnly);
}

代码示例来源:origin: us.ihmc/euclid-frame

/**
* Creates a new frame vector and initializes it components to zero and its reference frame to
* {@link ReferenceFrame#getWorldFrame()}.
*/
public FrameVector2D()
{
 setToZero(ReferenceFrame.getWorldFrame());
}

代码示例来源:origin: us.ihmc/ihmc-graphics-description

public void setPosition(FramePoint3DReadOnly position)
{
 position.checkReferenceFrameMatch(ReferenceFrame.getWorldFrame());
 setPosition((Tuple3DReadOnly) position);
}

代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit

private static SpatialAccelerationCalculator createSpatialAccelerationCalculator(RigidBodyReadOnly body, SpatialAccelerationReadOnly rootAcceleration,
                                            boolean doVelocityTerms, boolean doAccelerationTerms)
{
 SpatialAccelerationCalculator spatialAccelerationCalculator = new SpatialAccelerationCalculator(body, ReferenceFrame.getWorldFrame(), doVelocityTerms, doAccelerationTerms);
 spatialAccelerationCalculator.setRootAcceleration(rootAcceleration);
 return spatialAccelerationCalculator;
}

代码示例来源:origin: us.ihmc/simulation-construction-set-tools

@Override
public boolean isPointOnOrInside(Point3D pointInWorldToCheck)
{
 FramePoint3D pointToCheck = new FramePoint3D(ReferenceFrame.getWorldFrame(), pointInWorldToCheck);
 if (cylinderFrame.isInsideOrOnSurface(pointToCheck))
 {
   return true;
 }
 return false;
}

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

private void update()
{
  frame.getTransformToDesiredFrame(transform, ReferenceFrame.getWorldFrame());
  transform.invert();
}

代码示例来源:origin: us.ihmc/ihmc-avatar-interfaces-test

private ChestTrajectoryMessage createRandomChestMessage(double trajectoryTime, Random random)
{
 OneDoFJointBasics[] spineClone = MultiBodySystemFactories.cloneOneDoFJointKinematicChain(pelvis, chest);
 MultiBodySystemRandomTools.nextStateWithinJointLimits(random, JointStateType.CONFIGURATION, spineClone);
 RigidBodyBasics chestClone = spineClone[spineClone.length - 1].getSuccessor();
 FrameQuaternion desiredRandomChestOrientation = new FrameQuaternion(chestClone.getBodyFixedFrame());
 desiredRandomChestOrientation.changeFrame(ReferenceFrame.getWorldFrame());
 Quaternion desiredOrientation = new Quaternion(desiredRandomChestOrientation);
 return HumanoidMessageTools.createChestTrajectoryMessage(trajectoryTime, desiredOrientation, ReferenceFrame.getWorldFrame(), ReferenceFrame.getWorldFrame());
}

代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit-test

private AlphaFilteredYoFrameQuaternion createAlphaFilteredYoFrameQuaternion(DoubleProvider alpha)
{
 YoVariableRegistry registry = new YoVariableRegistry("test");
 ReferenceFrame referenceFrame = ReferenceFrame.getWorldFrame();
 YoFrameQuaternion unfilteredQuaternion = new YoFrameQuaternion("qMeasured", referenceFrame, registry);
 AlphaFilteredYoFrameQuaternion q = new AlphaFilteredYoFrameQuaternion("qFiltered", "", unfilteredQuaternion, alpha, registry);
 return q;
}

代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit

public void initialize()
{
 time.set(0.0);
 FrameQuaternion orientationToPack = new FrameQuaternion(ReferenceFrame.getWorldFrame());
 orientationProvider.getOrientation(orientationToPack);
 orientationToPack.changeFrame(orientation.getReferenceFrame());
 orientation.set(orientationToPack);
}

代码示例来源:origin: us.ihmc/ihmc-avatar-interfaces-test

private FramePose2D getCurrentMidFeetPose2dTheHardWayBecauseReferenceFramesDontUpdateProperly(HumanoidFloatingRootJointRobot robot)
{
 FramePose3D midFeetPose = getRobotMidFeetPose(robot);
 FramePose2D ret = new FramePose2D();
 ret.setIncludingFrame(ReferenceFrame.getWorldFrame(), midFeetPose.getX(), midFeetPose.getY(), midFeetPose.getYaw());
 return ret;
}

代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit-test

@ContinuousIntegrationTest(estimatedDuration = 0.0)
@Test(timeout = 30000)
public void testAddPrismaticJoint_String_RigidBody_Vector3d_Vector3d()
{
 String jointName = "joint";
 RigidBodyBasics parentBody = new RigidBody("body", ReferenceFrame.getWorldFrame());
 Vector3D jointOffset = RandomGeometry.nextVector3D(random, 5.0);
 Vector3D jointAxis = RandomGeometry.nextVector3D(random, 5.0);
 PrismaticJoint joint = new PrismaticJoint(jointName, parentBody, jointOffset, jointAxis);
 assertEquals("Should be equal", jointName, joint.getName());
 assertTrue(parentBody.equals(joint.getPredecessor()));
}

代码示例来源:origin: us.ihmc/ihmc-graphics-description

public void changeFrame(PixelsReferenceFrame pixelsReferenceFrame)
  {
   if (getReferenceFrame() instanceof MetersReferenceFrame)
   {
     changeFrameAndProjectToXYPlane(ReferenceFrame.getWorldFrame());
     scale(pixelsReferenceFrame.getConversionToPixels().getX(), pixelsReferenceFrame.getConversionToPixels().getY());
   }
   
   super.changeFrameAndProjectToXYPlane(pixelsReferenceFrame);
  }
}

代码示例来源:origin: us.ihmc/ihmc-avatar-interfaces-test

private Footstep generateFootstep(FramePose2D footPose2d, RigidBodyBasics foot, ReferenceFrame soleFrame, RobotSide robotSide, double height, Vector3D planeNormal)
{
 double yaw = footPose2d.getYaw();
 Point3D position = new Point3D(footPose2d.getX(), footPose2d.getY(), height);
 Quaternion orientation = new Quaternion();
 RotationTools.computeQuaternionFromYawAndZNormal(yaw, planeNormal, orientation);
 FramePose3D footstepPose = new FramePose3D(ReferenceFrame.getWorldFrame(), position, orientation);
 Footstep footstep = new Footstep(robotSide, footstepPose);
 return footstep;
}

代码示例来源:origin: us.ihmc/ihmc-avatar-interfaces-test

@ContinuousIntegrationAnnotations.ContinuousIntegrationTest(estimatedDuration = 0.0)
@Test(timeout = timeout)
public void testShortCinderBlockFieldWithPlanarRegionBipedalPlanner()
{
 double courseLength = CINDER_BLOCK_COURSE_WIDTH_X_IN_NUMBER_OF_BLOCKS * CINDER_BLOCK_SIZE + CINDER_BLOCK_FIELD_PLATFORM_LENGTH;
 DRCStartingLocation startingLocation = () -> new OffsetAndYawRobotInitialSetup(0.0, 0.0, 0.007);
 FramePose3D goalPose = new FramePose3D(ReferenceFrame.getWorldFrame(), new Pose3D(courseLength, 0.0, 0.0, 0.0, 0.0, 0.0));
 setupSimulation(cinderBlockField, startingLocation);
 drcSimulationTestHelper.createSimulation("FootstepPlannerEndToEndTest");
 runEndToEndTestAndKeepSCSUpIfRequested(FootstepPlannerType.PLANAR_REGION_BIPEDAL, cinderBlockField, goalPose);
}

相关文章