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

Abstract interface for the vehicle-level controller. More...

#include <VehicleControllerInterface.h>

Inheritance diagram for VehicleControllerInterface:
FfFbVehicleController

Public Member Functions

 VehicleControllerInterface (std::shared_ptr< SystemDynamicsBase > systemDynamics, std::shared_ptr< ControllerConfig > controller_config)
 Constructs a vehicle controller with shared dynamics and config. More...
 
virtual ~VehicleControllerInterface ()=default
 
virtual Vector6d spinControllerOnce (const State &goal, const State &current, const bool saturatedOnYawXYAxis, const bool saturatedOnDepthRollPitchAxis, double dt)=0
 Computes the instantaneous 6DOF body force to drive the vehicle toward the goal state. More...
 
virtual Vector6d getBodyPoseError () const =0
 Returns the most recently computed 6DOF body-frame pose error. More...
 
virtual void onTrajectoryStarting ()=0
 Called by the Vehicle state machine just before a trajectory begins executing. More...
 
virtual void onTrajectoryFinished ()=0
 Called by the Vehicle state machine when a trajectory completes naturally. More...
 
virtual void onStationkeepEntered ()=0
 Called by the Vehicle state machine when a stationkeep request is activated. More...
 
virtual void onTrajectoryProgress (double progress)=0
 Called every control tick while a trajectory is executing. More...
 

Public Attributes

std::shared_ptr< SystemDynamicsBasesystemDynamics
 Vehicle dynamics model used by this controller. More...
 
std::shared_ptr< ControllerConfigcontroller_config
 Tuning parameters used by this controller. More...
 

Detailed Description

Abstract interface for the vehicle-level controller.

A vehicle controller combines one or more BaseControllerInterface instances and participates in the trajectory lifecycle through callbacks invoked by the Vehicle state machine.

Constructor & Destructor Documentation

◆ VehicleControllerInterface()

VehicleControllerInterface::VehicleControllerInterface ( std::shared_ptr< SystemDynamicsBase systemDynamics,
std::shared_ptr< ControllerConfig controller_config 
)
inline

Constructs a vehicle controller with shared dynamics and config.

Parameters
systemDynamics[in] Shared vehicle dynamics model
controller_config[in] Shared controller tuning parameters

◆ ~VehicleControllerInterface()

virtual VehicleControllerInterface::~VehicleControllerInterface ( )
virtualdefault

Member Function Documentation

◆ getBodyPoseError()

virtual Vector6d VehicleControllerInterface::getBodyPoseError ( ) const
pure virtual

Returns the most recently computed 6DOF body-frame pose error.

Returns
6-element pose error [Δx, Δy, Δz, Δroll, Δpitch, Δyaw]

Implemented in FfFbVehicleController.

◆ onStationkeepEntered()

virtual void VehicleControllerInterface::onStationkeepEntered ( )
pure virtual

Called by the Vehicle state machine when a stationkeep request is activated.

Implemented in FfFbVehicleController.

◆ onTrajectoryFinished()

virtual void VehicleControllerInterface::onTrajectoryFinished ( )
pure virtual

Called by the Vehicle state machine when a trajectory completes naturally.

Implemented in FfFbVehicleController.

◆ onTrajectoryProgress()

virtual void VehicleControllerInterface::onTrajectoryProgress ( double  progress)
pure virtual

Called every control tick while a trajectory is executing.

Parameters
progress[in] Fractional trajectory completion in [0, 1]

Implemented in FfFbVehicleController.

◆ onTrajectoryStarting()

virtual void VehicleControllerInterface::onTrajectoryStarting ( )
pure virtual

Called by the Vehicle state machine just before a trajectory begins executing.

Implemented in FfFbVehicleController.

◆ spinControllerOnce()

virtual Vector6d VehicleControllerInterface::spinControllerOnce ( const State goal,
const State current,
const bool  saturatedOnYawXYAxis,
const bool  saturatedOnDepthRollPitchAxis,
double  dt 
)
pure virtual

Computes the instantaneous 6DOF body force to drive the vehicle toward the goal state.

Parameters
goal[in] Desired vehicle state
current[in] Current vehicle state
saturatedOnYawXYAxis[in] True when the X, Y, or Yaw thruster axes are saturated
saturatedOnDepthRollPitchAxis[in] True when the Z, Roll, or Pitch thruster axes are saturated
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 FfFbVehicleController.

Member Data Documentation

◆ controller_config

std::shared_ptr<ControllerConfig> VehicleControllerInterface::controller_config

Tuning parameters used by this controller.

◆ systemDynamics

std::shared_ptr<SystemDynamicsBase> VehicleControllerInterface::systemDynamics

Vehicle dynamics model used by this controller.


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