librmb 1.0
Rambunction 4330 Utility Library
|
#include <rmb/drive/SwerveModule.h>
Static Public Member Functions | |
static SwerveModulePower | Optimize (const SwerveModulePower &desiredPower, const frc::Rotation2d ¤tAngle) |
Public Attributes | |
double | power |
frc::Rotation2d | angle |
Open loop state of a swerve module.
This is often useful for teleoperated driving since it tends to more natural for a human driver to controll the power of a motor in open loop operation rather than the velocity in a closed loop mode (closed loop operation is, of course, not possible for angle control).
|
static |
Minimize the change in heading the desired power would require by potentially reversing the direction the wheel spins so the furthest a wheel will ever rotate is 90 degrees.
desiredPower | The desired power. |
currentAngle | The current module angle. |