Central engineering reference and operations manual for the MRDT Autonomy Software.
View the Project on GitHub MissouriMRDT/Autonomy_Software
Return to RoveSoDocs Guides for Today, Tomorrow, and Forever.
The DriveBoard class (src/drivers/DriveBoard.h & DriveBoard.cpp) converts high-level speed and steering requests into physical motor powers and transmits them over RoveComm to the Core board microcontroller.
DRIVELEFTRIGHT packets and transmits them to the Core microcontroller.SETMAXSPEED commands, scaling output powers across $[0.0, 1.0]$.SendStop() to immediately command $0.0$ power across both tracks.CalculateMove)void DriveBoard::CalculateMove(double dSpeed, double dGoalHeading, double dActualHeading);
The calculation follows three sequential steps:
DRIVE_PID_*) calculates a normalized rotational turn effort:
\(\omega = \text{PID.Calculate}(\theta_{\text{error}}) \in [-1.0, 1.0]\)DRIVE_SQUARE_CONTROL_INPUTS).VariableDriveEffort() and the global m_dMaxDriveEffort multiplier:
\(P_{\text{final}} = P_{\text{raw}} \cdot \text{Damp}_{\text{slope}} \cdot \text{Multiplier}_{\text{throttle}}\)
Final outputs are clamped to constants::DRIVE_MAX_SAFE_POWER.VariableDriveEffort)The driver registers a RoveComm callback listening for manifest::Core::TELEMETRY["INCLINOMETERDATA"]:
Pitch and Roll in degrees.constants::DRIVE_BOARD_ROLL_WEIGHT and constants::DRIVE_BOARD_PITCH_WEIGHT.constants::DRIVE_BOARD_MIN_DAMP ($0.50$).// Kinematics and Movement
void CalculateMove(double dSpeed, double dGoalHeading, double dActualHeading);
void SendDrive();
void SendStop();
// Power Inspection & Setters
diffdrive::DrivePowers GetDrivePowers() const;
void SetMaxDriveEffort(const double dMaxDriveEffort);
double GetMaxDriveEffort() const;
// Differential Drive Mode Selection
void SetDifferentialControlMethod(diffdrive::DifferentialControlMethod eMethod);