SubZero Common
Common library components for an FRC CommandRobot
|
The configuration for single-axis mechanisms. More...
#include <ISingleAxisSubsystem.h>
Public Member Functions | |
SingleAxisConfig (Distance_t _minDistance, Distance_t _maxDistance, Distance_t _encoderDistancePerRevolution, std::optional< Distance_t > _absoluteEncoderDistancePerRevolution, Velocity_t _defaultSpeed, double _velocityScalar, Distance_t _tolerance, std::optional< frc::DigitalInput * > _minLimitSwitch, std::optional< frc::DigitalInput * > _maxLimitSwitch, bool _reversed, SingleAxisMechanism _mechanismConfig, std::optional< std::function< std::string(Distance_t)> > _conversionFunction, std::function< bool()> _ignoreLimit, frc::TrapezoidProfile< Distance >::Constraints _profileConstraints) | |
Public Attributes | |
Distance_t | minDistance |
Minimum extent of motion. | |
Distance_t | maxDistance |
Maximum extent of motion. | |
Distance_t | encoderDistancePerRevolution |
std::optional< Distance_t > | absoluteEncoderDistancePerRevolution |
Similar to encoderDistancePerRevolution but using the absolute encoder. | |
Velocity_t | defaultSpeed |
Default movement speed; used when homing. | |
double | velocityScalar |
Multiply the motor output by this factor. | |
Distance_t | tolerance |
Absolute positioning goal is reached within a range of +/- this value. | |
std::optional< frc::DigitalInput * > | minLimitSwitch |
Optional. Will check for the limit switch being active when seeing if at limit. | |
std::optional< frc::DigitalInput * > | maxLimitSwitch |
Optional. Will check for the limit switch being active when seeing if at limit. | |
bool | reversed |
Motion is reversed if true; only used for simulations currently. | |
SingleAxisMechanism | mechanismConfig |
Simulation configuration. | |
std::optional< std::function< std::string(Distance_t)> > | conversionFunction |
Optional. Will be called on each loop; useful for outputting values to SmartDashboard in a different unit than the given one. | |
std::function< bool()> | ignoreLimit |
If true, soft limits will be disabled. | |
frc::TrapezoidProfile< Distance >::Constraints | profileConstraints |
Motion profile constraints. | |
The configuration for single-axis mechanisms.
Definition at line 50 of file ISingleAxisSubsystem.h.
|
inline |
Definition at line 129 of file ISingleAxisSubsystem.h.
std::optional<Distance_t> subzero::ISingleAxisSubsystem< Distance >::SingleAxisConfig::absoluteEncoderDistancePerRevolution |
Similar to encoderDistancePerRevolution but using the absolute encoder.
Definition at line 73 of file ISingleAxisSubsystem.h.
std::optional<std::function<std::string(Distance_t)> > subzero::ISingleAxisSubsystem< Distance >::SingleAxisConfig::conversionFunction |
Optional. Will be called on each loop; useful for outputting values to SmartDashboard in a different unit than the given one.
Definition at line 117 of file ISingleAxisSubsystem.h.
Velocity_t subzero::ISingleAxisSubsystem< Distance >::SingleAxisConfig::defaultSpeed |
Default movement speed; used when homing.
Definition at line 78 of file ISingleAxisSubsystem.h.
Distance_t subzero::ISingleAxisSubsystem< Distance >::SingleAxisConfig::encoderDistancePerRevolution |
Definition at line 67 of file ISingleAxisSubsystem.h.
std::function<bool()> subzero::ISingleAxisSubsystem< Distance >::SingleAxisConfig::ignoreLimit |
If true, soft limits will be disabled.
Definition at line 122 of file ISingleAxisSubsystem.h.
Distance_t subzero::ISingleAxisSubsystem< Distance >::SingleAxisConfig::maxDistance |
Maximum extent of motion.
Definition at line 60 of file ISingleAxisSubsystem.h.
std::optional<frc::DigitalInput *> subzero::ISingleAxisSubsystem< Distance >::SingleAxisConfig::maxLimitSwitch |
Optional. Will check for the limit switch being active when seeing if at limit.
Definition at line 101 of file ISingleAxisSubsystem.h.
SingleAxisMechanism subzero::ISingleAxisSubsystem< Distance >::SingleAxisConfig::mechanismConfig |
Simulation configuration.
Definition at line 111 of file ISingleAxisSubsystem.h.
Distance_t subzero::ISingleAxisSubsystem< Distance >::SingleAxisConfig::minDistance |
Minimum extent of motion.
Definition at line 55 of file ISingleAxisSubsystem.h.
std::optional<frc::DigitalInput *> subzero::ISingleAxisSubsystem< Distance >::SingleAxisConfig::minLimitSwitch |
Optional. Will check for the limit switch being active when seeing if at limit.
Definition at line 95 of file ISingleAxisSubsystem.h.
frc::TrapezoidProfile<Distance>::Constraints subzero::ISingleAxisSubsystem< Distance >::SingleAxisConfig::profileConstraints |
Motion profile constraints.
Definition at line 127 of file ISingleAxisSubsystem.h.
bool subzero::ISingleAxisSubsystem< Distance >::SingleAxisConfig::reversed |
Motion is reversed if true; only used for simulations currently.
Definition at line 106 of file ISingleAxisSubsystem.h.
Distance_t subzero::ISingleAxisSubsystem< Distance >::SingleAxisConfig::tolerance |
Absolute positioning goal is reached within a range of +/- this value.
Definition at line 89 of file ISingleAxisSubsystem.h.
double subzero::ISingleAxisSubsystem< Distance >::SingleAxisConfig::velocityScalar |
Multiply the motor output by this factor.
Definition at line 83 of file ISingleAxisSubsystem.h.