Tabnine Logo
Footstep.getSoleReferenceFrame
Code IndexAdd Tabnine to your IDE (free)

How to use
getSoleReferenceFrame
method
in
us.ihmc.humanoidRobotics.footstep.Footstep

Best Java code snippets using us.ihmc.humanoidRobotics.footstep.Footstep.getSoleReferenceFrame (Showing top 20 results out of 315)

origin: us.ihmc/CommonWalkingControlModules

private void computeFootstepCentroid(FramePoint2d centroidToPack, Footstep footstep)
{
 predictedSupportPolygon.clear(footstep.getSoleReferenceFrame());
 addPredictedContactPointsToPolygon(footstep, predictedSupportPolygon);
 predictedSupportPolygon.update();
 predictedSupportPolygon.getCentroid(centroidToPack);
}
origin: us.ihmc/ihmc-humanoid-robotics-test

private FrameVector3D getTranslationVector(Footstep stance, double circleCenterOffset)
{
 RobotSide stanceSide = stance.getRobotSide();
 double yCenterDisplacementTowardsExpectedOtherFoot = (stanceSide == RobotSide.LEFT) ? -circleCenterOffset : circleCenterOffset;
 FrameVector3D translationFromFootCenterToCircleCenter = new FrameVector3D(stance.getSoleReferenceFrame(), 0.0, yCenterDisplacementTowardsExpectedOtherFoot,
    0.0);
 translationFromFootCenterToCircleCenter.changeFrame(ReferenceFrame.getWorldFrame());
 return translationFromFootCenterToCircleCenter;
}
origin: us.ihmc/IHMCHumanoidRobotics

  public static List<FramePoint> calculateExpectedContactPoints(Footstep atFootstep, ContactablePlaneBody foot)
  {
   if (!atFootstep.getBody().getName().equals(foot.getRigidBody().getName()))
     throw new RuntimeException("The RigidBodies are not the same.");
   
   List<FramePoint> ret = foot.getContactPointsCopy();
   
   ReferenceFrame soleFrame = atFootstep.getSoleReferenceFrame();
   
   for (int i = 0; i < ret.size(); i++)
   {
     FramePoint contactPoint = ret.get(i);
     contactPoint.checkReferenceFrameMatch(foot.getSoleFrame());
     contactPoint.setIncludingFrame(soleFrame, contactPoint.getPoint());
   }

   return ret;
  }
}
origin: us.ihmc/CommonWalkingControlModules

private void addPredictedContactPointsToPolygon(Footstep footstep, FrameConvexPolygon2d convexPolygonToExtend)
{
 List<Point2d> predictedContactPoints = footstep.getPredictedContactPoints();
 if (predictedContactPoints != null && !predictedContactPoints.isEmpty())
 {
   int numberOfContactPoints = predictedContactPoints.size();
   for (int i = 0; i < numberOfContactPoints; i++)
   {
    tempFramePoint.setXYIncludingFrame(footstep.getSoleReferenceFrame(), predictedContactPoints.get(i));
    convexPolygonToExtend.addVertexByProjectionOntoXYPlane(tempFramePoint);
   }
 }
 else
 {
   ConvexPolygon2d defaultPolygon = defaultFootPolygons.get(footstep.getRobotSide());
   for (int i = 0; i < defaultPolygon.getNumberOfVertices(); i++)
   {
    tempFramePoint.setXYIncludingFrame(footstep.getSoleReferenceFrame(), defaultPolygon.getVertex(i));
    convexPolygonToExtend.addVertexByProjectionOntoXYPlane(tempFramePoint);
   }
 }
}
origin: us.ihmc/CommonWalkingControlModules

public void extractFootstepSolutions(ArrayList<YoFramePoint2d> footstepSolutionsToPack, ArrayList<YoFramePoint2d> referenceFootstepLocations,
   ArrayList<Footstep> upcomingFootsteps, int numberOfFootstepsToConsider,
   ICPOptimizationSolver solver)
{
 boolean firstStepAdjusted = false;
 for (int i = 0; i < numberOfFootstepsToConsider; i++)
 {
   solver.getFootstepSolutionLocation(i, locationSolution);
   upcomingFootsteps.get(i).getPosition2d(upcomingFootstepLocation);
   ReferenceFrame deadbandFrame = upcomingFootsteps.get(i).getSoleReferenceFrame();
   boolean footstepWasAdjusted = applyLocationDeadband(locationSolution, upcomingFootstepLocation, referenceFootstepLocations.get(i).getFrameTuple2d(), deadbandFrame,
      footstepDeadband.getDoubleValue(), footstepSolutionResolution.getDoubleValue());
   if (i == 0)
    firstStepAdjusted = footstepWasAdjusted;
   footstepSolutionsToPack.get(i).set(locationSolution);
 }
 this.footstepWasAdjusted.set(firstStepAdjusted);
}
origin: us.ihmc/ihmc-humanoid-robotics

public static FramePoint3D getCenterOfFootstep(Footstep stance, RobotSide side, double centimetersForwardFromCenter, double centimetersInFromCenter)
{
 FramePoint3D stanceCenter = new FramePoint3D(stance.getSoleReferenceFrame());
 stanceCenter.getReferenceFrame().checkReferenceFrameMatch(stance.getSoleReferenceFrame());
 stanceCenter.setX(stanceCenter.getX() + centimetersForwardFromCenter);
 stanceCenter.setY(stanceCenter.getY() + side.negateIfLeftSide(centimetersInFromCenter));
 stanceCenter.changeFrame(worldFrame);
 return stanceCenter;
}
origin: us.ihmc/IHMCHumanoidRobotics

public static FramePoint getCenterOfFootstep(Footstep stance, RobotSide side, double centimetersForwardFromCenter, double centimetersInFromCenter)
{
 FramePoint stanceCenter = new FramePoint(stance.getSoleReferenceFrame());
 stanceCenter.getReferenceFrame().checkReferenceFrameMatch(stance.getSoleReferenceFrame());
 stanceCenter.setX(stanceCenter.getX() + centimetersForwardFromCenter);
 stanceCenter.setY(stanceCenter.getY() + side.negateIfLeftSide(centimetersInFromCenter));
 stanceCenter.changeFrame(worldFrame);
 return stanceCenter;
}
origin: us.ihmc/ihmc-simulation-toolkit-test

private void assertLastTwoStepsCenterAroundEndPoint(String testDescription, ArrayList<Footstep> footsteps, Point2D endWorldPoint)
{
 int numSteps = footsteps.size();
 Footstep lastStep = footsteps.get(numSteps - 1);
 Footstep nextLastStep = footsteps.get(numSteps - 2);
 Vector3D lastStepPosition = new Vector3D();
 Vector3D nextLastStepPosition = new Vector3D();
 Vector3D positionInFrame = new Vector3D();
 lastStep.getSoleReferenceFrame().getTransformToWorldFrame().getTranslation(lastStepPosition);
 nextLastStep.getSoleReferenceFrame().getTransformToWorldFrame().getTranslation(nextLastStepPosition);
 positionInFrame.interpolate(nextLastStepPosition, lastStepPosition, 0.5);
 Point2D positionInFrame2d = new Point2D(positionInFrame.getX(), positionInFrame.getY());
 double endPositionOffset = endWorldPoint.distance(positionInFrame2d);
 assertEquals(testDescription + " footsteps must end near desired end", 0.0, endWorldPoint.distance(positionInFrame2d), endPositionTolerance);
}
origin: us.ihmc/CommonWalkingControlModules

private void computeEntryCMPForFootstep(FramePoint entryCMPToPack, Footstep footstep, FramePoint2d centroidInSoleFrameOfPreviousSupportFoot,
   YoFramePoint previousExitCMP)
{
 ReferenceFrame soleFrame = footstep.getSoleReferenceFrame();
 List<Point2d> predictedContactPoints = footstep.getPredictedContactPoints();
 RobotSide robotSide = footstep.getRobotSide();
 if (predictedContactPoints != null)
   tempSupportPolygon.setIncludingFrameAndUpdate(soleFrame, predictedContactPoints);
 else
   tempSupportPolygon.setIncludingFrameAndUpdate(soleFrame, defaultFootPolygons.get(robotSide));
 computeEntryCMP(entryCMPToPack, robotSide, soleFrame, tempSupportPolygon, centroidInSoleFrameOfPreviousSupportFoot, previousExitCMP);
}
origin: us.ihmc/ihmc-humanoid-robotics

ReferenceFrame soleReferenceFrame = footstep.getSoleReferenceFrame();
double increaseZSlightlyToSeeBetter = 0.001;
FramePose3D soleFramePose = new FramePose3D(soleReferenceFrame, new Point3D(0.0, 0.0, increaseZSlightlyToSeeBetter), new AxisAngle());
origin: us.ihmc/CommonWalkingControlModules

public void setNextFootstep(Footstep nextFootstep)
{
 isUsingNextFootstep.set(nextFootstep != null);
 if (isUsingNextFootstep.getBooleanValue())
 {
   ReferenceFrame footstepSoleFrame = nextFootstep.getSoleReferenceFrame();
   ConvexPolygon2d footPolygon = footPolygons.get(nextFootstep.getRobotSide()).getConvexPolygon2d();
   nextFootstepPolygon.setIncludingFrameAndUpdate(footstepSoleFrame, footPolygon);
   nextFootstepPolygon.changeFrameAndProjectToXYPlane(worldFrame);
 }
}
origin: us.ihmc/CommonWalkingControlModules

if (isUpcomingFootstepLast)
 predictedSupportPolygon.clear(currentFootstep.getSoleReferenceFrame());
 addPredictedContactPointsToPolygon(currentFootstep, predictedSupportPolygon);
 predictedSupportPolygon.update();
origin: us.ihmc/IHMCHumanoidRobotics

ReferenceFrame soleReferenceFrame = footstep.getSoleReferenceFrame();
double increaseZSlightlyToSeeBetter = 0.001;
FramePose soleFramePose = new FramePose(soleReferenceFrame, new Point3d(0.0, 0.0, increaseZSlightlyToSeeBetter), new AxisAngle4d());
origin: us.ihmc/CommonWalkingControlModules

predictedSupportPolygon.clear(upcomingFootsteps.get(0).getSoleReferenceFrame());
addPredictedContactPointsToPolygon(upcomingFootsteps.get(0), predictedSupportPolygon);
predictedSupportPolygon.update();
origin: us.ihmc/CommonWalkingControlModules

/**
* This function takes a footstep and calculates the touch-down polygon in the
* desired reference frame
*/
private void calculateTouchdownFootPolygon(Footstep footstep, ReferenceFrame desiredFrame, FrameConvexPolygon2d polygonToPack)
{
 footstep.getPositionIncludingFrame(centroid3d);
 centroid3d.getFramePoint2d(centroid2d);
 centroid2d.changeFrame(desiredFrame);
 polygonToPack.setIncludingFrameAndUpdate(footstep.getSoleReferenceFrame(), defaultSupportPolygons.get(footstep.getRobotSide()));
 polygonToPack.changeFrameAndProjectToXYPlane(desiredFrame);
 // shrink the polygon for safety by pulling all the corner points towards the center
 polygonToPack.scale(centroid2d, SHRINK_TOUCHDOWN_POLYGON_FACTOR);
}
origin: us.ihmc/CommonWalkingControlModules

private void computeExitCMPForFootstep(FramePoint exitCMPToPack, Footstep footstep, FramePoint2d centroidInSoleFrameOfUpcomingSupportFoot,
   boolean isUpcomingFootstepLast)
{
 if (useTwoCMPsPerSupport)
 {
   ReferenceFrame soleFrame = footstep.getSoleReferenceFrame();
   List<Point2d> predictedContactPoints = footstep.getPredictedContactPoints();
   RobotSide robotSide = footstep.getRobotSide();
   if (predictedContactPoints != null)
    tempSupportPolygon.setIncludingFrameAndUpdate(soleFrame, predictedContactPoints);
   else
    tempSupportPolygon.setIncludingFrameAndUpdate(soleFrame, defaultFootPolygons.get(robotSide));
   computeExitCMP(exitCMPToPack, robotSide, soleFrame, tempSupportPolygon, centroidInSoleFrameOfUpcomingSupportFoot, isUpcomingFootstepLast);
 }
 else
 {
   exitCMPToPack.setToNaN(worldFrame);
 }
}
origin: us.ihmc/IHMCSimulationToolkit

public void visualizeFootstep(ContactablePlaneBody bipedFoot, Footstep footstep)
{
 bagOfSingleFootstepVisualizers.visualizeFootstep(footstep, bipedFoot);
 nullRobot.setTime(nullRobot.getTime() + scs.getDT());
 FramePoint solePositon = new FramePoint(footstep.getSoleReferenceFrame());
 solePositon.changeFrame(worldFrame);
 updateFocus(solePositon);
 scs.setCameraFix(focusX, focusY, 0.0);
 scs.setCameraPosition(focusX, focusY - 1.5, 6.0);
 scs.tickAndUpdate();
}
origin: us.ihmc/ihmc-simulation-toolkit

public void visualizeFootstep(ContactablePlaneBody bipedFoot, Footstep footstep)
{
 bagOfSingleFootstepVisualizers.visualizeFootstep(footstep, bipedFoot);
 nullRobot.setTime(nullRobot.getTime() + scs.getDT());
 FramePoint3D solePositon = new FramePoint3D(footstep.getSoleReferenceFrame());
 solePositon.changeFrame(worldFrame);
 updateFocus(solePositon);
 scs.setCameraFix(focusX, focusY, 0.0);
 scs.setCameraPosition(focusX, focusY - 1.5, 6.0);
 scs.tickAndUpdate();
}
origin: us.ihmc/IHMCHumanoidRobotics

public static FramePoint getCenterOfPredictedContactPointsInFootstep(Footstep footstep, RobotSide side, double centimetersForwardFromCenter, double centimetersInFromCenter)
{
 Point2d footstepCenter;
 
 List<Point2d> predictedContactPoints = footstep.getPredictedContactPoints();
 if (predictedContactPoints != null)
 {
   ConvexPolygon2d contactPolygon = new ConvexPolygon2d(predictedContactPoints);
   footstepCenter = contactPolygon.getCentroid();
 }
 else
 {
   footstepCenter = new Point2d();
 }
 
 footstepCenter.setX(footstepCenter.getX() + centimetersForwardFromCenter);
 footstepCenter.setY(footstepCenter.getY() + side.negateIfLeftSide(centimetersInFromCenter));
 
 FramePoint footstepCenter3d = new FramePoint(footstep.getSoleReferenceFrame(), footstepCenter.getX(), footstepCenter.getY(), 0.0);
 footstepCenter3d.changeFrame(worldFrame);
 return footstepCenter3d;
}
origin: us.ihmc/ihmc-humanoid-robotics

public static FramePoint3D getCenterOfPredictedContactPointsInFootstep(Footstep footstep, RobotSide side, double centimetersForwardFromCenter, double centimetersInFromCenter)
{
 Point2D footstepCenter;
 List<Point2D> predictedContactPoints = footstep.getPredictedContactPoints();
 if (predictedContactPoints != null)
 {
   ConvexPolygon2D contactPolygon = new ConvexPolygon2D(Vertex2DSupplier.asVertex2DSupplier(predictedContactPoints));
   footstepCenter = new Point2D(contactPolygon.getCentroid());
 }
 else
 {
   footstepCenter = new Point2D();
 }
 footstepCenter.setX(footstepCenter.getX() + centimetersForwardFromCenter);
 footstepCenter.setY(footstepCenter.getY() + side.negateIfLeftSide(centimetersInFromCenter));
 FramePoint3D footstepCenter3d = new FramePoint3D(footstep.getSoleReferenceFrame(), footstepCenter.getX(), footstepCenter.getY(), 0.0);
 footstepCenter3d.changeFrame(worldFrame);
 return footstepCenter3d;
}
us.ihmc.humanoidRobotics.footstepFootstepgetSoleReferenceFrame

Popular methods of Footstep

  • getRobotSide
  • <init>
  • getPose
  • getPredictedContactPoints
  • getZ
  • getPosition
  • getSolePose
  • setSwingHeight
  • setTrajectoryType
  • setZ
  • getFootstepPose
  • getFootstepType
  • getFootstepPose,
  • getFootstepType,
  • getSwingHeight,
  • getTrajectoryType,
  • setPose,
  • getBody,
  • getCustomPositionWaypoints,
  • getOrientation,
  • getOrientationInWorldFrame

Popular in Java

  • Reactive rest calls using spring rest template
  • getSupportFragmentManager (FragmentActivity)
  • scheduleAtFixedRate (Timer)
  • getResourceAsStream (ClassLoader)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now