librmb 1.0
Rambunction 4330 Utility Library
|
#include <rmb/motorcontrol/sparkmax/SparkMaxPositionController.h>
Classes | |
struct | CreateInfo |
Public Types | |
using | MotorConfig = SparkMaxPositionControllerHelper::MotorConfig |
using | PIDConfig = SparkMaxPositionControllerHelper::PIDConfig |
using | Range = SparkMaxPositionControllerHelper::Range |
using | ProfileConfig = SparkMaxPositionControllerHelper::ProfileConfig |
using | EncoderType = SparkMaxPositionControllerHelper::EncoderType |
using | LimitSwitchConfig = SparkMaxPositionControllerHelper::LimitSwitchConfig |
using | FeedbackConfig = SparkMaxPositionControllerHelper::FeedbackConfig |
Public Types inherited from rmb::AngularPositionController | |
using | ConversionUnit |
using | ConversionUnit_t = units::unit_t<ConversionUnit> |
Public Member Functions | |
SparkMaxPositionController (SparkMaxPositionController &&)=delete | |
SparkMaxPositionController (const SparkMaxPositionController &)=delete | |
SparkMaxPositionController (const CreateInfo &createInfo) | |
void | setPosition (units::radian_t position) override |
units::radian_t | getTargetPosition () const override |
virtual void | setPower (double power) override |
virtual double | getPower () const override |
units::radian_t | getMinPosition () const override |
units::radian_t | getMaxPosition () const override |
void | disable () override |
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 |
units::radian_t | getTolerance () const override |
Public Member Functions inherited from rmb::AngularPositionController | |
virtual units::radian_t | getError () const |
virtual bool | atTarget () const |
A wrapper around the SparkMax motorcontroller that allows for the user to set and get the position of the motor accurately through PID functionallity
|
overridevirtual |
Disables the motor.
Implements rmb::AngularPositionController.
|
overridevirtual |
Gets the maximum position.
Implements rmb::AngularPositionController.
|
overridevirtual |
Gets the minimum position.
Implements rmb::AngularPositionController.
|
overridevirtual |
Gets the position of the motor.
Implements rmb::AngularPositionController.
Retrieve the percentage [0.0, 1.0] output of the motor
Implements rmb::AngularPositionController.
|
overridevirtual |
Gets the target position.
Implements rmb::AngularPositionController.
|
overridevirtual |
|
overridevirtual |
Gets the velocity of the motor.
Implements rmb::AngularPositionController.
|
overridevirtual |
Set the position the motor reports
position | The new motor position |
Implements rmb::AngularPositionController.
|
overridevirtual |
Setting the target position.
position | The target position in radians. |
Implements rmb::AngularPositionController.
Common interface for setting a mechanism's raw power output.
Implements rmb::AngularPositionController.
|
overridevirtual |
Stops the motor until setPosition
is called again.
Implements rmb::AngularPositionController.