Skip to content

WaypointController

Abstract class of a waypoint controller.

#include <wp_controller.h>

Inherited by WpHeading, WpLoose, WpStandard

Public Functions

Name
WaypointController()
virtual ~WaypointController()
void setFrequency(const double & f)
Mutator for setting the controller period.
void setGains(const std::vector< double > & gains)
Mutator for updating the gains.
void compute(Vehicle_t state, WPref_t wp_ref)
Computes and publishes the output of the controller.

Protected Functions

Name
virtual void publish() =0
Virtual function to publish the output of the controller.
virtual void calculateRef(Vehicle_t state, WPref_t wp_ref) =0
Virtual function to compute the waypoint controller.
double getYawOut()
Getter of the yaw reference (output of controller)
double getYawrateOut()
Getter of the yaw rate reference (output of controller)
double getSurgeOut()
Getter of the surge reference (output of controller)
double getSwayOut()
Getter of the sway reference (output of controller)
void setYawOut(const double & value)
Yaw reference setter (output of controller)
void setYawrateOut(const double & value)
Yaw rate reference setter (output of controller)
void setSurgeOut(const double & value)
Surge reference setter (output of controller)
void setSwayOut(const double & value)
Sway reference setter (output of controller)

Protected Attributes

Name
double ts_
std::vector< double > gains_

Public Functions Documentation

function WaypointController

inline WaypointController()

function ~WaypointController

inline virtual ~WaypointController()

function setFrequency

inline void setFrequency(
    const double & f
)

Mutator for setting the controller period.

Parameters:

  • f frequency of the main loop

function setGains

inline void setGains(
    const std::vector< double > & gains
)

Mutator for updating the gains.

Parameters:

  • gains parameters of the waypoiny controller

function compute

inline void compute(
    Vehicle_t state,
    WPref_t wp_ref
)

Computes and publishes the output of the controller.

Parameters:

  • state
  • wp_ref

Protected Functions Documentation

function publish

virtual void publish() =0

Virtual function to publish the output of the controller.

Reimplemented by: WpLoose::publish, WpHeading::publish, WpStandard::publish

function calculateRef

virtual void calculateRef(
    Vehicle_t state,
    WPref_t wp_ref
) =0

Virtual function to compute the waypoint controller.

Parameters:

  • state
  • wp_ref

Reimplemented by: WpLoose::calculateRef, WpHeading::calculateRef, WpStandard::calculateRef

function getYawOut

inline double getYawOut()

Getter of the yaw reference (output of controller)

Return: yaw ref

function getYawrateOut

inline double getYawrateOut()

Getter of the yaw rate reference (output of controller)

Return: yaw rate ref

function getSurgeOut

inline double getSurgeOut()

Getter of the surge reference (output of controller)

Return: surge ref

function getSwayOut

inline double getSwayOut()

Getter of the sway reference (output of controller)

Return: sway ref

function setYawOut

inline void setYawOut(
    const double & value
)

Yaw reference setter (output of controller)

Parameters:

  • value yaw ref

function setYawrateOut

inline void setYawrateOut(
    const double & value
)

Yaw rate reference setter (output of controller)

Parameters:

  • value yaw rate ref

function setSurgeOut

inline void setSurgeOut(
    const double & value
)

Surge reference setter (output of controller)

Parameters:

  • value surge ref

function setSwayOut

inline void setSwayOut(
    const double & value
)

Sway reference setter (output of controller)

Parameters:

  • value sway ref

Protected Attributes Documentation

variable ts_

double ts_ {0.0};

variable gains_

std::vector< double > gains_;

Updated on 2022-09-15 at 17:51:32 +0000


Last update: September 15, 2022
Back to top