SubZero Common
Common library components for an FRC CommandRobot
|
Single axis interface. More...
#include <ISingleAxisSubsystem.h>
Classes | |
struct | SingleAxisConfig |
The configuration for single-axis mechanisms. More... | |
Public Types | |
using | Distance_t = units::unit_t<Distance> |
using | Velocity |
using | Velocity_t = units::unit_t<Velocity> |
using | Acceleration |
using | Acceleration_t = units::unit_t<Acceleration> |
Public Member Functions | |
virtual void | RunMotorVelocity (Velocity_t speed, bool ignoreEncoder=false)=0 |
Run at the given velocity; disables any in-progress absolute movements. | |
virtual void | RunMotorPercentage (double percentSpeed, bool ignoreEncoder=false)=0 |
Run at the given velocity percentage; disables any in-progress absolute movements. | |
virtual void | RunMotorSpeedDefault (bool ignoreEncoder=false)=0 |
Run at the default motor speed. | |
virtual void | ResetEncoder ()=0 |
Reset encoder back to 0 ticks. | |
virtual Distance_t | GetCurrentPosition ()=0 |
Get the current position in terms of converted distance. | |
virtual bool | AtHome ()=0 |
Check if axis is at the mimimum extent of motion. | |
virtual bool | AtMax ()=0 |
Check if axis is at the maximum extent of motion. | |
virtual bool | AtLimitSwitchMin ()=0 |
Only check the limit switch for mimimum extent. | |
virtual bool | AtLimitSwitchMax ()=0 |
Only check the limit switch for maximum extent. | |
virtual frc2::CommandPtr | MoveToPositionAbsolute (Distance_t position)=0 |
Start moving to the absolute position. | |
virtual frc2::CommandPtr | MoveToPositionRelative (Distance_t position)=0 |
Start moving to the position given the current distance and relative position. | |
virtual frc2::CommandPtr | Home ()=0 |
Start the homing sequence. | |
virtual bool | IsEnabled ()=0 |
Check if absolute positioning is active. | |
virtual void | DisablePid ()=0 |
Stop and disable any in-progress absolute movements. | |
virtual void | EnablePid ()=0 |
Enable absolute movements. | |
virtual void | Stop ()=0 |
Stop the axis. | |
Single axis interface.
Distance | The distance unit- typically meter, inch, degree, radian, etc. |
Definition at line 36 of file ISingleAxisSubsystem.h.
using subzero::ISingleAxisSubsystem< Distance >::Acceleration |
Definition at line 42 of file ISingleAxisSubsystem.h.
using subzero::ISingleAxisSubsystem< Distance >::Acceleration_t = units::unit_t<Acceleration> |
Definition at line 44 of file ISingleAxisSubsystem.h.
using subzero::ISingleAxisSubsystem< Distance >::Distance_t = units::unit_t<Distance> |
Definition at line 38 of file ISingleAxisSubsystem.h.
using subzero::ISingleAxisSubsystem< Distance >::Velocity |
Definition at line 39 of file ISingleAxisSubsystem.h.
using subzero::ISingleAxisSubsystem< Distance >::Velocity_t = units::unit_t<Velocity> |
Definition at line 41 of file ISingleAxisSubsystem.h.
|
pure virtual |
Check if axis is at the mimimum extent of motion.
Implemented in subzero::BaseSingleAxisSubsystem< TController, TDistance >, subzero::BaseSingleAxisSubsystem< TController, units::degree >, and subzero::BaseSingleAxisSubsystem< TController, units::meter >.
|
pure virtual |
Only check the limit switch for maximum extent.
Implemented in subzero::BaseSingleAxisSubsystem< TController, TDistance >, subzero::BaseSingleAxisSubsystem< TController, units::degree >, and subzero::BaseSingleAxisSubsystem< TController, units::meter >.
|
pure virtual |
Only check the limit switch for mimimum extent.
Implemented in subzero::BaseSingleAxisSubsystem< TController, TDistance >, subzero::BaseSingleAxisSubsystem< TController, units::degree >, and subzero::BaseSingleAxisSubsystem< TController, units::meter >.
|
pure virtual |
Check if axis is at the maximum extent of motion.
Implemented in subzero::BaseSingleAxisSubsystem< TController, TDistance >, subzero::BaseSingleAxisSubsystem< TController, units::degree >, and subzero::BaseSingleAxisSubsystem< TController, units::meter >.
|
pure virtual |
Stop and disable any in-progress absolute movements.
Implemented in subzero::BaseSingleAxisSubsystem< TController, TDistance >, subzero::BaseSingleAxisSubsystem< TController, units::degree >, and subzero::BaseSingleAxisSubsystem< TController, units::meter >.
|
pure virtual |
Enable absolute movements.
Implemented in subzero::BaseSingleAxisSubsystem< TController, TDistance >, subzero::BaseSingleAxisSubsystem< TController, units::degree >, and subzero::BaseSingleAxisSubsystem< TController, units::meter >.
|
pure virtual |
Get the current position in terms of converted distance.
Implemented in subzero::BaseSingleAxisSubsystem< TController, TDistance >, subzero::BaseSingleAxisSubsystem< TController, units::degree >, and subzero::BaseSingleAxisSubsystem< TController, units::meter >.
|
pure virtual |
Start the homing sequence.
Implemented in subzero::BaseSingleAxisSubsystem< TController, TDistance >, subzero::BaseSingleAxisSubsystem< TController, units::degree >, and subzero::BaseSingleAxisSubsystem< TController, units::meter >.
|
pure virtual |
Check if absolute positioning is active.
Implemented in subzero::BaseSingleAxisSubsystem< TController, TDistance >, subzero::BaseSingleAxisSubsystem< TController, units::degree >, and subzero::BaseSingleAxisSubsystem< TController, units::meter >.
|
pure virtual |
Start moving to the absolute position.
position |
Implemented in subzero::BaseSingleAxisSubsystem< TController, TDistance >, subzero::BaseSingleAxisSubsystem< TController, units::degree >, and subzero::BaseSingleAxisSubsystem< TController, units::meter >.
|
pure virtual |
Start moving to the position given the current distance and relative position.
position |
Implemented in subzero::BaseSingleAxisSubsystem< TController, TDistance >, subzero::BaseSingleAxisSubsystem< TController, units::degree >, and subzero::BaseSingleAxisSubsystem< TController, units::meter >.
|
pure virtual |
Reset encoder back to 0 ticks.
Implemented in subzero::BaseSingleAxisSubsystem< TController, TDistance >, subzero::BaseSingleAxisSubsystem< TController, units::degree >, and subzero::BaseSingleAxisSubsystem< TController, units::meter >.
|
pure virtual |
Run at the given velocity percentage; disables any in-progress absolute movements.
speed | |
ignoreEncoder |
Implemented in subzero::BaseSingleAxisSubsystem< TController, TDistance >, subzero::BaseSingleAxisSubsystem< TController, units::degree >, and subzero::BaseSingleAxisSubsystem< TController, units::meter >.
|
pure virtual |
Run at the default motor speed.
ignoreEncoder |
Implemented in subzero::BaseSingleAxisSubsystem< TController, TDistance >, subzero::BaseSingleAxisSubsystem< TController, units::degree >, and subzero::BaseSingleAxisSubsystem< TController, units::meter >.
|
pure virtual |
Run at the given velocity; disables any in-progress absolute movements.
speed | |
ignoreEncoder |
Implemented in subzero::BaseSingleAxisSubsystem< TController, TDistance >, subzero::BaseSingleAxisSubsystem< TController, units::degree >, and subzero::BaseSingleAxisSubsystem< TController, units::meter >.
|
pure virtual |