mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-24 01:31:46 +00:00
[wpilib] Added docs clarification on units for drive class WheelSpeeds (NFC) (#3939)
This commit is contained in:
@@ -101,6 +101,11 @@ class DifferentialDrive : public RobotDriveBase,
|
||||
public wpi::Sendable,
|
||||
public wpi::SendableHelper<DifferentialDrive> {
|
||||
public:
|
||||
/**
|
||||
* Wheel speeds for a differential drive.
|
||||
*
|
||||
* Uses normalized voltage [-1.0..1.0].
|
||||
*/
|
||||
struct WheelSpeeds {
|
||||
double left = 0.0;
|
||||
double right = 0.0;
|
||||
@@ -172,6 +177,7 @@ class DifferentialDrive : public RobotDriveBase,
|
||||
* @param zRotation The rotation rate of the robot around the Z axis
|
||||
* [-1.0..1.0]. Clockwise is positive.
|
||||
* @param squareInputs If set, decreases the input sensitivity at low speeds.
|
||||
* @return Wheel speeds [-1.0..1.0].
|
||||
*/
|
||||
static WheelSpeeds ArcadeDriveIK(double xSpeed, double zRotation,
|
||||
bool squareInputs = true);
|
||||
@@ -190,6 +196,7 @@ class DifferentialDrive : public RobotDriveBase,
|
||||
* @param allowTurnInPlace If set, overrides constant-curvature turning for
|
||||
* turn-in-place maneuvers. zRotation will control
|
||||
* turning rate instead of curvature.
|
||||
* @return Wheel speeds [-1.0..1.0].
|
||||
*/
|
||||
static WheelSpeeds CurvatureDriveIK(double xSpeed, double zRotation,
|
||||
bool allowTurnInPlace);
|
||||
@@ -202,6 +209,7 @@ class DifferentialDrive : public RobotDriveBase,
|
||||
* @param rightSpeed The robot right side's speed along the X axis
|
||||
* [-1.0..1.0]. Forward is positive.
|
||||
* @param squareInputs If set, decreases the input sensitivity at low speeds.
|
||||
* @return Wheel speeds [-1.0..1.0].
|
||||
*/
|
||||
static WheelSpeeds TankDriveIK(double leftSpeed, double rightSpeed,
|
||||
bool squareInputs = true);
|
||||
|
||||
@@ -62,6 +62,11 @@ class KilloughDrive : public RobotDriveBase,
|
||||
static constexpr double kDefaultRightMotorAngle = 120.0;
|
||||
static constexpr double kDefaultBackMotorAngle = 270.0;
|
||||
|
||||
/**
|
||||
* Wheel speeds for a Killough drive.
|
||||
*
|
||||
* Uses normalized voltage [-1.0..1.0].
|
||||
*/
|
||||
struct WheelSpeeds {
|
||||
double left = 0.0;
|
||||
double right = 0.0;
|
||||
@@ -154,6 +159,7 @@ class KilloughDrive : public RobotDriveBase,
|
||||
* Clockwise is positive.
|
||||
* @param gyroAngle The current angle reading from the gyro in degrees around
|
||||
* the Z axis. Use this to implement field-oriented controls.
|
||||
* @return Wheel speeds [-1.0..1.0].
|
||||
*/
|
||||
WheelSpeeds DriveCartesianIK(double ySpeed, double xSpeed, double zRotation,
|
||||
double gyroAngle = 0.0);
|
||||
|
||||
@@ -72,6 +72,11 @@ class MecanumDrive : public RobotDriveBase,
|
||||
public wpi::Sendable,
|
||||
public wpi::SendableHelper<MecanumDrive> {
|
||||
public:
|
||||
/**
|
||||
* Wheel speeds for a mecanum drive.
|
||||
*
|
||||
* Uses normalized voltage [-1.0..1.0].
|
||||
*/
|
||||
struct WheelSpeeds {
|
||||
double frontLeft = 0.0;
|
||||
double frontRight = 0.0;
|
||||
@@ -140,6 +145,7 @@ class MecanumDrive : public RobotDriveBase,
|
||||
* Clockwise is positive.
|
||||
* @param gyroAngle The current angle reading from the gyro in degrees around
|
||||
* the Z axis. Use this to implement field-oriented controls.
|
||||
* @return Wheel speeds [-1.0..1.0].
|
||||
*/
|
||||
static WheelSpeeds DriveCartesianIK(double ySpeed, double xSpeed,
|
||||
double zRotation, double gyroAngle = 0.0);
|
||||
|
||||
Reference in New Issue
Block a user