public void handleGoHomeCommand(GoHomeCommand command) { if (command.getRequest(BodyPart.CHEST)) goToHomeFromCurrentDesired(command.getTrajectoryTime()); }
/** {@inheritDoc} */ @Override public void set(GoHomeCommand other) { clear(); trajectoryTime = other.trajectoryTime; executionDelayTime = other.getExecutionDelayTime(); for (HumanoidBodyPart bodyPart : HumanoidBodyPart.values) { if (bodyPart.isRobotSideNeeded()) { for (RobotSide robotSide : RobotSide.values) { if (other.getRequest(robotSide, bodyPart)) sideDependentBodyPartRequestMap.get(robotSide).get(bodyPart).setValue(true); } } else if (other.getRequest(bodyPart)) { otherBodyPartRequestMap.get(bodyPart).setValue(true); } } }
public void handleGoHomeCommand(GoHomeCommand command) { if (isEnabled.getBooleanValue() && command.getRequest(BodyPart.PELVIS)) { goToHome(); } }
/** {@inheritDoc} */ @Override public void set(GoHomeMessage message) { clear(); trajectoryTime = message.getTrajectoryTime(); BodyPart bodyPart = message.getBodyPart(); if (bodyPart.isRobotSideNeeded()) { RobotSide robotSide = message.getRobotSide(); sideDependentBodyPartRequestMap.get(robotSide).get(bodyPart).setTrue(); } else { otherBodyPartRequestMap.get(bodyPart).setTrue(); } }
/** {@inheritDoc} */ @Override public void compile(GoHomeCommand other) { trajectoryTime = other.trajectoryTime; for (BodyPart bodyPart : BodyPart.values) { if (bodyPart.isRobotSideNeeded()) { for (RobotSide robotSide : RobotSide.values) { if (other.getRequest(robotSide, bodyPart)) sideDependentBodyPartRequestMap.get(robotSide).get(bodyPart).setTrue(); } } else if (other.getRequest(bodyPart)) { otherBodyPartRequestMap.get(bodyPart).setTrue(); } } }
/** {@inheritDoc} */ @Override public void setFromMessage(GoHomeMessage message) { clear(); executionDelayTime = message.getExecutionDelayTime(); trajectoryTime = message.getTrajectoryTime(); HumanoidBodyPart bodyPart = HumanoidBodyPart.fromByte(message.getHumanoidBodyPart()); if (bodyPart.isRobotSideNeeded()) { RobotSide robotSide = RobotSide.fromByte(message.getRobotSide()); sideDependentBodyPartRequestMap.get(robotSide).get(bodyPart).setValue(true); } else { otherBodyPartRequestMap.get(bodyPart).setValue(true); } }
public void handleGoHomeCommand(GoHomeCommand command) { for (RobotSide robotSide : RobotSide.values) { if (command.getRequest(robotSide, BodyPart.ARM)) goToDefaultState(robotSide, command.getTrajectoryTime()); } }
/** * Get the request for going home for a given body part. * This method is to use for body parts that are side dependent, like a foot. * @param robotSide which side the body part belongs to. * @param bodyPart body part to check the request for. * @return true if the go home is requested, false otherwise. */ public boolean getRequest(RobotSide robotSide, BodyPart bodyPart) { if (bodyPart.isRobotSideNeeded()) return sideDependentBodyPartRequestMap.get(robotSide).get(bodyPart).booleanValue(); else return getRequest(bodyPart); }
public void handleGoHomeCommand(GoHomeCommand command) { if (command.getRequest(BodyPart.PELVIS)) goToHomeFromCurrentDesired(command.getTrajectoryTime()); }
/** * Get the request for going home for a given body part. This method is to use for body parts * that are side dependent, like a foot. * * @param robotSide which side the body part belongs to. * @param bodyPart body part to check the request for. * @return true if the go home is requested, false otherwise. */ public boolean getRequest(RobotSide robotSide, HumanoidBodyPart bodyPart) { if (bodyPart.isRobotSideNeeded()) return sideDependentBodyPartRequestMap.get(robotSide).get(bodyPart).booleanValue(); else return getRequest(bodyPart); }
public void handleGoHomeCommand(GoHomeCommand command, FrameOrientation currentDesired) { if (command.getRequest(BodyPart.CHEST)) goToHome(command.getTrajectoryTime(), currentDesired); }