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

Tank chassis class — the main user-facing API for autonomous and opcontrol drive motions. More...

#include <functional>
#include <iostream>
#include <tuple>
#include "LightLib/control/pid.hpp"
#include "LightLib/control/slew.hpp"
#include "LightLib/drive/tracking_wheel.hpp"
#include "LightLib/util/util.hpp"
#include "light/motor_group.hpp"
#include "light/motors.h"
#include "light/units.hpp"

Go to the source code of this file.

Classes

class  light::Drive
 Tank-drive chassis class. More...
 
struct  light::Drive::const_and_name
 

Namespaces

namespace  light
 Public LightLib odometry / pose-estimation API.
 

Macros

#define DRIVE_INTEGRATED   1
 
#define DRIVE_ADI_ENCODER   2
 
#define DRIVE_ROTATION   3
 
#define ODOM_TRACKER   4
 

Typedefs

using light::PoseGetterFn = pose(*)()
 External pose getter used by register_pose_source().
 
using light::PoseSetterFn = void(*)(pose)
 External pose setter used by register_pose_source().
 

Functions

void light::register_pose_source (PoseGetterFn getter, PoseSetterFn setter)
 Register an external pose source.
 

Detailed Description

Tank chassis class — the main user-facing API for autonomous and opcontrol drive motions.

Handles motors, brake modes, drive PIDs, swing PIDs, turn PIDs, slew, and odom-based motion primitives.

Build a Drive instance in main.cpp from your motor port lists and call chassis.initialize() (or the LightLib helpers) before using it.

Definition in file drive.hpp.

Macro Definition Documentation

◆ DRIVE_ADI_ENCODER

#define DRIVE_ADI_ENCODER   2

Definition at line 3692 of file drive.hpp.

◆ DRIVE_INTEGRATED

#define DRIVE_INTEGRATED   1

Definition at line 3691 of file drive.hpp.

◆ DRIVE_ROTATION

#define DRIVE_ROTATION   3

Definition at line 3693 of file drive.hpp.

◆ ODOM_TRACKER

#define ODOM_TRACKER   4

Definition at line 3694 of file drive.hpp.