librmb 1.0
Rambunction 4330 Utility Library
Loading...
Searching...
No Matches
rmb::LinearVelocityController Class Referenceabstract

#include <rmb/motorcontrol/LinearVelocityController.h>

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

Public Types

using ConversionUnit
 
using ConversionUnit_t = units::unit_t<ConversionUnit>
 

Public Member Functions

virtual void setVelocity (units::meters_per_second_t velocity)=0
 
virtual units::meters_per_second_t getTargetVelocity () const =0
 
virtual void setPower (double power)=0
 
virtual double getPower () const =0
 
virtual void disable ()=0
 
virtual void stop ()=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
 

Detailed Description

Interface for controlling a mechanism's linear velocity used by wrappers of device specific APIs.

Member Typedef Documentation

◆ ConversionUnit

using rmb::LinearVelocityController::ConversionUnit
Initial value:
units::compound_unit<units::meters, units::inverse<units::radians>>

Member Function Documentation

◆ atTarget()

virtual bool rmb::LinearVelocityController::atTarget ( ) const
inlinevirtual

Common interface for getting whether the mechanism has achived it's target velocity.

Returns
true is the controller has achived the target velocity.

◆ disable()

virtual void rmb::LinearVelocityController::disable ( )
pure virtual

Common interface for disabling a mechanism.

Implemented in rmb::LinearFeedforwardController.

◆ getError()

virtual units::meters_per_second_t rmb::LinearVelocityController::getError ( ) const
inlinevirtual

Common interface for getting the error between the velocities controllers target velocity and the actual velocity measured by the encoder.

Returns
position error in radians per second.

◆ getPosition()

virtual units::meter_t rmb::LinearVelocityController::getPosition ( ) const
pure virtual

Common interface for returning the linear position of an encoder.

Returns
The position of the encoder in meters.

◆ getPower()

virtual double rmb::LinearVelocityController::getPower ( ) const
pure virtual

Retrieve the percentage [0.0, 1.0] output of the motor

◆ getTargetVelocity()

virtual units::meters_per_second_t rmb::LinearVelocityController::getTargetVelocity ( ) const
pure virtual

Common interface for getting the target linear velocity.

Returns
The target linear velocity in meters per second.

Implemented in rmb::LinearFeedforwardController.

◆ getTolerance()

virtual units::meters_per_second_t rmb::LinearVelocityController::getTolerance ( ) const
pure virtual

Common interface for getting a controllers tolerance

◆ getVelocity()

virtual units::meters_per_second_t rmb::LinearVelocityController::getVelocity ( ) const
pure virtual

Common interface for returning the linear velocity of an encoder.

Returns
The velocity of the encoder in meters per second.

◆ setEncoderPosition()

virtual void rmb::LinearVelocityController::setEncoderPosition ( units::meter_t position = 0_m)
pure virtual

Sets the encoder's reported position

Parameters
positionThe position to reset the reference to. Defaults to 0

◆ setPower()

virtual void rmb::LinearVelocityController::setPower ( double power)
pure virtual

Common interface for setting a mechanism's raw power output.

◆ setVelocity()

virtual void rmb::LinearVelocityController::setVelocity ( units::meters_per_second_t velocity)
pure virtual

Common interface for setting the target linear velocity.

Parameters
velocityThe target linear velocity in meters per second.

Implemented in rmb::LinearFeedforwardController.

◆ stop()

virtual void rmb::LinearVelocityController::stop ( )
pure virtual

Common interface to stop the mechanism until setPosition is called again.

Implemented in rmb::LinearFeedforwardController.


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