gpt4 book ai didi

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

转载 作者:知者 更新时间:2024-03-15 06:46:49 25 4
gpt4 key购买 nike

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

YoFrameConvexPolygon2d.setFrameConvexPolygon2d介绍

暂无

代码示例

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

public void updateConvexPolygon2d(FrameConvexPolygon2d frameConvexPolygon2d)
{
 yoFrameConvexPolygon2d.setFrameConvexPolygon2d(frameConvexPolygon2d);
 update();
}

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

public void setCMPProjectionArea(FrameConvexPolygon2d areaToProjectInto, FrameConvexPolygon2d safeArea)
{
 this.areaToProjectInto.setIncludingFrameAndUpdate(areaToProjectInto);
 this.safeArea.setIncludingFrameAndUpdate(safeArea);
 yoSafeAreaPolygon.setFrameConvexPolygon2d(safeArea);
 yoProjectionPolygon.setFrameConvexPolygon2d(areaToProjectInto);
}

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

private void visualize()
{
 supportPolygonViz.setFrameConvexPolygon2d(supportPolygonInWorld);
 for (RobotSide robotSide : RobotSide.values)
 {
   YoFrameConvexPolygon2d footPolygonViz = footPolygonsViz.get(robotSide);
   FrameConvexPolygon2d footPolygon = footPolygonsInWorldFrame.get(robotSide);
   if (footPolygon.isEmpty())
    footPolygonViz.hide();
   else
    footPolygonViz.setFrameConvexPolygon2d(footPolygon);
 }
}

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

public void update()
  {
   nextFootstepPolygon.setIncludingFrameAndUpdate(footstepAdjustor.getTouchdownFootPolygon());
   nextFootstepPolygon.changeFrameAndProjectToXYPlane(worldFrame);

   try
   {
     yoNextFootstepPolygon.setFrameConvexPolygon2d(nextFootstepPolygon);
   }
   catch (Exception e)
   {
     e.printStackTrace();
   }
  }
}

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

public void update()
  {
   captureRegionPolygon.setIncludingFrameAndUpdate(captureRegionCalculator.getCaptureRegion());
   captureRegionPolygon.changeFrameAndProjectToXYPlane(worldFrame);

   if (yoCaptureRegionPolygon != null)
   {
     try
     {
      yoCaptureRegionPolygon.setFrameConvexPolygon2d(captureRegionPolygon);
     }
     catch (Exception e)
     {
      System.out.println(e);
     }
   }
  }
}

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

public void getCMPProjectionArea(FrameConvexPolygon2d areaToProjectInto, FrameConvexPolygon2d safeArea)
{
 if (usingUpperBodyMomentum.getBooleanValue())
 {
   polygonShrinker.shrinkConstantDistanceInto(supportPolygon, -maxDistanceCMPSupport.getDoubleValue(), extendedSupportPolygon);
   areaToProjectInto.setIncludingFrameAndUpdate(extendedSupportPolygon);
   safeCMPArea.changeFrameAndProjectToXYPlane(worldFrame);
   safeArea.setIncludingFrameAndUpdate(safeCMPArea);
 }
 else
 {
   areaToProjectInto.setIncludingFrameAndUpdate(supportPolygon);
   safeArea.clearAndUpdate(worldFrame);
 }
 if (yoSafeCMPArea != null)
   yoSafeCMPArea.setFrameConvexPolygon2d(safeArea);
 if (yoProjectionArea != null)
   yoProjectionArea.setFrameConvexPolygon2d(areaToProjectInto);
}

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

private void doNothing()
{
 footholdState.set(PartialFootholdState.FULL);
 yoUnsafePolygon.hide();
 shrunkFootPolygonInWorld.setIncludingFrame(shrunkFootPolygon);
 shrunkFootPolygonInWorld.changeFrameAndProjectToXYPlane(worldFrame);
 yoShrunkFootPolygon.setFrameConvexPolygon2d(shrunkFootPolygonInWorld);
 unsafeArea.set(0.0);
}

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

if (footSupportPolygon != null)
 yoFootSupportPolygons.get(robotSide).setFrameConvexPolygon2d(footSupportPolygon);
 footSupportPolygons.put(robotSide, footSupportPolygon);
yoSupportPolygon.setFrameConvexPolygon2d(footSupportPolygons.get(supportLeg));
yoSupportPolygon.setFrameConvexPolygon2d(footSupportPolygons.get(supportLeg));
yoSupportPolygon.setFrameConvexPolygon2d(supportPolygon);

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

private void computeShrunkFoothold(FramePoint2d desiredCenterOfPressure)
{
 boolean wasCoPInThatRegion = false;
 if (useCoPOccupancyGrid.getBooleanValue()) {
   numberOfCellsOccupiedOnSideOfLine.set(footCoPOccupancyGrid.computeNumberOfCellsOccupiedOnSideOfLine(lineOfRotation, RobotSide.RIGHT,
      distanceFromLineOfRotationToComputeCoPOccupancy.getDoubleValue()));
   wasCoPInThatRegion = numberOfCellsOccupiedOnSideOfLine.getIntegerValue() >= thresholdForCoPRegionOccupancy.getIntegerValue();
 }
 unsafeArea.set(unsafePolygon.getArea());
 boolean areaBigEnough = unsafeArea.getDoubleValue() >= minAreaToConsider.getDoubleValue();
 unsafeAreaAboveThreshold.set(areaBigEnough);
 boolean desiredCopInPolygon = unsafePolygon.isPointInside(desiredCenterOfPressure, 0.0e-3);
 if (desiredCopInPolygon && !wasCoPInThatRegion && areaBigEnough)
 {
   backupFootPolygon.set(shrunkFootPolygon);
   ConvexPolygonTools.cutPolygonWithLine(lineOfRotation, shrunkFootPolygon, RobotSide.RIGHT);
   unsafePolygon.changeFrameAndProjectToXYPlane(worldFrame);
   yoUnsafePolygon.setFrameConvexPolygon2d(unsafePolygon);
   shrunkFootPolygonInWorld.setIncludingFrame(shrunkFootPolygon);
   shrunkFootPolygonInWorld.changeFrameAndProjectToXYPlane(worldFrame);
   yoShrunkFootPolygon.setFrameConvexPolygon2d(shrunkFootPolygonInWorld);
 }
 else
 {
   doNothing();
 }
}

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

if (cmpWasProjected.getBooleanValue())
  yoProjectionArea.setFrameConvexPolygon2d(this.projectionArea);
  yoDesiredCMP.set(this.desiredCMP);
  yoProjectedCMP.set(projectedCMP);
  yoProjectionArea.setFrameConvexPolygon2d(null);
  yoDesiredCMP.setToNaN();
  yoProjectedCMP.setToNaN();

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

yoSafeArea.setFrameConvexPolygon2d(safeArea);
if (yoCapturePoint != null)
  yoCapturePoint.set(capturePoint2d);

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

fullSupportAfterShrinking.update();
momentumBasedController.getCapturePoint(capturePoint);
yoFullSupportAfterShrinking.setFrameConvexPolygon2d(fullSupportAfterShrinking);

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