/** * Computes the absolute angle difference between the orientation part of this pose 2D and the give * {@code orientation}. * * @param other the orientation used to compute the orientation distance. Not modified. * @return the absolute angle difference between {@code this} and {@code orientation}. */ default double getOrientationDistance(Orientation2DReadOnly other) { return getOrientation().distance(other); }
/** * Computes the distance between {@code this} and {@code other} as the absolute difference in * angle:<br> * {@code distance = Math.abs(this.yaw - other.yaw)} * * @param other the other orientation 2D. Not modified. * @return the distance between {@code this} and {@code other} contained in [0, <i>pi</pi>]. * @throws ReferenceFrameMismatchException if {@code other} is not expressed in the same frame as * {@code this}. */ default double distance(FrameOrientation2DReadOnly other) { checkReferenceFrameMatch(other); return Orientation2DReadOnly.super.distance(other); }
/** * Computes the absolute angle difference between this pose 2D and {@code other}. * * @param other the other pose 2D used to compute the orientation distance. Not modified. * @return the absolute angle difference between {@code this.orientation} and * {@code other.orientation}. */ default double getOrientationDistance(Pose2DReadOnly other) { return getOrientation().distance(other.getOrientation()); }