2023-Robot
Robot code for 2023 FRC season by Argos, FRC team #1756
Loading...
Searching...
No Matches
sensor_conversions::lifter::arm_extension Namespace Reference

Functions

constexpr units::inch_t ToExtension (const double sensorUnit)
 
constexpr double ToSensorUnit (const units::inch_t extension)
 
constexpr units::inches_per_second_t ToVelocity (const double sensorVelocity)
 
constexpr double ToSensorVelocity (const units::inches_per_second_t velocity)
 
constexpr units::inch_t ExtensionFromRotation (const units::degree_t angle)
 Find the travel of the extension given a rotation "angle" of the CANCoder.
 

Variables

constexpr double sensorToMotorRevolution = 1.0 / 2048
 
constexpr double gearboxReduction = 1.0 / 12.0
 
constexpr double driveSprocketTeeth = 15.0
 
constexpr double extensionInchesPerTooth = 0.375 / 1
 
constexpr double absEncoderReduction = 1.0 / 10
 
constexpr units::inch_t extensionPerEncoderRevolution
 

Function Documentation

◆ ExtensionFromRotation()

constexpr units::inch_t sensor_conversions::lifter::arm_extension::ExtensionFromRotation ( const units::degree_t  angle)
constexpr

Find the travel of the extension given a rotation "angle" of the CANCoder.

Parameters
angleRotation of the CANCoder
Returns
The travel of extension given a rotation of geared CANCoder

◆ ToExtension()

constexpr units::inch_t sensor_conversions::lifter::arm_extension::ToExtension ( const double  sensorUnit)
constexpr

◆ ToSensorUnit()

constexpr double sensor_conversions::lifter::arm_extension::ToSensorUnit ( const units::inch_t  extension)
constexpr

◆ ToSensorVelocity()

constexpr double sensor_conversions::lifter::arm_extension::ToSensorVelocity ( const units::inches_per_second_t  velocity)
constexpr

◆ ToVelocity()

constexpr units::inches_per_second_t sensor_conversions::lifter::arm_extension::ToVelocity ( const double  sensorVelocity)
constexpr

Variable Documentation

◆ absEncoderReduction

constexpr double sensor_conversions::lifter::arm_extension::absEncoderReduction = 1.0 / 10
constexpr

◆ driveSprocketTeeth

constexpr double sensor_conversions::lifter::arm_extension::driveSprocketTeeth = 15.0
constexpr

◆ extensionInchesPerTooth

constexpr double sensor_conversions::lifter::arm_extension::extensionInchesPerTooth = 0.375 / 1
constexpr

◆ extensionPerEncoderRevolution

constexpr units::inch_t sensor_conversions::lifter::arm_extension::extensionPerEncoderRevolution
constexpr
Initial value:
=
units::make_unit<units::inch_t>((extensionInchesPerTooth * driveSprocketTeeth) / absEncoderReduction)

◆ gearboxReduction

constexpr double sensor_conversions::lifter::arm_extension::gearboxReduction = 1.0 / 12.0
constexpr

◆ sensorToMotorRevolution

constexpr double sensor_conversions::lifter::arm_extension::sensorToMotorRevolution = 1.0 / 2048
constexpr