HoloLib
High-performance holonomic (X-Drive) control library for VEX V5
Loading...
Searching...
No Matches
hololib::EncoderEKFOdometry Class Reference

#include <odometry.hpp>

Public Member Functions

 EncoderEKFOdometry (pros::Motor &fl, pros::Motor &fr, pros::Motor &bl, pros::Motor &br, pros::IMU &imu_sensor, ChassisConfig cfg)
 Constructor initializing the EKF Odometry system.
 
void update (uint32_t period_ms)
 Main loop running the processing pipeline.
 
void startTask (uint32_t period_ms=10)
 Spawns the processing task thread if not already running.
 
void addTrackingWheel (TrackingWheelConfig config)
 Adds a tracking wheel configuration to the pipeline.
 
void clearTrackingWheels ()
 Clears tracking wheels and falls back to motor layout.
 
void setPose (float x, float y, float theta)
 Sets the pose of the robot.
 
void setPose (Pose pose)
 Sets the pose of the robot.
 
Pose getPose (bool radians=false)
 Gets the pose of the robot.
 
void setVelocityCalculations (bool state)
 
void setKalmanFilterEnabled (bool enabled)
 Enable or disable the internal Extended Kalman Filter.
 

Detailed Description

Definition at line 52 of file odometry.hpp.

Constructor & Destructor Documentation

◆ EncoderEKFOdometry()

hololib::EncoderEKFOdometry::EncoderEKFOdometry ( pros::Motor &  fl,
pros::Motor &  fr,
pros::Motor &  bl,
pros::Motor &  br,
pros::IMU &  imu_sensor,
ChassisConfig  cfg 
)

Constructor initializing the EKF Odometry system.

Member Function Documentation

◆ update()

void hololib::EncoderEKFOdometry::update ( uint32_t  period_ms)

Main loop running the processing pipeline.

Parameters
periodTask execution period in milliseconds.

◆ startTask()

void hololib::EncoderEKFOdometry::startTask ( uint32_t  period_ms = 10)

Spawns the processing task thread if not already running.

◆ addTrackingWheel()

void hololib::EncoderEKFOdometry::addTrackingWheel ( TrackingWheelConfig  config)

Adds a tracking wheel configuration to the pipeline.

◆ clearTrackingWheels()

void hololib::EncoderEKFOdometry::clearTrackingWheels ( )

Clears tracking wheels and falls back to motor layout.

◆ setPose() [1/2]

void hololib::EncoderEKFOdometry::setPose ( float  x,
float  y,
float  theta 
)

Sets the pose of the robot.

◆ setPose() [2/2]

void hololib::EncoderEKFOdometry::setPose ( Pose  pose)

Sets the pose of the robot.

◆ getPose()

Pose hololib::EncoderEKFOdometry::getPose ( bool  radians = false)

Gets the pose of the robot.

◆ setVelocityCalculations()

void hololib::EncoderEKFOdometry::setVelocityCalculations ( bool  state)

◆ setKalmanFilterEnabled()

void hololib::EncoderEKFOdometry::setKalmanFilterEnabled ( bool  enabled)

Enable or disable the internal Extended Kalman Filter.