libstp
Robotics library for Botball
Loading...
Searching...
No Matches
libstp::autotune::OdometrySnapshot Struct Reference

#include <odometry_snapshot.hpp>

Public Member Functions

std::pair< double, double > projectBodyFrame (const odometry::IOdometry &odom) const
double headingDelta (const odometry::IOdometry &odom) const
 Return signed heading delta wrapped to [-pi, pi].

Static Public Member Functions

static OdometrySnapshot capture (const odometry::IOdometry &odom)

Public Attributes

double x {0.0}
double y {0.0}
double heading {0.0}

Detailed Description

Snapshot a pose at the start of a trial and project subsequent absolute odometry reads into that snapshot's body frame. Replaces the historical odometry.reset() call at trial start — autotune steps are responsible for being "relative" themselves; odometry stays absolute.

Definition at line 14 of file odometry_snapshot.hpp.

Member Function Documentation

◆ capture()

OdometrySnapshot libstp::autotune::OdometrySnapshot::capture ( const odometry::IOdometry & odom)
inlinestatic

Definition at line 20 of file odometry_snapshot.hpp.

◆ headingDelta()

double libstp::autotune::OdometrySnapshot::headingDelta ( const odometry::IOdometry & odom) const
inlinenodiscard

Return signed heading delta wrapped to [-pi, pi].

Definition at line 44 of file odometry_snapshot.hpp.

◆ projectBodyFrame()

std::pair< double, double > libstp::autotune::OdometrySnapshot::projectBodyFrame ( const odometry::IOdometry & odom) const
inlinenodiscard

Return (forward, lateral) signed distances in the snapshot body frame. Matches IOdometry::getDistanceFromOrigin convention.

Definition at line 31 of file odometry_snapshot.hpp.

Member Data Documentation

◆ heading

double libstp::autotune::OdometrySnapshot::heading {0.0}

Definition at line 18 of file odometry_snapshot.hpp.

◆ x

double libstp::autotune::OdometrySnapshot::x {0.0}

Definition at line 16 of file odometry_snapshot.hpp.

◆ y

double libstp::autotune::OdometrySnapshot::y {0.0}

Definition at line 17 of file odometry_snapshot.hpp.


The documentation for this struct was generated from the following file:
  • /home/runner/work/raccoon-lib/raccoon-lib/modules/libstp-autotune/include/autotune/odometry_snapshot.hpp