Daedalus (PY2026)
Codebase for the Husky Robotics 2025-2026 rover Daedalus
Loading...
Searching...
No Matches
Constants::Drive Namespace Reference

Drive constants. More...

Variables

const double ROBOT_LENGTH = 1.0
 
const double ROBOT_WIDTH = 1.0
 
const double WHEEL_BASE = 2. / 3.
 Distance between left and right wheels.
 
const double EFF_WHEEL_BASE = 1.40
 Effective distance between wheels.
 
const double WHEEL_RADIUS = 0.15
 
const double PWM_PER_RAD_PER_SEC = 5000
 
const double MAX_DRIVE_PWM = 25000
 Can be up to 2^15 - 1 (32767), but we have limited it because driving at full speed draws a massive amount of current that's too much for our power supply (and full speed is hard to control anyway)
 
const double MAX_WHEEL_VEL = WHEEL_RADIUS * MAX_DRIVE_PWM / PWM_PER_RAD_PER_SEC
 Maximum tangential velocity for the rover's wheels.
 
const double MAX_DTHETA
 Maximum angular velocity (i.e.
 
const double STEER_EPSILON = 10000
 Represents the allowable error in millidegrees for steer motors to still process a drive request.
 

Detailed Description

Drive constants.

Variable Documentation

◆ EFF_WHEEL_BASE

const double Constants::Drive::EFF_WHEEL_BASE = 1.40

Effective distance between wheels.

Tweaked so that actual rover angular rate roughly matches the commanded angular rate, based on 2-wheel kinematic model.

◆ MAX_DTHETA

const double Constants::Drive::MAX_DTHETA
Initial value:
Represents the kinematics of a differential drive.
Definition DiffDriveKinematics.h:14
navtypes::pose_t wheelVelToRobotVel(double lVel, double rVel) const
Given the left and right wheel velocities, find the robot velocity in the robot's reference frame.
Definition DiffDriveKinematics.cpp:12
const double MAX_WHEEL_VEL
Maximum tangential velocity for the rover's wheels.
Definition Constants.cpp:37
const double EFF_WHEEL_BASE
Effective distance between wheels.
Definition Constants.cpp:32

Maximum angular velocity (i.e.

dtheta in setCmdVel()) of the rover.

Computed assuming that the left wheel is going at full speed backwards while the right wheel is going at full speed forwards.

◆ MAX_WHEEL_VEL

const double Constants::Drive::MAX_WHEEL_VEL = WHEEL_RADIUS * MAX_DRIVE_PWM / PWM_PER_RAD_PER_SEC

Maximum tangential velocity for the rover's wheels.

If the rover is driving straight and not turning, this is the maximum forward velocity (i.e. dx in setCmdVel()) of the rover.

◆ STEER_EPSILON

const double Constants::Drive::STEER_EPSILON = 10000

Represents the allowable error in millidegrees for steer motors to still process a drive request.

That is, we make sure all the wheels are close enough to their target rotation before actually driving.