73 using turns_per_meter = units::compound_unit<units::turns, units::inverse<units::meters>>;
74 using turns_per_meter_t = units::unit_t<turns_per_meter>;
76 turns_per_meter_t kDriveRotationsPerMeter;
77 units::scalar_t kCouplingRatioDriveRotorToCANcoder;
78 units::meters_per_second_t kSpeedAt12Volts;
111 template <
typename DriveReq,
typename SteerReq>
112 void Apply(DriveReq &&driveRequest, SteerReq &&steerRequest)
114 _driveMotor.
SetControl(driveRequest.WithUpdateFreqHz(0_Hz));
115 _steerMotor.
SetControl(steerRequest.WithUpdateFreqHz(0_Hz));
209 std::array<BaseStatusSignal *, 4> GetSignals()
211 return std::array<BaseStatusSignal *, 4>{&_drivePosition, &_driveVelocity, &_steerPosition, &_steerVelocity};
its the or e mails sent from or on behalf of the Company are free of trojan timebombs or other harmful components Some jurisdictions do not allow the exclusion of certain types of warranties or limitations on applicable statutory rights of a so some or all of the above exclusions and limitations may not apply to You But in such a case the exclusions and limitations set forth in this section shall be applied to the greatest extent enforceable under applicable law To the extent any warranty exists under law that cannot be the Company shall be solely responsible for such warranty Severability and Waiver Severability If any provision of this Agreement is held to be unenforceable or such provision will be changed and interpreted to accomplish the objectives of such provision to the greatest extent possible under applicable law and the remaining provisions will continue in full force and effect Waiver Except as provided the failure to exercise a right or to require performance of an obligation under this Agreement shall not affect a party s ability to exercise such right or require such performance at any time thereafter nor shall the waiver of a breach constitute waiver of any subsequent breach Product Claims The Company does not make any warranties concerning the Software United States Legal Compliance You represent and warrant or that has been designated by the United States government as a terrorist supporting at its sole to modify or replace this Agreement at any time If a revision is material we will provide at least days notice prior to any new terms taking effect What constitutes a material change will be determined at the sole discretion of the Company By continuing to access or use the Software after any revisions become You agree to be bound by the revised terms If You do not agree to the new You are no longer authorized to use the Software Governing Law The laws of the State of United States of excluding its conflicts of law shall govern this Agreement and your use of the Software Your use of the Software may also be subject to other state
Definition: CTRE_LICENSE.txt:283
Class for getting information about an available CAN bus.
Definition: CANBus.hpp:19
T GetValue() const
Gets the cached value from this status signal.
Definition: StatusSignal.hpp:783
Class for CANcoder, a CAN based magnetic encoder that provides absolute and relative position along w...
Definition: CoreCANcoder.hpp:592
Class description for the Talon FX integrated motor controller.
Definition: CoreTalonFX.hpp:2813
ctre::phoenix::StatusCode SetPosition(units::angle::turn_t newValue, units::time::second_t timeoutSeconds)
Sets the mechanism position of the device in mechanism rotations.
Definition: CoreTalonFX.hpp:10018
ctre::phoenix::StatusCode SetControl(controls::DutyCycleOut &request)
Request a specified motor duty cycle.
The state of the motor controller bridge when output is neutral or disabled.
Definition: SpnEnums.hpp:1698
Swerve Drive class utilizing CTR Electronics Phoenix 6 API.
Definition: SwerveDrivetrainImpl.hpp:30
Swerve Module class that encapsulates a swerve module powered by CTR Electronics devices.
Definition: SwerveModuleImpl.hpp:27
SwerveModuleState GetCurrentState() const
Get the current state of the module.
Definition: SwerveModuleImpl.hpp:153
DriveRequestType
All possible control requests for the module drive motor.
Definition: SwerveModuleImpl.hpp:48
hardware::core::CoreTalonFX & GetSteerMotor()
Gets this module's Steer Motor TalonFX reference.
Definition: SwerveModuleImpl.hpp:194
hardware::core::CoreCANcoder & GetCANcoder()
Gets this module's CANcoder reference.
Definition: SwerveModuleImpl.hpp:204
SteerRequestType
All possible control requests for the module steer motor.
Definition: SwerveModuleImpl.hpp:32
@ MotionMagicExpo
Control the drive motor using a Motion Magic® Expo request.
SwerveModuleImpl(SwerveModuleConstants const &constants, CANBus canbus)
Construct a SwerveModuleImpl with the specified constants.
SwerveModuleState GetTargetState() const
Get the target state of the module.
Definition: SwerveModuleImpl.hpp:165
void Apply(DriveReq &&driveRequest, SteerReq &&steerRequest)
Controls this module using the specified drive and steer control requests.
Definition: SwerveModuleImpl.hpp:112
SwerveModulePosition GetPosition(bool refresh)
Gets the state of this module and passes it back as a SwerveModulePosition object with latency compen...
hardware::core::CoreTalonFX & GetDriveMotor()
Gets this module's Drive Motor TalonFX reference.
Definition: SwerveModuleImpl.hpp:184
ctre::phoenix::StatusCode ConfigNeutralMode(signals::NeutralModeValue neutralMode, units::second_t timeoutSeconds=0.100_s)
Configures the neutral mode to use for the module's drive motor.
void ResetPosition()
Resets this module's drive motor position to 0 rotations.
Definition: SwerveModuleImpl.hpp:170
SwerveModulePosition GetCachedPosition() const
Gets the last cached swerve module position.
Definition: SwerveModuleImpl.hpp:143
void Apply(SwerveModuleState const &state, DriveRequestType driveRequestType, SteerRequestType steerRequestType=SteerRequestType::MotionMagicExpo)
Applies the desired SwerveModuleState to this module.
Status codes reported by APIs, including OK, warnings, and errors.
Definition: StatusCodes.h:27
ClosedLoopOutputType
Supported closed-loop output types.
Definition: SwerveModuleConstants.hpp:23
Represents the state of one swerve module.
Definition: StatusCodes.h:18
All constants for a swerve module.
Definition: SwerveModuleConstants.hpp:53
Represents the position of one swerve module.
Definition: SwerveDriveKinematics.hpp:63
Definition: SwerveDriveKinematics.hpp:23