nobleo / path_tracking_pid

Path Tracking PID offers a tuneable PID control loop, decouling steering and forward velocity
Apache License 2.0
129 stars 38 forks source link

path_tracking_pid

Overview

Path Tracking PID offers a tuneable PID control loop decouling steerting and forward velocity. The forward velocity is generated in an open loop fashion by using target velocities and accelerations.

One of the tracking options uses a carrot of length l in front of the robot to determine the steering action based on the lateral error between the current Global Point (GP) and the Control point (CP):

Tracking carrot

If a smooth path is provided, the controller has the option to track the path with the base_link directly instead of lagging behind a carrot. In this case a Projected Global Point (PGP) is computed as well which is tracked by the CP. In this mode, the yaw error can also be used as control input.

Tracking Base Link

The PID contains two closed loops: Lateral and angular loops, and an open loop: Longitudinal. For non-holonomic robots, the lateral and angular loops can be combine to compute steering actions.

Model Predictive Control

As an optional feature, we use a Model Predictive Control (MPC) concept to regulate the forward velocity. The user can specify a maximum desired error bound to track the path. Using the model of the robot plus the controller settings, a predicted path is calculated and if the error bound is violated, the forward velocity of the robot is decreased until the predicted path lies within acceptable bounds.

MPC

Tricycle model

The tricycle model is supported as well.

Tricycle Model

It is assumed the front wheel is steered and driven. The steered wheel link (SL) can be asymmetrically placed with respect to the BL. Limitations of steering and actuation are also taken into account.

Anti collision

When used as a plugin, Path Tracking PID uses the costmap (and the robot footprint from the costmap) for anti-collision. No evasive maneuvers will be preformed (sticking to the path is key). However when obstacles are detected in close proximity to the robot or in the direct line of direction of the robot, the forward velocity will be decreased. This results in safer velocities around obstacles. If an obstacle cannot be avoided or is too close to the robot, a standstill will occur and the navigation is cancelled.

The maximum velocity of the robot will be scale linear with the costmap values around or in path of the robot. One can use the inflation layers (or even social layers) to construct these gradients in the costmap.

Keywords: tracking, pid, local_planner, trajectory, model predictive control

License

TBD

Author: Cesar Lopez, cesar.lopez@nobleo.nl.

Maintainer: Cesar Lopez, cesar.lopez@nobleo.nl.

Affiliation: Nobleo Projects

The path_tracking_pid package has been tested under ROS Melodic and Ubuntu 18.04.

Build Status

Installation

Building from Source

Dependencies

Building

To build from source, clone the latest version from this repository into your catkin workspace and compile the package using

cd catkin_workspace/src
git clone https://bitbucket.org/nobleo/path_tracking_pid.git
cd ../
catkin_make

Unit Tests

Run the unit tests with catkin run_tests path_tracking_pid

Usage

The path_tracking_pid is a plugin for move_base_flex.

To run move_base_flex with path_tracking_pid plugin:

roslaunch path_tracking_pid path_tracking_pid_mbf.launch

Static parameters

Configuring in RQT

Trackingpid parameters are all available through (rqt)dynamic_reconfigure. The main parameters are:

Proportional, Integral and Derivative actions for the two closed loops: Lateral and angular loops.

Each loop can be enabled/disabled separetly.

Moreover, feedforward using trajectory velocity can be enabled/disabled.

Target velocities and accelerations for generating the open loop forward velocity:

Constraints on the generated velocities:

Constraints on the steered wheel for the tricycle model:

Anti-collision parameters:

Debug topic enable:

Parameters to configure MPC behavior:

RQT reconfigure Tracking PID

Launch files

Plugin

path_tracking_pid/TrackingPidLocalPlanner

For use in move_base_flex. See launch/path_tracking_pid_mbf.launch to see an example.

Subscribed Topics

Published Topics

Bugs & Feature Requests

Please report bugs and request features using the Issue Tracker.