Skip to content

title: Samson summary: Path following using Lapierre's algorithm for path following Method1: based on the work of Samson (1993)


Samson

Path following using Lapierre's algorithm for path following Method1: based on the work of Samson (1993) More...

#include <Samson.h>

Inherits from PathFollowing

Public Functions

Name
Samson(double k1, double k2, double k3, double theta, double k_delta, ros::Publisher surge_pub, ros::Publisher yaw_rate_pub, ros::ServiceClient mode_client)
Constructor method for the Path Following class.
virtual bool setPFGains(std::vector< double > gains) override
Method that given a vector of doubles, updates the gains of the controller.
virtual void callPFController(double dt) override
Method that implements the path following control law.
virtual void publish_private() override
Method to publish the data from the path following.
virtual void start() override
Method to run in the first iteration of the path following algorithm.
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.

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.
virtual bool resetVirtualTarget(float value)
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)
bool resetVirtualTarget()
Method to reset the virtual target of the vehicle (gamma) to zero. Not all controllers need this (example: Samson, Fossen which use the closest point)
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 Samson;

Path following using Lapierre's algorithm for path following Method1: based on the work of Samson (1993)

Author:

  • Marcelo Jacinto
  • Joao Quintas
  • Joao Cruz
  • Hung Tuan

Version: 1.0a

Date: 2021

Copyright: MIT

This algorithm support: Controls:

  • yaw-rate
  • surge Supports Cooperative Path Following - True Contains Currents Observers - False

Public Functions Documentation

function Samson

Samson(
    double k1,
    double k2,
    double k3,
    double theta,
    double k_delta,
    ros::Publisher surge_pub,
    ros::Publisher yaw_rate_pub,
    ros::ServiceClient mode_client
)

Constructor method for the Path Following class.

Parameters:

  • k1 The controller gain
  • k2 The controller gain
  • k3 The controller gain
  • theta The controller gain
  • k_delta The controller gain
  • surge_pub The ROS surge publisher
  • yaw_rate_pub The ROS yaw rate publisher
  • mode_client The ROS service client to change the mode of operation of the path to be the closest point

function setPFGains

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

Method that given a vector of doubles, updates the gains of the controller.

Parameters:

  • gains A vector of gains

Return: a boolean which represents the success of the operation

Reimplements: PathFollowing::setPFGains

NOTE: The default order of the gains is k1, k2, k3, theta, k_delta

function callPFController

virtual void callPFController(
    double dt
) override

Method that implements the path following control law.

Reimplements: PathFollowing::callPFController

function publish_private

virtual void publish_private() override

Method to publish the data from the path following.

Reimplements: PathFollowing::publish_private

function start

virtual void start() override

Method to run in the first iteration of the path following algorithm.

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

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


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


Last update: March 7, 2024