Thunderbots Project
Loading...
Searching...
No Matches
EuclideanToWheel Class Reference

Public Member Functions

 EuclideanToWheel (const RobotConstants_t &robot_constants)
 
WheelSpace_t getWheelVelocity (EuclideanSpace_t euclidean_velocity) const
 
EuclideanSpace_t getEuclideanVelocity (const WheelSpace_t &wheel_velocity) const
 
WheelSpace_t rampWheelVelocity (const WheelSpace_t &current_wheel_velocity, const WheelSpace_t &target_wheel_velocity, const double &time_to_ramp)
 

Constructor & Destructor Documentation

◆ EuclideanToWheel()

EuclideanToWheel ( const RobotConstants_t robot_constants)
explicit

Initializes the Euclidean velocity to wheel speed conversion matrices.

Parameters
robot_constantsThe constants of the robot we are computing for.

Member Function Documentation

◆ getEuclideanVelocity()

EuclideanSpace_t getEuclideanVelocity ( const WheelSpace_t &  wheel_velocity) const

Gets the Euclidean velocity from the wheel velocity.

Parameters
wheel_velocityThe wheel velocity.
Returns
The equivalent Euclidean velocity.

◆ getWheelVelocity()

WheelSpace_t getWheelVelocity ( EuclideanSpace_t  euclidean_velocity) const

Gets the wheel velocity from the Euclidean velocity.

Parameters
euclidean_velocityThe Euclidean velocity.
Returns
The equivalent wheel speeds.

◆ rampWheelVelocity()

WheelSpace_t rampWheelVelocity ( const WheelSpace_t &  current_wheel_velocity,
const WheelSpace_t &  target_wheel_velocity,
const double &  time_to_ramp 
)

Ramp the velocity over the given timestep and set the target velocity on the motor.

NOTE: This function has no state. Also NOTE: This function handles all electrical rpm to meters/second conversion.

Parameters
current_wheel_velocityThe current 4-wheel velocity in m/s
target_wheel_velocityThe target 4-wheel velocity m/s
time_to_rampThe time allocated for acceleration in seconds

The documentation for this class was generated from the following files: