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

Pose, sensor specs, and the global odometry / pose-estimation API. More...

#include <cmath>
#include <vector>
#include "LightLib/drive/mcl_config.hpp"
#include "light/distance.hpp"
#include "light/gps.hpp"
#include "light/imu.hpp"
#include "light/motor_group.hpp"
#include "light/rotation.hpp"

Go to the source code of this file.

Classes

struct  Pose
 Field-frame 2D pose. More...
 
class  TrackingWheel
 Single tracking wheel — works with either a Rotation sensor (preferred) or a powered MotorGroup. More...
 
struct  DistanceSensorSpec
 Per-sensor mount configuration for LightCast's ray-cast sensor model. More...
 
struct  OdomSensors
 Bundle of all sensors used by the LightLib pose estimator. More...
 

Namespaces

namespace  light
 Public LightLib odometry / pose-estimation API.
 

Functions

void light::reset ()
 Reset all internal pose state to (0, 0, 0).
 
void light::init (OdomSensors sensors, MCLConfig cfg={})
 Initialize the estimator.
 
void light::stop ()
 Stop the background odometry task.
 
void light::moveToPoint (float targetX, float targetY, int timeout, float maxSpeed, bool reversed)
 Drive the chassis to a field-relative point (legacy entry point).
 
Pose light::getPose (bool radians=false)
 
void light::setPose (Pose pose, bool radians=false)
 Overwrite the current pose.
 
Pose light::getSpeed (bool radians=false)
 
Pose light::getLocalSpeed (bool radians=false)
 
Pose light::estimatePose (float time, bool radians=false)
 Linearly extrapolate the pose time seconds into the future, assuming current velocity holds.
 
void light::update ()
 Force one update step (normally called by the background task).
 
Pose light::getPoseRad ()
 Radian-only pose accessor.
 

Detailed Description

Pose, sensor specs, and the global odometry / pose-estimation API.

The fused estimator combines wheel-tracking deltas, one or two IMUs, an optional GPS, and an optional set of distance sensors (LightCast). The free functions in namespace light are the public entry points.

Definition in file odometry.hpp.