controls  3.0.0
Public Member Functions | Protected Attributes | List of all members
BaseControllerInterface Class Referenceabstract

Abstract base class for a single-responsibility force controller. More...

#include <BaseControllerInterface.h>

Inheritance diagram for BaseControllerInterface:
BuoyancyController FeedbackController FeedforwardController

Public Member Functions

 BaseControllerInterface ()=default
 
 BaseControllerInterface (std::shared_ptr< SystemDynamicsBase > auv, std::shared_ptr< ControllerConfig > config)
 Constructs a controller with the given dynamics model and config. More...
 
virtual ~BaseControllerInterface ()=default
 
virtual void reset ()
 Resets any internal state (e.g., integrator terms) More...
 
virtual Vector6d getForce (const State &goal, const State &curr, double dt)=0
 Computes the instantaneous 6DOF body force for the given goal and current state. More...
 

Protected Attributes

std::shared_ptr< SystemDynamicsBaseauv_
 Vehicle dynamics model shared with all controllers in a stack. More...
 
std::shared_ptr< ControllerConfigconfig_
 Tuning parameters shared with all controllers in a stack. More...
 

Detailed Description

Abstract base class for a single-responsibility force controller.

Concrete subclasses implement one control strategy (feed-forward, feedback, or buoyancy compensation). Higher-level controllers combine instances of these to produce a total body force.

Constructor & Destructor Documentation

◆ BaseControllerInterface() [1/2]

BaseControllerInterface::BaseControllerInterface ( )
default

◆ BaseControllerInterface() [2/2]

BaseControllerInterface::BaseControllerInterface ( std::shared_ptr< SystemDynamicsBase auv,
std::shared_ptr< ControllerConfig config 
)
inline

Constructs a controller with the given dynamics model and config.

Parameters
auv[in] Shared vehicle dynamics model
config[in] Shared controller tuning parameters

◆ ~BaseControllerInterface()

virtual BaseControllerInterface::~BaseControllerInterface ( )
virtualdefault

Member Function Documentation

◆ getForce()

virtual Vector6d BaseControllerInterface::getForce ( const State goal,
const State curr,
double  dt 
)
pure virtual

Computes the instantaneous 6DOF body force for the given goal and current state.

Parameters
goal[in] Desired vehicle state
curr[in] Current vehicle state
dt[in] Time step in seconds since the last call
Returns
6-element body force/torque vector [Fx, Fy, Fz, Tx, Ty, Tz] in N and Nm

Implemented in FeedforwardController, FeedbackController, and BuoyancyController.

◆ reset()

virtual void BaseControllerInterface::reset ( )
inlinevirtual

Resets any internal state (e.g., integrator terms)

Reimplemented in FeedbackController, and BuoyancyController.

Member Data Documentation

◆ auv_

std::shared_ptr<SystemDynamicsBase> BaseControllerInterface::auv_
protected

Vehicle dynamics model shared with all controllers in a stack.

◆ config_

std::shared_ptr<ControllerConfig> BaseControllerInterface::config_
protected

Tuning parameters shared with all controllers in a stack.


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