The DynamicGoalBasedALOS library provides a dynamic goal-oriented extension to the Adaptive Line-of-Sight (ALOS) guidance law, initially developed by Thor I. Fossen. This library introduces a mechanism for handling dynamic goals in 3D path-following scenarios, suitable for autonomous vehicles, marine craft, and aircraft.
- Implements a 3D ALOS guidance law with dynamic goal adaptation.
- I-based control for look-ahead distance adjustments.
- Robust handling of cross-track and vertical-track errors.
- Configurable parameters for flexible integration and experimentation.
Ensure the following dependencies are installed:
- Eigen (for linear algebra computations)
- PkgConfig (for configuration management)
- CTB PID Library (for PID control)
- C++17 or later (tested with GCC and Clang)
Clone the repository and build the library:
git clone git@bitbucket.org:isme_robotics/path-following-algorithms.git
cd dynamic_goal_alos
mkdir build && cd build
cmake ..
sudo make installTo use the library, include the header and initialize the DynamicGoalBasedALOS object:
#include "dynamic_goal_ALOS.hpp"
dynamic_goal_alos::DynamicGoalBasedALOSParams params;
// Configure `params` as needed, or load them from a .conf file
params = dynamic_goal_alos::LoadALOSParamsFromConf("config_name");
dynamic_goal_alos::DynamicGoalBasedALOS alos(params);Updates the look-ahead distance based on the error metrics.
double newDelta = alos.UpdateLookAheadDistance(crossTrackError, verticalTrackError, tangentsDifferenceNorm);Calculates the desired heading and pitch to guide the vehicle towards the goal.
bool success = alos.ALOS3D(currentPos, goalPos, closestPos, delta, dt, desiredHeading, desiredPitch, crossTrackError, verticalTrackError);Loads parameters from a configuration file.
auto params = dynamic_goal_alos::LoadALOSParamsFromConf("config_name");Returns the current look-ahead distance:
double currentDelta = alos.GetDelta();The DynamicGoalBasedALOSParams struct supports the following configurable parameters:
- Look-ahead Distance:
deltaMin: Minimum look-ahead distance.deltaMax: Maximum look-ahead distance.
- Cross-Track and Vertical-Track Weights:
crossTrackErrorWeight,verticalTrackErrorWeight,tangentsDifferenceNormWeight.
- Gains for Adaptive Control:
gamma_crosstrack,gamma_verticaltrack.
- PID Gains for Look-Ahead Distance:
gainsDelta: Struct containingKp,Ki,Kd, etc.
- Dynamic Initialization Values:
betaHat_c_init,thetaHat_c_init.
- Bounds for Beta and Theta:
betaHat_c_min,betaHat_c_max,thetaHat_c_min,thetaHat_c_max.
Example .conf file:
DynamicGoalBasedALOS {
deltaMin = 1.0;
deltaMax = 10.0;
dt = 0.1;
gamma_crosstrack = 0.01;
gamma_verticaltrack = 0.01;
epsilon = 0.01;
betaHat_c_max = 1.0;
betaHat_c_min = -1.0;
thetaHat_c_max = 1.0;
thetaHat_c_min = -1.0;
crossTrackErrorWeight = 1.0;
verticalTrackErrorWeight = 1.0;
tangentsDifferenceNormWeight = 1.0;
betaHat_c_init = 0.0;
thetaHat_c_init = 0.0;
gainsDelta = [0.1, 0.01, 0.001, 1.0, 0.0, 0.1];
}LinkedIn: Youssef Attia
Email: youssef.attia@edu.unige.it
Fossen, T. I., & Aguiar, A. P. (2024). A uniform semiglobal exponential stable adaptive line-of-sight (ALOS) guidance law for 3-D path following. Automatica, 163, 111556. https://doi.org/10.1016/j.automatica.2024.111556
This project is licensed under the MIT License. See the LICENSE file for details.