mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[wpimath] Deprecate RamseteController (#6494)
LTVUnicycleController is a drop-in replacement with better tuning knobs. The RamseteCommand examples were removed instead of retrofitted with LTVUnicycleController because we're planning on removing the command controller classes anyway, so it would be wasted effort. The SimpleDifferentialDriveSimulation example shows direct LTVUnicycleController usage.
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
|
||||
#include "frc/controller/RamseteController.h"
|
||||
|
||||
#include <wpi/deprecated.h>
|
||||
|
||||
#include "units/angle.h"
|
||||
#include "units/math.h"
|
||||
|
||||
@@ -26,10 +28,14 @@ RamseteController::RamseteController(units::unit_t<b_unit> b,
|
||||
units::unit_t<zeta_unit> zeta)
|
||||
: m_b{b}, m_zeta{zeta} {}
|
||||
|
||||
WPI_IGNORE_DEPRECATED
|
||||
|
||||
RamseteController::RamseteController()
|
||||
: RamseteController{units::unit_t<b_unit>{2.0},
|
||||
units::unit_t<zeta_unit>{0.7}} {}
|
||||
|
||||
WPI_UNIGNORE_DEPRECATED
|
||||
|
||||
bool RamseteController::AtReference() const {
|
||||
const auto& eTranslate = m_poseError.Translation();
|
||||
const auto& eRotate = m_poseError.Rotation();
|
||||
|
||||
Reference in New Issue
Block a user