7#include <initializer_list>
91 constexpr units::meter_t
X()
const {
return m_translation.X(); }
98 constexpr units::meter_t
Y()
const {
return m_translation.Y(); }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CwiseBinaryOp< internal::scalar_quotient_op< Scalar, typename OtherDerived::Scalar >, const Derived, const OtherDerived > operator/(const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other) const
Definition: ArrayCwiseBinaryOps.h:21
#define WPILIB_DLLEXPORT
Definition: SymbolExports.h:36
Represents a 2D pose containing translational and rotational elements.
Definition: Pose2d.h:25
Pose2d Nearest(std::span< const Pose2d > poses) const
Returns the nearest Pose2d from a collection of poses.
Transform2d operator-(const Pose2d &other) const
Returns the Transform2d that maps the one pose to another.
Pose2d Nearest(std::initializer_list< Pose2d > poses) const
Returns the nearest Pose2d from a collection of poses.
Twist2d Log(const Pose2d &end) const
Returns a Twist2d that maps this pose to the end pose.
constexpr Pose2d()=default
Constructs a pose at the origin facing toward the positive X axis.
constexpr const Rotation2d & Rotation() const
Returns the underlying rotation.
Definition: Pose2d.h:105
constexpr units::meter_t Y() const
Returns the Y component of the pose's translation.
Definition: Pose2d.h:98
constexpr units::meter_t X() const
Returns the X component of the pose's translation.
Definition: Pose2d.h:91
Pose2d Exp(const Twist2d &twist) const
Obtain a new Pose2d from a (constant curvature) velocity.
bool operator==(const Pose2d &) const =default
Checks equality between this Pose2d and another object.
Pose2d RelativeTo(const Pose2d &other) const
Returns the current pose relative to the given pose.
constexpr const Translation2d & Translation() const
Returns the underlying translation.
Definition: Pose2d.h:84
A rotation in a 2D coordinate frame represented by a point on the unit circle (cosine and sine).
Definition: Rotation2d.h:26
Represents a translation in 2D space.
Definition: Translation2d.h:29
a class to store JSON values
Definition: json.h:2655
const Scalar & y
Definition: MathFunctions.h:821
static EIGEN_DEPRECATED const end_t end
Definition: IndexedViewHelper.h:181
Definition: AprilTagPoseEstimator.h:15
WPILIB_DLLEXPORT void from_json(const wpi::json &json, AprilTagFieldLayout &layout)
class WPILIB_DLLEXPORT Pose2d
Definition: Transform2d.h:13
WPILIB_DLLEXPORT void to_json(wpi::json &json, const AprilTagFieldLayout &layout)
unit< std::ratio< 1 >, units::category::scalar_unit > scalar
Definition: base.h:2521
constexpr unit_t< Units, T, NonLinearScale > operator+(const unit_t< Units, T, NonLinearScale > &u) noexcept
Definition: base.h:2339
Definition: AprilTagFieldLayout.h:18
A change in distance along a 2D arc since the last pose update.
Definition: Twist2d.h:21