/** * Sets this pose 2D to the {@code other} pose 2D. * * @param other the other pose 2D. Not modified. */ @Override public void set(Pose2D other) { Pose2DBasics.super.set(other); }
/** * Sets both position and orientation. * * @param position the tuple with the new position coordinates. Not modified. * @param orientation the orientation with the new angle value for this. Not modified. */ default void set(Tuple2DReadOnly position, Orientation2DReadOnly orientation) { setPosition(position); setOrientation(orientation); }
/** * Tests on a per-component basis if this pose is equal to {@code other} with the tolerance * {@code epsilon}. * * @param other the query. Not modified. * @param epsilon the tolerance to use. * @return {@code true} if the two poses are equal, {@code false} otherwise. */ @Override public boolean epsilonEquals(Pose2D other, double epsilon) { return Pose2DBasics.super.epsilonEquals(other, epsilon); }
/** * Rotates the position part of this pose 2D by {@code yaw} and adds {@code yaw} to the orientation * part. * <p> * If the rotation should not affect this pose's position, use {@link #appendRotation(double)}. * </p> * * @param yaw the angle about the z-axis to prepend to this pose 2D. */ default void prependRotation(double yaw) { RotationMatrixTools.applyYawRotation(yaw, getPosition(), getPosition()); getOrientation().add(yaw); }
/** * Sets the position from the given frame tuple 3D. * * @param position the tuple with the new position coordinates. Not modified. * @throws ReferenceFrameMismatchException if {@code this} and {@code position} are not expressed in * the same reference frame. */ default void setPosition(FrameTuple3DReadOnly position) { checkReferenceFrameMatch(position); Pose2DBasics.super.setPosition(position); }
/** * Sets the orientation from the given frame orientation 2D. * * @param orientation the orientation with the new angle value for this. Not modified. * @throws ReferenceFrameMismatchException if {@code this} and {@code orientation} are not expressed * in the same reference frame. */ default void setOrientation(FrameOrientation2DReadOnly orientation) { checkReferenceFrameMatch(orientation); Pose2DBasics.super.setOrientation(orientation); }
/** * Rotates, then adds the given {@code translation} to this pose 2D. * <p> * Use this method if the {@code translation} is expressed in the local coordinates described by * this pose 2D. Otherwise, use {@link #prependTranslation(FrameTuple2DReadOnly)}. * </p> * * @param translation tuple containing the translation to apply to this pose 2D. Not modified. * @throws ReferenceFrameMismatchException if {@code this} and {@code translation} are not expressed * in the same reference frame. */ default void appendTranslation(FrameTuple2DReadOnly translation) { checkReferenceFrameMatch(translation); Pose2DBasics.super.appendTranslation(translation); }
/** * Adds the given {@code orientation} to the orientation of this pose 2D. * <p> * If the position part of this pose 2D is to be rotated by the given {@code orientation}, use * {@link #prependRotation(Orientation2DReadOnly)}. * </p> * * @param orientation the orientation to append to this pose 2D. Not modified. */ default void appendRotation(Orientation2DReadOnly orientation) { appendRotation(orientation.getYaw()); }
/** * Adds the given {@code translation} to this pose 2D assuming it is expressed in the coordinates in * which this pose is expressed. * <p> * If the {@code translation} is expressed in the local coordinates described by this pose 2D, use * {@link #appendTranslation(FrameTuple2DReadOnly)}. * </p> * * @param translation tuple containing the translation to apply to this pose 2D. Not modified. * @throws ReferenceFrameMismatchException if {@code this} and {@code translation} are not expressed * in the same reference frame. */ default void prependTranslation(FrameTuple2DReadOnly translation) { checkReferenceFrameMatch(translation); Pose2DBasics.super.prependTranslation(translation); }
/** * Rotates the position part of this pose 2D by {@code orientation} and adds {@code orientation} to * the orientation part. * <p> * If the rotation should not affect this pose's position, use * {@link #appendRotation(Orientation2DReadOnly)}. * </p> * * @param orientation the orientation to prepend to this pose 2D. Not modified. */ default void prependRotation(Orientation2DReadOnly orientation) { prependRotation(orientation.getYaw()); }
/** * Sets the orientation angle value. * * @param yaw the orientation angle value. */ default void setOrientation(double yaw) { getOrientation().setYaw(yaw); }
/** * Compares {@code this} to {@code other} to determine if the two poses are geometrically similar. * <p> * Two poses are geometrically equal if both their position and orientation are geometrically equal. * </p> * * @param other the pose to compare to. Not modified. * @param epsilon the tolerance of the comparison. * @return {@code true} if the two poses represent the same geometry, {@code false} otherwise. */ @Override public boolean geometricallyEquals(Pose2D other, double epsilon) { return Pose2DBasics.super.geometricallyEquals(other, epsilon); }
/** * Sets all the components of this pose 2D to {@link Double#NaN}. */ @Override default void setToNaN() { getPosition().setToNaN(); getOrientation().setToNaN(); }
/** * Sets the position from the given frame tuple 2D. * * @param position the tuple with the new position coordinates. Not modified. * @throws ReferenceFrameMismatchException if {@code this} and {@code position} are not expressed in * the same reference frame. */ default void setPosition(FrameTuple2DReadOnly position) { checkReferenceFrameMatch(position); Pose2DBasics.super.setPosition(position); }
/** * Sets the orientation from the yaw angle of the given {@code orientation}. * * @param orientation the orientation with the new angle value for this. Not modified. * @throws ReferenceFrameMismatchException if {@code this} and {@code orientation} are not expressed * in the same reference frame. */ default void setOrientation(FrameOrientation3DReadOnly orientation) { checkReferenceFrameMatch(orientation); Pose2DBasics.super.setOrientation(orientation); }
/** * Rotates, then adds the given {@code translation} to this pose 2D. * <p> * Use this method if the {@code translation} is expressed in the local coordinates described by * this pose 2D. Otherwise, use {@link #prependTranslation(Tuple2DReadOnly)}. * </p> * * @param translation tuple containing the translation to apply to this pose 2D. Not modified. */ default void appendTranslation(Tuple2DReadOnly translation) { appendTranslation(translation.getX(), translation.getY()); }
/** * Adds the given {@code orientation} to the orientation of this pose 2D. * <p> * If the position part of this pose 2D is to be rotated by the given {@code orientation}, use * {@link #prependRotation(Orientation2DReadOnly)}. * </p> * * @param orientation the orientation to append to this pose 2D. Not modified. */ default void appendRotation(FrameOrientation2DReadOnly orientation) { checkReferenceFrameMatch(orientation); Pose2DBasics.super.appendRotation(orientation); }
/** * Adds the given {@code translation} to this pose 2D assuming it is expressed in the coordinates in * which this pose is expressed. * <p> * If the {@code translation} is expressed in the local coordinates described by this pose 2D, use * {@link #appendTranslation(Tuple2DReadOnly)}. * </p> * * @param translation tuple containing the translation to apply to this pose 2D. Not modified. */ default void prependTranslation(Tuple2DReadOnly translation) { prependTranslation(translation.getX(), translation.getY()); }
/** * Rotates the position part of this pose 2D by {@code orientation} and adds {@code orientation} to * the orientation part. * <p> * If the rotation should not affect this pose's position, use * {@link #appendRotation(Orientation2DReadOnly)}. * </p> * * @param orientation the orientation to prepend to this pose 2D. Not modified. * @throws ReferenceFrameMismatchException if {@code this} and {@code orientation} are not expressed * in the same reference frame. */ default void prependRotation(FrameOrientation2DReadOnly orientation) { checkReferenceFrameMatch(orientation); Pose2DBasics.super.prependRotation(orientation); }
/** * Sets the orientation from the given orientation 2D. * * @param orientation the orientation with the new angle value for this. Not modified. */ default void setOrientation(Orientation2DReadOnly orientation) { getOrientation().set(orientation); }