Class SerestController

Nested Relationships

Nested Types

Inheritance Relationships

Base Type

  • public ControllerMethodBase

Class Documentation

class SerestController : public ControllerMethodBase

SeReST (Safe Reparameterized Time) controller for path tracking.

This controller follows a discrete polyline path (e.g., A* on grid) using a local geometric substitute (LGS) to obtain a smooth reference heading and a surrogate curvature. Progress along the path is time–reparameterized by a safety governor that depends on the closest obstacle distance. It supports:

  • Forward-only or reverse-enabled operation

  • Smooth slowdown and precise arrival at a goal pose (position + yaw)

  • Real-time reaction to dynamic obstacles with emergency stop

  • Corner-guard behavior to avoid opening to the outside of tight turns

The controller consumes:

  • A continuously refreshed path (robot -> goal)

  • Robot pose (odometry) and outputs: a Twist (linear, angular velocities).

Public Functions

SerestController()

Default constructor.

~SerestController() override

Destructor.

void on_initialize() override

Initialize parameters and internal state.

Throws:

std::runtime_error – on initialization error.

void update_rt(NavState &nav_state) override

Real-time control update (called ~20–30 Hz).

Consumes NavState keys:

  • ”path”: nav_msgs::msg::Path

  • ”robot_pose”: nav_msgs::msg::Odometry

  • (optional) “closest_obstacle_distance”: double

Produces:

  • ”cmd_vel”: geometry_msgs::msg::TwistStamped

Parameters:

nav_state[inout] Blackboard for inputs/outputs and diagnostics.

struct Vec2

Simple 2D vector utility type.

Provides basic arithmetic operators and a friend scalar multiplication (scalar * vector).

Public Functions

inline Vec2 operator+(const Vec2 &b) const

Vector addition.

inline Vec2 operator-(const Vec2 &b) const

Vector subtraction.

inline Vec2 operator*(double s) const

Scalar multiplication (vector * scalar).

Public Members

double x

X component.

double y

Y component.

Friends

inline friend Vec2 operator*(double s, const Vec2 &a)

Scalar multiplication (scalar * vector).