librmb 1.0
Rambunction 4330 Utility Library
Loading...
Searching...
No Matches
rmb::LinearFeedforwardController Class Reference

#include <rmb/motorcontrol/feedforward/LinearFeedforwardController.h>

Inheritance diagram for rmb::LinearFeedforwardController:
rmb::LinearVelocityController

Public Member Functions

 LinearFeedforwardController (const LinearFeedforwardController &)=delete
 
 LinearFeedforwardController (LinearFeedforwardController &&)=default
 
 LinearFeedforwardController (std::unique_ptr< frc::MotorController > &&motorController, std::unique_ptr< rmb::Feedforward< units::meters > > &&feedforward)
 
void setVelocity (units::meters_per_second_t velocity)
 
units::meters_per_second_t getTargetVelocity () const
 
void setMaxVelocity (units::meters_per_second_t max)
 
units::meters_per_second_t getMaxVelocity () const
 
void setInverted (bool isInverted)
 
bool getInverted () const
 
void disable ()
 
void stop ()
 
- Public Member Functions inherited from rmb::LinearVelocityController
virtual void setPower (double power)=0
 
virtual double getPower () const =0
 
virtual units::meters_per_second_t getVelocity () const =0
 
virtual units::meter_t getPosition () const =0
 
virtual void setEncoderPosition (units::meter_t position=0_m)=0
 
virtual units::meters_per_second_t getTolerance () const =0
 
virtual units::meters_per_second_t getError () const
 
virtual bool atTarget () const
 

Additional Inherited Members

- Public Types inherited from rmb::LinearVelocityController
using ConversionUnit
 
using ConversionUnit_t = units::unit_t<ConversionUnit>
 

Detailed Description

Interface for setting a motor controllers linear velocity using a feedfoward. Beware< > that since there is no feedbakc device several functions will behave incorrectly. Additionaly, an update method may need to be added for proper voltage compenstation.

Member Function Documentation

◆ disable()

void rmb::LinearFeedforwardController::disable ( )
inlinevirtual

Disabls a mechanism.

Implements rmb::LinearVelocityController.

◆ getInverted()

bool rmb::LinearFeedforwardController::getInverted ( ) const
inline

Returns the inversion state of a mechanism.

Returns
isInverted The state of inversion, true is inverted.

◆ getMaxVelocity()

units::meters_per_second_t rmb::LinearFeedforwardController::getMaxVelocity ( ) const
inline

Gets the maximum angular velocity.

Returns
The maximum angular velocity in radianss per second.

◆ getTargetVelocity()

units::meters_per_second_t rmb::LinearFeedforwardController::getTargetVelocity ( ) const
inlinevirtual

Gets the target velocity.

Returns
The target velocity in meters per second.

Implements rmb::LinearVelocityController.

◆ setInverted()

void rmb::LinearFeedforwardController::setInverted ( bool isInverted)
inline

Inverterts the direction of a mechanism.

Parameters
isInvertedThe state of inversion, true is inverted.

◆ setMaxVelocity()

void rmb::LinearFeedforwardController::setMaxVelocity ( units::meters_per_second_t max)
inline

Sets the maximum angular velocity.

Parameters
maxThe maximum angular velocity in radians per second.

◆ setVelocity()

void rmb::LinearFeedforwardController::setVelocity ( units::meters_per_second_t velocity)
inlinevirtual

Sets the target velocity.

Parameters
velocityThe target linear velocity in meters per second.

Implements rmb::LinearVelocityController.

◆ stop()

void rmb::LinearFeedforwardController::stop ( )
inlinevirtual

Stops the mechanism until setVelocity is called again.

Implements rmb::LinearVelocityController.


The documentation for this class was generated from the following file: