Skip to content

title: Marcelo summary: Path following using Aguiar's algorithm for path following Method6: based on the work of Aguiar and Hespanha (2007) This algorithm support: Controls:


Marcelo

Path following using Aguiar's algorithm for path following Method6: based on the work of Aguiar and Hespanha (2007) This algorithm support: Controls: More...

#include <Marcelo.h>

Inherits from PathFollowing

Public Functions

Name
Marcelo(double delta, double kk[2], double kz, double k_pos, double k_currents, double rd[3], double d[3], ros::Publisher surge_pub, ros::Publisher yaw_rate_pub, ros::Publisher rabbit_pub, ros::Publisher currents_estimation_x_pub, ros::Publisher currents_estimation_y_pub)
Constructor method for the Path Following class.
virtual bool setPFGains(std::vector< double > gains) override
Method to update the gains, given a vector of doubles.
virtual void callPFController(double dt) override
Method that implements the path following control law.
virtual void publish_private() override
Method to publish_private the data from the path following.
virtual void start() override
Method used in the first run to do initial setup.
virtual bool stop() override
Method used to check whether we reached the end of the algorithm or not.
virtual bool reset() override
Method used to reset the algorithm control parameters when running the algorithm more than once.
virtual bool resetVirtualTarget(float value) override
Method to reset the virtual target of the vehicle (gamma) to a pre-specified value. Not all controllers need this (example: Samson, Fossen which use the closest point)

Additional inherited members

Public Functions inherited from PathFollowing

Name
virtual ~PathFollowing()
Virtual destructor for the abstract pathfollowing class.
void publish()
Method to publish the data given by the algorithm.
void UpdateVehicleState(const VehicleState & vehicle_state)
Method to update the vehicle state used by the controller.
void UpdatePathState(const PathState & path_state)
Method to update the path state used by the controller.
void setPFollowingDebugPublisher(const ros::Publisher & pfollowing_debug_pub)
Method to set common publishers.

Protected Functions inherited from PathFollowing

Name
double algConvert(double alg_new, double alg_old, double alg_out_old)
Auxiliar method to smooth out the angle to be used by path following algorithms.
double preventPathSectionSwitching(double gamma, double gamma_dot, double dt)
Prevent gamma from going back to a previous section.

Protected Attributes inherited from PathFollowing

Name
VehicleState vehicle_state_
Variable to store the state of the vehicle.
PathState path_state_
Variable to store the state of the path.
PFollowingDebug pfollowing_debug_
Variable to store the state of the path.
ros::Publisher pfollowing_debug_pub_

Detailed Description

class Marcelo;

Path following using Aguiar's algorithm for path following Method6: based on the work of Aguiar and Hespanha (2007) This algorithm support: Controls:

Author: Marcelo Jacinto

Version: 1.0a

Date: 2021

Copyright: MIT

  • yaw-rate
  • surge
  • virtual-target (gamma) Supports Cooperative Path Following - True Contains Currents Observers - True

Public Functions Documentation

function Marcelo

Marcelo(
    double delta,
    double kk[2],
    double kz,
    double k_pos,
    double k_currents,
    double rd[3],
    double d[3],
    ros::Publisher surge_pub,
    ros::Publisher yaw_rate_pub,
    ros::Publisher rabbit_pub,
    ros::Publisher currents_estimation_x_pub,
    ros::Publisher currents_estimation_y_pub
)

Constructor method for the Path Following class.

Parameters:

  • delta Control gain
  • kk Control gains
  • kz Control gain
  • k_pos Observer gain
  • k_currents Observer gain
  • surge_pub The ROS surge publisher
  • yaw_rate_pub The ROS yaw rate publisher
  • rabbit_pub The ROS rabbit publisher

function setPFGains

virtual bool setPFGains(
    std::vector< double > gains
) override

Method to update the gains, given a vector of doubles.

Parameters:

  • gains A vector of gains to update in the controller The default order is: delta, kk[0], kk[1], kz, k_pos, k_currents

Return: a boolean which represents the success of the operation

Reimplements: PathFollowing::setPFGains

function callPFController

virtual void callPFController(
    double dt
) override

Method that implements the path following control law.

Parameters:

  • dt The time step between last call and current call (in seconds)

Reimplements: PathFollowing::callPFController

function publish_private

virtual void publish_private() override

Method to publish_private the data from the path following.

Reimplements: PathFollowing::publish_private

function start

virtual void start() override

Method used in the first run to do initial setup.

Reimplements: PathFollowing::start

function stop

virtual bool stop() override

Method used to check whether we reached the end of the algorithm or not.

Return: The success of the operation

Reimplements: PathFollowing::stop

Check if the gamma is greater then the gamma max of the path If so, we have reached the end

function reset

virtual bool reset() override

Method used to reset the algorithm control parameters when running the algorithm more than once.

Return: Whether the reset was made successfully or not

Reimplements: PathFollowing::reset

function resetVirtualTarget

virtual bool resetVirtualTarget(
    float value
) override

Method to reset the virtual target of the vehicle (gamma) to a pre-specified value. Not all controllers need this (example: Samson, Fossen which use the closest point)

Return: Whether the reset was made successfully or not

Reimplements: PathFollowing::resetVirtualTarget


Updated on 2024-03-07 at 10:30:51 +0000


Last update: March 7, 2024