/** * Gets a representative {@code String} of {@code pose2D} given a specific format to use. * <p> * Using the default format {@link #DEFAULT_FORMAT}, this provides a {@code String} as follows: * * <pre> * Pose 2D: position = ( 0.174, -0.222 ), orientation = (-0.130 ) * </pre> * </p> * * @param format the format to use for each number. * @param pose2D the object to get the {@code String} of. Not modified. * @return the representative {@code String}. */ public static String getPose2DString(String format, Pose2DReadOnly pose2D) { if (pose2D == null) return "null"; else return getPose2DString(format, pose2D.getPosition(), pose2D.getYaw()); }
/** * Packs this pose 2D into the given {@code transformToPack}. * * @param transformToPack the rigid-body transform that is set to represent this pose 2D. Modified. */ default void get(RigidBodyTransform transformToPack) { transformToPack.setTranslation(getX(), getY(), 0.0); transformToPack.setRotationYaw(getYaw()); }