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

Namespaces

namespace  motion_handler
 

Classes

class  ApriltagLocalization
 Estimates the robot's field pose from AprilTag detections. More...
 
class  Chassis
 
struct  ChassisConfig
 Core constants to configure the chassis dimensions and hardware. More...
 
struct  distancePose
 The resultant position calculated by distance sensors. More...
 
class  DistanceReset
 Handles resetting the robot's odometry using distance sensors. More...
 
struct  DistanceSensor
 Configuration for a single distance sensor used in odometry reset. More...
 
class  DriverReplay
 
class  EncoderEKFOdometry
 
class  GainScheduler
 A scheduler that interpolates and selects PID gains based on the current error. More...
 
class  MotionCancelHelper
 This class exists to simplify the cancellation logic in a motion function. More...
 
struct  MoveParams
 
struct  MoveSettings
 
struct  Obstacle
 Represents a physical obstacle on the field. More...
 
class  ObstacleManager
 Manages a collection of obstacles and provides avoidance computations. More...
 
struct  PathPoint
 
struct  Pose
 
class  PoseEKF
 Extended Kalman Filter implementation for maintaining the robot's pose. More...
 
struct  ScheduledGain
 A mapping of error threshold to specific PID gains. More...
 
class  Timer
 
struct  TrackingWheelConfig
 Configuration parameters for a tracking wheel. More...
 
struct  VelocityComponents
 

Enumerations

enum class  TrackingWheelOrientation { HORIZONTAL , VERTICAL }
 Defines the orientation of an unpowered tracking wheel. More...
 
enum class  HeadingMode { FollowPath , HoldAngle , CustomAngles }
 
enum class  SwingSide { Left , Right }
 

Functions

void moveToPoint (float tx, float ty, MoveParams params={}, MoveSettings settings={})
 Moves the robot to a specific point using PID control.
 
void followPath (const std::vector< PathPoint > &path, float lookaheadDistance, HeadingMode headingMode, float holdAngleDeg, bool reversed, MoveParams params={}, MoveSettings settings={})
 
void turnToHeading (float targetDeg, MoveParams params={}, MoveSettings settings={})
 
void turnToPoint (float tx, float ty, MoveParams params={}, MoveSettings settings={})
 
void moveRelative (float forward, float sideways, bool holdHeading=true, MoveParams params={}, MoveSettings settings={})
 
void moveDistance (float distance, bool holdHeading=true, MoveParams params={}, MoveSettings settings={})
 
void strafeDistance (float distance, bool holdHeading=true, MoveParams params={}, MoveSettings settings={})
 
void moveToPose (float tx, float ty, float targetThetaDeg, MoveParams params={}, MoveSettings settings={})
 
void swingTurn (float targetThetaDeg, SwingSide lockedSide, MoveParams params={}, MoveSettings settings={})
 
float getAngleError (float target, float current)
 Helper utility to calculate the shortest path between two angles.
 
float vexToMathRadians (float vexDegrees)
 

Variables

constexpr float DEG2RAD = M_PI / 180.0f
 
constexpr float RAD2DEG = 180.0f / M_PI
 

Enumeration Type Documentation

◆ TrackingWheelOrientation

Defines the orientation of an unpowered tracking wheel.

Enumerator
HORIZONTAL 
VERTICAL 

Definition at line 19 of file odometry.hpp.

◆ HeadingMode

enum class hololib::HeadingMode
strong
Enumerator
FollowPath 
HoldAngle 
CustomAngles 

Definition at line 42 of file motions.hpp.

◆ SwingSide

enum class hololib::SwingSide
strong
Enumerator
Left 
Right 

Definition at line 48 of file motions.hpp.

Function Documentation

◆ moveToPoint()

void hololib::moveToPoint ( float  tx,
float  ty,
MoveParams  params = {},
MoveSettings  settings = {} 
)

Moves the robot to a specific point using PID control.

Parameters
txThe x-coordinate of the target point.
tyThe y-coordinate of the target point.
paramsThe movement parameters.
settingsShared motion dependencies.
Returns
void

◆ followPath()

void hololib::followPath ( const std::vector< PathPoint > &  path,
float  lookaheadDistance,
HeadingMode  headingMode,
float  holdAngleDeg,
bool  reversed,
MoveParams  params = {},
MoveSettings  settings = {} 
)

◆ turnToHeading()

void hololib::turnToHeading ( float  targetDeg,
MoveParams  params = {},
MoveSettings  settings = {} 
)

◆ turnToPoint()

void hololib::turnToPoint ( float  tx,
float  ty,
MoveParams  params = {},
MoveSettings  settings = {} 
)

◆ moveRelative()

void hololib::moveRelative ( float  forward,
float  sideways,
bool  holdHeading = true,
MoveParams  params = {},
MoveSettings  settings = {} 
)

◆ moveDistance()

void hololib::moveDistance ( float  distance,
bool  holdHeading = true,
MoveParams  params = {},
MoveSettings  settings = {} 
)

◆ strafeDistance()

void hololib::strafeDistance ( float  distance,
bool  holdHeading = true,
MoveParams  params = {},
MoveSettings  settings = {} 
)

◆ moveToPose()

void hololib::moveToPose ( float  tx,
float  ty,
float  targetThetaDeg,
MoveParams  params = {},
MoveSettings  settings = {} 
)

◆ swingTurn()

void hololib::swingTurn ( float  targetThetaDeg,
SwingSide  lockedSide,
MoveParams  params = {},
MoveSettings  settings = {} 
)

◆ getAngleError()

float hololib::getAngleError ( float  target,
float  current 
)

Helper utility to calculate the shortest path between two angles.

Parameters
targetThe desired angle in degrees.
currentThe current angle in degrees.
Returns
float The minimal error difference [-180, 180].

◆ vexToMathRadians()

float hololib::vexToMathRadians ( float  vexDegrees)

Variable Documentation

◆ DEG2RAD

constexpr float hololib::DEG2RAD = M_PI / 180.0f
constexpr

Definition at line 53 of file motions.hpp.

◆ RAD2DEG

constexpr float hololib::RAD2DEG = 180.0f / M_PI
constexpr

Definition at line 54 of file motions.hpp.