LightLib
PROS library for VEX V5: EKF/MCL localization, RAMSETE path following, high-level chassis API
Loading...
Searching...
No Matches
OdomSensors Struct Reference

Bundle of all sensors used by the LightLib pose estimator. More...

#include <odometry.hpp>

Public Member Functions

 OdomSensors (TrackingWheel *v1, TrackingWheel *v2, TrackingWheel *h1, TrackingWheel *h2, pros::Imu *imu, pros::Imu *imu2=nullptr)
 Wheel + IMU only constructor.
 
 OdomSensors (TrackingWheel *v1, TrackingWheel *v2, TrackingWheel *h1, TrackingWheel *h2, pros::Imu *imu, pros::Imu *imu2, pros::Gps *gps, float gpsOffsetX, float gpsOffsetY, std::vector< DistanceSensorSpec > distanceSensors)
 Full constructor with GPS and distance sensors.
 

Public Attributes

TrackingWheelvertical1
 Primary vertical (forward-axis) tracking wheel.
 
TrackingWheelvertical2
 Secondary vertical tracking wheel (or nullptr).
 
TrackingWheelhorizontal1
 Primary horizontal (lateral) tracking wheel.
 
TrackingWheelhorizontal2
 Secondary horizontal tracking wheel (or nullptr).
 
pros::Imu * imu
 Primary IMU.
 
pros::Imu * imu2
 Optional second IMU; nullptr if not used.
 
pros::Gps * gps
 Optional absolute-position GPS.
 
float gpsOffsetX
 GPS mount X in robot frame, meters.
 
float gpsOffsetY
 GPS mount Y in robot frame, meters.
 
std::vector< DistanceSensorSpecdistanceSensors
 Optional distance sensors for LightCast.
 

Detailed Description

Bundle of all sensors used by the LightLib pose estimator.

Definition at line 116 of file odometry.hpp.

Constructor & Destructor Documentation

◆ OdomSensors() [1/2]

OdomSensors::OdomSensors ( TrackingWheel v1,
TrackingWheel v2,
TrackingWheel h1,
TrackingWheel h2,
pros::Imu *  imu,
pros::Imu *  imu2 = nullptr 
)
inline

Wheel + IMU only constructor.

Definition at line 141 of file odometry.hpp.

◆ OdomSensors() [2/2]

OdomSensors::OdomSensors ( TrackingWheel v1,
TrackingWheel v2,
TrackingWheel h1,
TrackingWheel h2,
pros::Imu *  imu,
pros::Imu *  imu2,
pros::Gps *  gps,
float  gpsOffsetX,
float  gpsOffsetY,
std::vector< DistanceSensorSpec distanceSensors 
)
inline

Full constructor with GPS and distance sensors.

Definition at line 147 of file odometry.hpp.

Member Data Documentation

◆ distanceSensors

std::vector<DistanceSensorSpec> OdomSensors::distanceSensors

Optional distance sensors for LightCast.

Empty vector = LightCast inactive; the system runs in EKF-only mode (still works — just no hybrid snap on divergence).

Definition at line 138 of file odometry.hpp.

◆ gps

pros::Gps* OdomSensors::gps

Optional absolute-position GPS.

If gps == nullptr, the EKF skips the GPS update step entirely and runs on wheel + IMU alone — no regression vs prior behavior.

Definition at line 129 of file odometry.hpp.

◆ gpsOffsetX

float OdomSensors::gpsOffsetX

GPS mount X in robot frame, meters.

Definition at line 130 of file odometry.hpp.

◆ gpsOffsetY

float OdomSensors::gpsOffsetY

GPS mount Y in robot frame, meters.

Definition at line 131 of file odometry.hpp.

◆ horizontal1

TrackingWheel* OdomSensors::horizontal1

Primary horizontal (lateral) tracking wheel.

Definition at line 119 of file odometry.hpp.

◆ horizontal2

TrackingWheel* OdomSensors::horizontal2

Secondary horizontal tracking wheel (or nullptr).

Definition at line 120 of file odometry.hpp.

◆ imu

pros::Imu* OdomSensors::imu

Primary IMU.

Definition at line 121 of file odometry.hpp.

◆ imu2

pros::Imu* OdomSensors::imu2

Optional second IMU; nullptr if not used.

Definition at line 122 of file odometry.hpp.

◆ vertical1

TrackingWheel* OdomSensors::vertical1

Primary vertical (forward-axis) tracking wheel.

Definition at line 117 of file odometry.hpp.

◆ vertical2

TrackingWheel* OdomSensors::vertical2

Secondary vertical tracking wheel (or nullptr).

Definition at line 118 of file odometry.hpp.


The documentation for this struct was generated from the following file: