47 units::meter_t trackwidth,
77 units::meters_per_second_t leftVelocityTolerance,
78 units::meters_per_second_t rightVelocityTolerance);
94 const Pose2d& currentPose, units::meters_per_second_t leftVelocity,
95 units::meters_per_second_t rightVelocity,
const Pose2d& poseRef,
96 units::meters_per_second_t leftVelocityRef,
97 units::meters_per_second_t rightVelocityRef);
112 const Pose2d& currentPose, units::meters_per_second_t leftVelocity,
113 units::meters_per_second_t rightVelocity,
117 units::meter_t m_trackwidth;
#define WPILIB_DLLEXPORT
Definition: SymbolExports.h:36
The linear time-varying differential drive controller has a similar form to the LQR,...
Definition: LTVDifferentialDriveController.h:33
bool AtReference() const
Returns true if the pose error is within tolerance of the reference.
LTVDifferentialDriveController(const frc::LinearSystem< 2, 2, 2 > &plant, units::meter_t trackwidth, const wpi::array< double, 5 > &Qelems, const wpi::array< double, 2 > &Relems, units::second_t dt)
Constructs a linear time-varying differential drive controller.
DifferentialDriveWheelVoltages Calculate(const Pose2d ¤tPose, units::meters_per_second_t leftVelocity, units::meters_per_second_t rightVelocity, const Trajectory::State &desiredState)
Returns the left and right output voltages of the LTV controller.
LTVDifferentialDriveController & operator=(LTVDifferentialDriveController &&)=default
Move assignment operator.
DifferentialDriveWheelVoltages Calculate(const Pose2d ¤tPose, units::meters_per_second_t leftVelocity, units::meters_per_second_t rightVelocity, const Pose2d &poseRef, units::meters_per_second_t leftVelocityRef, units::meters_per_second_t rightVelocityRef)
Returns the left and right output voltages of the LTV controller.
void SetTolerance(const Pose2d &poseTolerance, units::meters_per_second_t leftVelocityTolerance, units::meters_per_second_t rightVelocityTolerance)
Sets the pose error which is considered tolerable for use with AtReference().
LTVDifferentialDriveController(LTVDifferentialDriveController &&)=default
Move constructor.
Represents a 2D pose containing translational and rotational elements.
Definition: Pose2d.h:25
This class is a wrapper around std::array that does compile time size checking.
Definition: array.h:26
Implements a table of key-value pairs with linear interpolation between values.
Definition: interpolating_map.h:23
Definition: AprilTagPoseEstimator.h:15
Eigen::Vector< double, Size > Vectord
Definition: EigenCore.h:12
Motor voltages for a differential drive.
Definition: DifferentialDriveWheelVoltages.h:14
Represents one point on the trajectory.
Definition: Trajectory.h:33