librmb 1.0
Rambunction 4330 Utility Library
|
#include <rmb/motorcontrol/sparkmax/SparkMaxVelocityController.h>
Classes | |
struct | CreateInfo |
Public Types | |
using | MotorConfig = SparkMaxVelocityControllerHelper::MotorConfig |
using | PIDConfig = SparkMaxVelocityControllerHelper::PIDConfig |
using | ProfileConfig = SparkMaxVelocityControllerHelper::ProfileConfig |
using | EncoderType = SparkMaxVelocityControllerHelper::EncoderType |
using | LimitSwitchConfig = SparkMaxVelocityControllerHelper::LimitSwitchConfig |
using | FeedbackConfig = SparkMaxVelocityControllerHelper::FeedbackConfig |
Public Types inherited from rmb::AngularVelocityController | |
using | ConversionUnit |
using | ConversionUnit_t = units::unit_t<ConversionUnit> |
Public Member Functions | |
SparkMaxVelocityController (SparkMaxVelocityController &&)=delete | |
SparkMaxVelocityController (const SparkMaxVelocityController &)=delete | |
SparkMaxVelocityController (const CreateInfo &createInfo) | |
rev::CANSparkMax & | getMotor () |
rev::SparkMaxPIDController & | getPIDCOntroller () |
std::unique_ptr< rev::MotorFeedbackSensor > & | getFeedbackSensor () |
void | setVelocity (units::radians_per_second_t velocity) override |
units::radians_per_second_t | getTargetVelocity () const override |
virtual void | setPower (double power) override |
virtual double | getPower () const override |
virtual void | disable () override |
virtual void | stop () override |
units::radians_per_second_t | getVelocity () const override |
units::radian_t | getPosition () const override |
void | setEncoderPosition (units::radian_t position=0_rad) override |
virtual units::radians_per_second_t | getTolerance () const override |
Public Member Functions inherited from rmb::AngularVelocityController | |
virtual units::radians_per_second_t | getError () const |
virtual bool | atTarget () const |
A wrapper around the SparkMax motorcontroller so that it can complies with the AngularVelocityFeedbackController
interface.
Common interface for disabling a mechanism.
Implements rmb::AngularVelocityController.
|
overridevirtual |
Gets the angular position of an motor.
Implements rmb::AngularVelocityController.
Retrieve the percentage [-1.0, 1.0] output of the motor
Implements rmb::AngularVelocityController.
|
overridevirtual |
Gets the target angular velocity.
Implements rmb::AngularVelocityController.
|
overridevirtual |
Gets the motor's tolerance.
Implements rmb::AngularVelocityController.
|
overridevirtual |
Gets the angular velocity of the motor.
Implements rmb::AngularVelocityController.
|
overridevirtual |
Sets the encoder's reported position
position | The position to reset the reference to. Defaults to 0 |
Implements rmb::AngularVelocityController.
Common interface for setting a mechanism's raw power output.
Implements rmb::AngularVelocityController.
|
overridevirtual |
Sets the target angular velocity.
velocity | The target angular velocity in radians per second. |
Implements rmb::AngularVelocityController.
Common interface to stop the mechanism until setPosition
is called again.
Implements rmb::AngularVelocityController.