CTRE Phoenix 6 C++ 25.3.1
|
SysId-specific SwerveRequest to characterize the rotational characteristics of a swerve drivetrain. More...
#include <ctre/phoenix6/swerve/SwerveRequest.hpp>
Public Member Functions | |
ctre::phoenix::StatusCode | Apply (SwerveRequest::ControlParameters const ¶meters, std::vector< std::unique_ptr< impl::SwerveModuleImpl > > const &modulesToApply) override |
Applies this swerve request to the given modules. | |
SysIdSwerveRotation & | WithRotationalRate (units::radians_per_second_t rotationalRate) & |
Update the angular rate to rotate at, in radians per second. | |
SysIdSwerveRotation && | WithRotationalRate (units::radians_per_second_t rotationalRate) && |
Update the angular rate to rotate at, in radians per second. | |
![]() | |
virtual | ~SwerveRequest ()=default |
Public Attributes | |
units::radians_per_second_t | RotationalRate = 0_rad_per_s |
The angular rate to rotate at, in radians per second. | |
Additional Inherited Members | |
![]() | |
using | ControlParameters = impl::SwerveDrivetrainImpl::ControlParameters |
SysId-specific SwerveRequest to characterize the rotational characteristics of a swerve drivetrain.
This is useful to characterize the heading controller for FieldCentricFacingAngle.
The RotationalRate of this swerve request should be logged. When importing the log to SysId, set the "voltage" to RotationalRate, "position" to the Pigeon 2 Yaw, and "velocity" to the Pigeon 2 AngularVelocityZWorld. Note that the position and velocity will both need to be scaled by pi/180.
Alternatively, the MotorVoltage of one of the drive motors can be loaded into the SysId "voltage" field, which can be useful when determining the MOI of the robot.
|
inlineoverridevirtual |
Applies this swerve request to the given modules.
This is typically called by the SwerveDrivetrain.
parameters | Parameters the control request needs to calculate the module state |
modulesToApply | Modules to which the control request is applied |
Implements ctre::phoenix6::swerve::requests::SwerveRequest.
|
inline |
Update the angular rate to rotate at, in radians per second.
rotationalRate | Angular rate to rotate at |
|
inline |
Update the angular rate to rotate at, in radians per second.
rotationalRate | Angular rate to rotate at |
units::radians_per_second_t ctre::phoenix6::swerve::requests::SysIdSwerveRotation::RotationalRate = 0_rad_per_s |
The angular rate to rotate at, in radians per second.