us.ihmc.robotics.robotSide.RobotSide.getCamelCaseNameForStartOfExpression()方法的使用及代码示例

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

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

RobotSide.getCamelCaseNameForStartOfExpression介绍

暂无

代码示例

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

public String getCamelCaseName()
{
 return getCamelCaseNameForStartOfExpression();
}

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

private static String getRobotSidePrefix(RobotSide robotSide)
{
 return robotSide.getCamelCaseNameForStartOfExpression();// "Left" or "Right"
}

代码示例来源:origin: us.ihmc/robotiq-hand-drivers

@Override
public String getName()
{
 return robotSide.getCamelCaseNameForStartOfExpression() + getClass().getSimpleName();
}

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

@Override
public String getName()
{
 return robotSide.getCamelCaseNameForStartOfExpression() + getClass().getSimpleName();
}

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

@Override
public String getName()
{
 return robotSide.getCamelCaseNameForStartOfExpression() + getClass().getSimpleName();
}

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

@Override
public String toString()
{
 return robotSide.getCamelCaseNameForStartOfExpression() + " " + controlStatus.toString();
}

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

private String removeSidePrefixFromName(String name)
{
 for (RobotSide robotSide : RobotSide.values)
 {
   name = name.replace(robotSide.getCamelCaseNameForMiddleOfExpression(), "");
   name = name.replace(robotSide.getCamelCaseNameForStartOfExpression(), "");
 }
 return name;
}

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

private static Pose3D findNextFootstepPose(SimulationConstructionSet scs)
{
 String sidePrefix = findUpcomingFootstepSide(0, scs).getCamelCaseNameForStartOfExpression();
 String namePrefix = sidePrefix + "Footstep0Pose";
 return new Pose3D(findYoFramePose(FootstepListVisualizer.class.getSimpleName(), namePrefix, scs));
}

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

public RosCapturabilityBasedStatusPublisher(RosMainNode rosMainNode, String rosNameSpace)
{
 this.rosMainNode = rosMainNode;
 for (RobotSide value : RobotSide.values)
 {
   RosSupportPolygonPublisher rosSupportPolygonPublisher = new RosSupportPolygonPublisher(false);
   supportPolygonPublishers.put(value, rosSupportPolygonPublisher);
   this.rosMainNode
      .attachPublisher(rosNameSpace + "/output/capturability/" + value.getCamelCaseNameForStartOfExpression() + "_foot_support_polygon", rosSupportPolygonPublisher);
 }
 this.rosMainNode.attachPublisher(rosNameSpace + "/output/capturability/capture_point", capturePointPublisher);
 this.rosMainNode.attachPublisher(rosNameSpace + "/output/capturability/desired_capture_point", desiredCapturePointPublisher);
 this.rosMainNode.attachPublisher(rosNameSpace + "/output/capturability/center_of_mass", centerOfMassPublisher);
 this.rosMainNode.attachPublisher(rosNameSpace + "/output/capturability/is_in_double_support", isInDoubleSupportPublisher);
 new Thread(this, getClass().getName()).start();
}

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

public RosCapturabilityBasedStatusPublisher(RosMainNode rosMainNode, String rosNameSpace)
{
 this.rosMainNode = rosMainNode;
 for (RobotSide value : RobotSide.values)
 {
   RosSupportPolygonPublisher rosSupportPolygonPublisher = new RosSupportPolygonPublisher(false);
   supportPolygonPublishers.put(value, rosSupportPolygonPublisher);
   this.rosMainNode
      .attachPublisher(rosNameSpace + "/output/capturability/" + value.getCamelCaseNameForStartOfExpression() + "_foot_support_polygon", rosSupportPolygonPublisher);
 }
 this.rosMainNode.attachPublisher(rosNameSpace + "/output/capturability/capture_point", capturePointPublisher);
 this.rosMainNode.attachPublisher(rosNameSpace + "/output/capturability/desired_capture_point", desiredCapturePointPublisher);
 this.rosMainNode.attachPublisher(rosNameSpace + "/output/capturability/center_of_mass", centerOfMassPublisher);
 this.rosMainNode.attachPublisher(rosNameSpace + "/output/capturability/is_in_double_support", isInDoubleSupportPublisher);
 new Thread(this, getClass().getName()).start();
}

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

public RosCapturabilityBasedStatusPublisher(RosMainNode rosMainNode, String rosNameSpace)
{
 this.rosMainNode = rosMainNode;
 for (RobotSide value : RobotSide.values)
 {
   RosSupportPolygonPublisher rosSupportPolygonPublisher = new RosSupportPolygonPublisher(false);
   supportPolygonPublishers.put(value, rosSupportPolygonPublisher);
   this.rosMainNode
      .attachPublisher(rosNameSpace + "/output/capturability/" + value.getCamelCaseNameForStartOfExpression() + "_foot_support_polygon", rosSupportPolygonPublisher);
 }
 this.rosMainNode.attachPublisher(rosNameSpace + "/output/capturability/capture_point", capturePointPublisher);
 this.rosMainNode.attachPublisher(rosNameSpace + "/output/capturability/desired_capture_point", desiredCapturePointPublisher);
 this.rosMainNode.attachPublisher(rosNameSpace + "/output/capturability/center_of_mass", centerOfMassPublisher);
 this.rosMainNode.attachPublisher(rosNameSpace + "/output/capturability/is_in_double_support", isInDoubleSupportPublisher);
 new Thread(this, getClass().getName()).start();
}

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

private void printFootSensorsOffset()
{
 java.text.NumberFormat doubleFormat = new java.text.DecimalFormat(" 0.00;-0.00");
 String offsetString = "";
 DateFormat dateFormat = new SimpleDateFormat("yyyyMMdd_HHmmss");
 Calendar calendar = Calendar.getInstance();
 String timestamp = dateFormat.format(calendar.getTime());
 offsetString += "Copy the following in ValkyrieSensorInformation:\n";
 for (RobotSide robotSide : RobotSide.values)
 {
   String side = robotSide.getCamelCaseNameForStartOfExpression();
   offsetString += "      SpatialForceVector " + side + "FootForceSensorTareOffset_" + timestamp + " = new SpatialForceVector(null, new double[] {";
   offsetString += doubleFormat.format(footTorquesRawFiltered.get(robotSide).getX()) + ", ";
   offsetString += doubleFormat.format(footTorquesRawFiltered.get(robotSide).getY()) + ", ";
   offsetString += doubleFormat.format(footTorquesRawFiltered.get(robotSide).getZ()) + ", ";
   offsetString += doubleFormat.format(footForcesRawFiltered.get(robotSide).getX()) + ", ";
   offsetString += doubleFormat.format(footForcesRawFiltered.get(robotSide).getY()) + ", ";
   offsetString += doubleFormat.format(footForcesRawFiltered.get(robotSide).getZ()) + "});\n";
 }
 offsetString += "\n      footForceSensorTareOffsets = new SideDependentList<SpatialForceVector>(leftFootForceSensorTareOffset_" + timestamp
    + ", rightFootForceSensorTareOffset_" + timestamp + ");";
 System.out.println(offsetString);
}

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

public FootstepListVisualizer(SideDependentList<? extends ContactablePlaneBody> contactableFeet, YoGraphicsListRegistry yoGraphicsListRegistry,
   YoVariableRegistry parentRegistry)
{
 String graphicListName = "FootstepVisualizer";
 for (RobotSide robotSide : RobotSide.values)
 {
   ContactablePlaneBody contactableFoot = contactableFeet.get(robotSide);
   footstepVisualizers.put(robotSide, new ArrayList<FootstepVisualizer>());
   for (int i = 0; i < maxNumberOfFootstepsToVisualizePerSide; i++)
   {
    String name = robotSide.getCamelCaseNameForStartOfExpression() + "Footstep" + i;
    AppearanceDefinition footstepColor = new YoAppearanceRGBColor(defaultFeetColors.get(robotSide).darker(), 0.0);
    FootstepVisualizer footstepVisualizer = new FootstepVisualizer(name, graphicListName, robotSide, contactableFoot, footstepColor, yoGraphicsListRegistry, registry);
    footstepVisualizers.get(robotSide).add(footstepVisualizer);
   }
 }
 parentRegistry.addChild(registry);
}

代码示例来源:origin: us.ihmc/ihmc-common-walking-control-modules-test

private SideDependentList<FootSpoof> setupContactableFeet(double footLength, double footWidth, double totalWidth)
{
 SideDependentList<FootSpoof> contactableFeet = new SideDependentList<>();
 for (RobotSide robotSide : RobotSide.values)
 {
   String sidePrefix = robotSide.getCamelCaseNameForStartOfExpression();
   double xToAnkle = 0.0;
   double yToAnkle = 0.0;
   double zToAnkle = 0.084;
   List<Point2D> contactPointsInSoleFrame = new ArrayList<>();
   contactPointsInSoleFrame.add(new Point2D(footLength / 2.0, footWidth / 2.0));
   contactPointsInSoleFrame.add(new Point2D(footLength / 2.0, -footWidth / 2.0));
   contactPointsInSoleFrame.add(new Point2D(-footLength / 2.0, -footWidth / 2.0));
   contactPointsInSoleFrame.add(new Point2D(-footLength / 2.0, footWidth / 2.0));
   FootSpoof contactableFoot = new FootSpoof(sidePrefix + "Foot", xToAnkle, yToAnkle, zToAnkle, contactPointsInSoleFrame, 0.0);
   FramePose3D startingPose = footPosesAtTouchdown.get(robotSide);
   startingPose.setToZero(worldFrame);
   startingPose.setY(robotSide.negateIfRightSide(0.5 * (totalWidth - footWidth)));
   contactableFoot.setSoleFrame(startingPose);
   contactableFeet.put(robotSide, contactableFoot);
 }
 return contactableFeet;
}

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

private void findWalkingStateVariables(SimulationConstructionSet scs, SideDependentList<StateTransitionCondition> singleSupportStartConditions,
   SideDependentList<StateTransitionCondition> doubleSupportStartConditions)
{
 for (RobotSide robotSide : RobotSide.values)
 {
   String sidePrefix = robotSide.getCamelCaseNameForStartOfExpression();
   String footPrefix = sidePrefix + "Foot";
   @SuppressWarnings("unchecked")
   final YoEnum<ConstraintType> footConstraintType = (YoEnum<ConstraintType>) scs.getVariable(sidePrefix + "FootControlModule",
      footPrefix + "CurrentState");
   @SuppressWarnings("unchecked")
   final YoEnum<WalkingStateEnum> walkingState = (YoEnum<WalkingStateEnum>) scs.getVariable("WalkingHighLevelHumanoidController",
      "walkingCurrentState");
   singleSupportStartConditions.put(robotSide, new SingleSupportStartCondition(footConstraintType));
   doubleSupportStartConditions.put(robotSide, new DoubleSupportStartCondition(walkingState, robotSide));
 }
}

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

public SideDependentList<ContactablePlaneBody> createHandContactableBodies(RigidBody rootBody)
{
 if (namesOfJointsBeforeHands == null)
   return null;
 InverseDynamicsJoint[] allJoints = ScrewTools.computeSupportAndSubtreeJoints(rootBody);
 SideDependentList<ContactablePlaneBody> handContactableBodies = new SideDependentList<>();
 for (RobotSide robotSide : RobotSide.values)
 {
   InverseDynamicsJoint[] jointBeforeHandArray = ScrewTools.findJointsWithNames(allJoints, namesOfJointsBeforeHands.get(robotSide));
   if (jointBeforeHandArray.length != 1)
    throw new RuntimeException("Incorrect number of joints before hand found: " + jointBeforeHandArray.length);
   RigidBody hand = jointBeforeHandArray[0].getSuccessor();
   String name = robotSide.getCamelCaseNameForStartOfExpression() + "HandContact";
   ListOfPointsContactablePlaneBody handContactableBody = createListOfPointsContactablePlaneBody(name, hand, handContactPointTransforms.get(robotSide),
      handContactPoints.get(robotSide));
   handContactableBodies.put(robotSide, handContactableBody);
 }
 return handContactableBodies;
}

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

public SlipOnNextStepPerturber(HumanoidFloatingRootJointRobot robot, RobotSide robotSide)
{
 super(robotSide.getCamelCaseNameForStartOfExpression() + "SlipOnEachStepPerturber");
 String sideString = robotSide.getCamelCaseNameForStartOfExpression();
 this.robot = robot;
 this.touchdownTimeForSlip = new YoDouble(sideString + "TouchdownTimeForSlip", registry);
 this.slipAfterTimeDelta = new YoDouble(sideString + "SlipAfterTimeDelta", registry);
 this.slipNextStep = new YoBoolean(sideString + "SlipNextStep", registry);
 amountToSlipNextStep = new YoFrameVector3D(sideString + "AmountToSlipNextStep", ReferenceFrame.getWorldFrame(), registry);
 rotationToSlipNextStep = new YoFrameYawPitchRoll(sideString + "RotationToSlipNextStep", ReferenceFrame.getWorldFrame(), registry);
 slipState = new YoEnum<SlipState>(sideString + "SlipState", registry, SlipState.class);
 slipState.set(SlipState.NOT_SLIPPING);
 groundContactPoints = robot.getFootGroundContactPoints(robotSide);
 
 groundContactPointsSlipper = new GroundContactPointsSlipper(robotSide.getLowerCaseName());
 groundContactPointsSlipper.addGroundContactPoints(groundContactPoints);
 groundContactPointsSlipper.setPercentToSlipPerTick(0.05);
 this.addRobotController(groundContactPointsSlipper);
}

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

private ReferenceFrame createToeFrame(RobotSide robotSide)
{
 ContactableFoot contactableFoot = momentumBasedController.getContactableFeet().get(robotSide);
 ReferenceFrame footFrame = momentumBasedController.getReferenceFrames().getFootFrame(robotSide);
 FramePoint2d toeContactPoint2d = new FramePoint2d();
 contactableFoot.getToeOffContactPoint(toeContactPoint2d);
 FramePoint toeContactPoint = new FramePoint();
 toeContactPoint.setXYIncludingFrame(toeContactPoint2d);
 toeContactPoint.changeFrame(footFrame);
 transformFromToeToAnkle.setTranslation(toeContactPoint.getVectorCopy());
 return ReferenceFrame.constructFrameWithUnchangingTransformToParent(robotSide.getCamelCaseNameForStartOfExpression() + "ToeFrame", footFrame, transformFromToeToAnkle);
}

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

public MoveViaWaypointsState(FootControlHelper footControlHelper, VectorProvider touchdownVelocityProvider, VectorProvider touchdownAccelerationProvider, YoSE3PIDGainsInterface gains, YoVariableRegistry registry)
{
 super(ConstraintType.MOVE_VIA_WAYPOINTS, footControlHelper, gains, registry);
 String namePrefix = footControlHelper.getRobotSide().getCamelCaseNameForStartOfExpression() + "FootMoveViaWaypoints";
 footFrame = momentumBasedController.getReferenceFrames().getFootFrame(robotSide);
 positionTrajectoryGenerator = new MultipleWaypointsPositionTrajectoryGenerator(namePrefix, worldFrame, registry);
 orientationTrajectoryGenerator = new MultipleWaypointsOrientationTrajectoryGenerator(namePrefix, worldFrame, registry);
 isTrajectoryStopped = new BooleanYoVariable(namePrefix + "IsTrajectoryStopped", registry);
 isPerformingTouchdown = new BooleanYoVariable(namePrefix + "IsPerformingTouchdown", registry);
 positionTrajectoryForDisturbanceRecovery = new SoftTouchdownPositionTrajectoryGenerator(namePrefix + "Touchdown", worldFrame, currentDesiredFootPosition,
    touchdownVelocityProvider, touchdownAccelerationProvider, touchdownInitialTimeProvider, registry);
 lastCommandId = new LongYoVariable(namePrefix + "LastCommandId", registry);
 lastCommandId.set(Packet.INVALID_MESSAGE_ID);
 isReadyToHandleQueuedCommands = new BooleanYoVariable(namePrefix + "IsReadyToHandleQueuedFootTrajectoryCommands", registry);
 numberOfQueuedCommands = new LongYoVariable(namePrefix + "NumberOfQueuedCommands", registry);
}

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

public CapturePointUpdatable(CapturabilityBasedStatusSubscriber capturabilityBasedStatusSubsrciber, YoGraphicsListRegistry yoGraphicsListRegistry,
   YoVariableRegistry parentRegistry)
{
 this.capturabilityBasedStatusSubsrciber = capturabilityBasedStatusSubsrciber;
 YoGraphicPosition capturePointViz = new YoGraphicPosition("Capture Point", yoCapturePoint, 0.01, YoAppearance.Blue(), GraphicType.ROTATED_CROSS);
 yoGraphicsListRegistry.registerArtifact("Capturability", capturePointViz.createArtifact());
 YoGraphicPosition desiredCapturePointViz = new YoGraphicPosition("Desired Capture Point", yoDesiredCapturePoint, 0.01, YoAppearance.Yellow(), GraphicType.ROTATED_CROSS);
 yoGraphicsListRegistry.registerArtifact("Capturability", desiredCapturePointViz.createArtifact());
 YoArtifactPolygon supportPolygonViz = new YoArtifactPolygon("Combined Polygon", yoSupportPolygon, Color.pink, false);
 yoGraphicsListRegistry.registerArtifact("Capturability", supportPolygonViz);
 for (RobotSide robotSide : RobotSide.values)
 {
   String sidePrefix = robotSide.getCamelCaseNameForStartOfExpression();
   String name = sidePrefix + "FootSupportPolygon";
   YoFrameConvexPolygon2d yoFootSupportPolygon = new YoFrameConvexPolygon2d(name, "", worldFrame, 4, registry);
   yoFootSupportPolygons.put(robotSide, yoFootSupportPolygon);
   Color color = FootstepListVisualizer.defaultFeetColors.get(robotSide);
   YoArtifactPolygon footSupportPolygonViz = new YoArtifactPolygon(sidePrefix + "Foot Polygon", yoFootSupportPolygon, color, false);
   yoGraphicsListRegistry.registerArtifact("Capturability", footSupportPolygonViz);
 }
 parentRegistry.addChild(registry);
}

相关文章