CTRE Phoenix 6 C++ 25.3.1
Loading...
Searching...
No Matches
ctre::phoenix6::swerve::SimSwerveDrivetrain< DriveMotorT, SteerMotorT, EncoderT, typename, typename, typename >::SimSwerveModule Class Reference

#include <ctre/phoenix6/swerve/SimSwerveDrivetrain.hpp>

Public Member Functions

 SimSwerveModule (units::scalar_t driveGearing, units::kilogram_square_meter_t driveInertia, units::volt_t driveFrictionVoltage, bool driveMotorInverted, DriveMotorArrangement driveMotorType, units::scalar_t steerGearing, units::kilogram_square_meter_t steerInertia, units::volt_t steerFrictionVoltage, bool steerMotorInverted, SteerMotorArrangement steerMotorType, bool encoderInverted, SteerFeedbackType encoderType)
 

Static Public Member Functions

static frc::DCMotor GetDriveMotorGearbox (DriveMotorArrangement driveMotorType)
 
static frc::DCMotor GetSteerMotorGearbox (SteerMotorArrangement steerMotorType)
 

Public Attributes

frc::sim::DCMotorSim DriveMotor
 Reference to motor simulation for drive motor.
 
frc::sim::DCMotorSim SteerMotor
 Reference to motor simulation for the steer motor.
 
units::scalar_t DriveGearing
 Reference to steer gearing for updating encoder.
 
units::scalar_t SteerGearing
 Reference to steer gearing for updating encoder.
 
units::volt_t DriveFrictionVoltage
 Voltage necessary for the drive motor to overcome friction.
 
units::volt_t SteerFrictionVoltage
 Voltage necessary for the steer motor to overcome friction.
 
bool DriveMotorInverted
 Whether the drive motor is inverted.
 
bool SteerMotorInverted
 Whether the steer motor is inverted.
 
bool EncoderInverted
 Whether the azimuth encoder is inverted.
 
SteerFeedbackType EncoderType
 The type of encoder to use for the azimuth.
 

Constructor & Destructor Documentation

◆ SimSwerveModule()

template<typename DriveMotorT , typename SteerMotorT , typename EncoderT , typename = std::enable_if_t<std::is_base_of_v<hardware::traits::CommonTalon, DriveMotorT>>, typename = std::enable_if_t<std::is_base_of_v<hardware::traits::CommonTalon, SteerMotorT>>, typename = std::enable_if_t<std::disjunction_v< std::is_same<hardware::CANcoder, EncoderT>, std::is_same<hardware::CANdi, EncoderT>, std::is_same<hardware::TalonFXS, EncoderT> >>>
ctre::phoenix6::swerve::SimSwerveDrivetrain< DriveMotorT, SteerMotorT, EncoderT, typename, typename, typename >::SimSwerveModule::SimSwerveModule ( units::scalar_t driveGearing,
units::kilogram_square_meter_t driveInertia,
units::volt_t driveFrictionVoltage,
bool driveMotorInverted,
DriveMotorArrangement driveMotorType,
units::scalar_t steerGearing,
units::kilogram_square_meter_t steerInertia,
units::volt_t steerFrictionVoltage,
bool steerMotorInverted,
SteerMotorArrangement steerMotorType,
bool encoderInverted,
SteerFeedbackType encoderType )
inline

Member Function Documentation

◆ GetDriveMotorGearbox()

template<typename DriveMotorT , typename SteerMotorT , typename EncoderT , typename = std::enable_if_t<std::is_base_of_v<hardware::traits::CommonTalon, DriveMotorT>>, typename = std::enable_if_t<std::is_base_of_v<hardware::traits::CommonTalon, SteerMotorT>>, typename = std::enable_if_t<std::disjunction_v< std::is_same<hardware::CANcoder, EncoderT>, std::is_same<hardware::CANdi, EncoderT>, std::is_same<hardware::TalonFXS, EncoderT> >>>
static frc::DCMotor ctre::phoenix6::swerve::SimSwerveDrivetrain< DriveMotorT, SteerMotorT, EncoderT, typename, typename, typename >::SimSwerveModule::GetDriveMotorGearbox ( DriveMotorArrangement driveMotorType)
inlinestatic

◆ GetSteerMotorGearbox()

template<typename DriveMotorT , typename SteerMotorT , typename EncoderT , typename = std::enable_if_t<std::is_base_of_v<hardware::traits::CommonTalon, DriveMotorT>>, typename = std::enable_if_t<std::is_base_of_v<hardware::traits::CommonTalon, SteerMotorT>>, typename = std::enable_if_t<std::disjunction_v< std::is_same<hardware::CANcoder, EncoderT>, std::is_same<hardware::CANdi, EncoderT>, std::is_same<hardware::TalonFXS, EncoderT> >>>
static frc::DCMotor ctre::phoenix6::swerve::SimSwerveDrivetrain< DriveMotorT, SteerMotorT, EncoderT, typename, typename, typename >::SimSwerveModule::GetSteerMotorGearbox ( SteerMotorArrangement steerMotorType)
inlinestatic

Member Data Documentation

◆ DriveFrictionVoltage

template<typename DriveMotorT , typename SteerMotorT , typename EncoderT , typename = std::enable_if_t<std::is_base_of_v<hardware::traits::CommonTalon, DriveMotorT>>, typename = std::enable_if_t<std::is_base_of_v<hardware::traits::CommonTalon, SteerMotorT>>, typename = std::enable_if_t<std::disjunction_v< std::is_same<hardware::CANcoder, EncoderT>, std::is_same<hardware::CANdi, EncoderT>, std::is_same<hardware::TalonFXS, EncoderT> >>>
units::volt_t ctre::phoenix6::swerve::SimSwerveDrivetrain< DriveMotorT, SteerMotorT, EncoderT, typename, typename, typename >::SimSwerveModule::DriveFrictionVoltage

Voltage necessary for the drive motor to overcome friction.

◆ DriveGearing

template<typename DriveMotorT , typename SteerMotorT , typename EncoderT , typename = std::enable_if_t<std::is_base_of_v<hardware::traits::CommonTalon, DriveMotorT>>, typename = std::enable_if_t<std::is_base_of_v<hardware::traits::CommonTalon, SteerMotorT>>, typename = std::enable_if_t<std::disjunction_v< std::is_same<hardware::CANcoder, EncoderT>, std::is_same<hardware::CANdi, EncoderT>, std::is_same<hardware::TalonFXS, EncoderT> >>>
units::scalar_t ctre::phoenix6::swerve::SimSwerveDrivetrain< DriveMotorT, SteerMotorT, EncoderT, typename, typename, typename >::SimSwerveModule::DriveGearing

Reference to steer gearing for updating encoder.

◆ DriveMotor

template<typename DriveMotorT , typename SteerMotorT , typename EncoderT , typename = std::enable_if_t<std::is_base_of_v<hardware::traits::CommonTalon, DriveMotorT>>, typename = std::enable_if_t<std::is_base_of_v<hardware::traits::CommonTalon, SteerMotorT>>, typename = std::enable_if_t<std::disjunction_v< std::is_same<hardware::CANcoder, EncoderT>, std::is_same<hardware::CANdi, EncoderT>, std::is_same<hardware::TalonFXS, EncoderT> >>>
frc::sim::DCMotorSim ctre::phoenix6::swerve::SimSwerveDrivetrain< DriveMotorT, SteerMotorT, EncoderT, typename, typename, typename >::SimSwerveModule::DriveMotor

Reference to motor simulation for drive motor.

◆ DriveMotorInverted

template<typename DriveMotorT , typename SteerMotorT , typename EncoderT , typename = std::enable_if_t<std::is_base_of_v<hardware::traits::CommonTalon, DriveMotorT>>, typename = std::enable_if_t<std::is_base_of_v<hardware::traits::CommonTalon, SteerMotorT>>, typename = std::enable_if_t<std::disjunction_v< std::is_same<hardware::CANcoder, EncoderT>, std::is_same<hardware::CANdi, EncoderT>, std::is_same<hardware::TalonFXS, EncoderT> >>>
bool ctre::phoenix6::swerve::SimSwerveDrivetrain< DriveMotorT, SteerMotorT, EncoderT, typename, typename, typename >::SimSwerveModule::DriveMotorInverted

Whether the drive motor is inverted.

◆ EncoderInverted

template<typename DriveMotorT , typename SteerMotorT , typename EncoderT , typename = std::enable_if_t<std::is_base_of_v<hardware::traits::CommonTalon, DriveMotorT>>, typename = std::enable_if_t<std::is_base_of_v<hardware::traits::CommonTalon, SteerMotorT>>, typename = std::enable_if_t<std::disjunction_v< std::is_same<hardware::CANcoder, EncoderT>, std::is_same<hardware::CANdi, EncoderT>, std::is_same<hardware::TalonFXS, EncoderT> >>>
bool ctre::phoenix6::swerve::SimSwerveDrivetrain< DriveMotorT, SteerMotorT, EncoderT, typename, typename, typename >::SimSwerveModule::EncoderInverted

Whether the azimuth encoder is inverted.

◆ EncoderType

template<typename DriveMotorT , typename SteerMotorT , typename EncoderT , typename = std::enable_if_t<std::is_base_of_v<hardware::traits::CommonTalon, DriveMotorT>>, typename = std::enable_if_t<std::is_base_of_v<hardware::traits::CommonTalon, SteerMotorT>>, typename = std::enable_if_t<std::disjunction_v< std::is_same<hardware::CANcoder, EncoderT>, std::is_same<hardware::CANdi, EncoderT>, std::is_same<hardware::TalonFXS, EncoderT> >>>
SteerFeedbackType ctre::phoenix6::swerve::SimSwerveDrivetrain< DriveMotorT, SteerMotorT, EncoderT, typename, typename, typename >::SimSwerveModule::EncoderType

The type of encoder to use for the azimuth.

◆ SteerFrictionVoltage

template<typename DriveMotorT , typename SteerMotorT , typename EncoderT , typename = std::enable_if_t<std::is_base_of_v<hardware::traits::CommonTalon, DriveMotorT>>, typename = std::enable_if_t<std::is_base_of_v<hardware::traits::CommonTalon, SteerMotorT>>, typename = std::enable_if_t<std::disjunction_v< std::is_same<hardware::CANcoder, EncoderT>, std::is_same<hardware::CANdi, EncoderT>, std::is_same<hardware::TalonFXS, EncoderT> >>>
units::volt_t ctre::phoenix6::swerve::SimSwerveDrivetrain< DriveMotorT, SteerMotorT, EncoderT, typename, typename, typename >::SimSwerveModule::SteerFrictionVoltage

Voltage necessary for the steer motor to overcome friction.

◆ SteerGearing

template<typename DriveMotorT , typename SteerMotorT , typename EncoderT , typename = std::enable_if_t<std::is_base_of_v<hardware::traits::CommonTalon, DriveMotorT>>, typename = std::enable_if_t<std::is_base_of_v<hardware::traits::CommonTalon, SteerMotorT>>, typename = std::enable_if_t<std::disjunction_v< std::is_same<hardware::CANcoder, EncoderT>, std::is_same<hardware::CANdi, EncoderT>, std::is_same<hardware::TalonFXS, EncoderT> >>>
units::scalar_t ctre::phoenix6::swerve::SimSwerveDrivetrain< DriveMotorT, SteerMotorT, EncoderT, typename, typename, typename >::SimSwerveModule::SteerGearing

Reference to steer gearing for updating encoder.

◆ SteerMotor

template<typename DriveMotorT , typename SteerMotorT , typename EncoderT , typename = std::enable_if_t<std::is_base_of_v<hardware::traits::CommonTalon, DriveMotorT>>, typename = std::enable_if_t<std::is_base_of_v<hardware::traits::CommonTalon, SteerMotorT>>, typename = std::enable_if_t<std::disjunction_v< std::is_same<hardware::CANcoder, EncoderT>, std::is_same<hardware::CANdi, EncoderT>, std::is_same<hardware::TalonFXS, EncoderT> >>>
frc::sim::DCMotorSim ctre::phoenix6::swerve::SimSwerveDrivetrain< DriveMotorT, SteerMotorT, EncoderT, typename, typename, typename >::SimSwerveModule::SteerMotor

Reference to motor simulation for the steer motor.

◆ SteerMotorInverted

template<typename DriveMotorT , typename SteerMotorT , typename EncoderT , typename = std::enable_if_t<std::is_base_of_v<hardware::traits::CommonTalon, DriveMotorT>>, typename = std::enable_if_t<std::is_base_of_v<hardware::traits::CommonTalon, SteerMotorT>>, typename = std::enable_if_t<std::disjunction_v< std::is_same<hardware::CANcoder, EncoderT>, std::is_same<hardware::CANdi, EncoderT>, std::is_same<hardware::TalonFXS, EncoderT> >>>
bool ctre::phoenix6::swerve::SimSwerveDrivetrain< DriveMotorT, SteerMotorT, EncoderT, typename, typename, typename >::SimSwerveModule::SteerMotorInverted

Whether the steer motor is inverted.


The documentation for this class was generated from the following file: