From 8d9836ca02931d946bc7c5ed66dbf83b03b43683 Mon Sep 17 00:00:00 2001 From: Tyler Veness Date: Sun, 12 Dec 2021 17:59:04 -0800 Subject: [PATCH] [wpilib] Improve curvature drive documentation (NFC) (#3783) --- .../native/include/frc/drive/DifferentialDrive.h | 14 ++++++++------ .../wpi/first/wpilibj/drive/DifferentialDrive.java | 10 ++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/wpilibc/src/main/native/include/frc/drive/DifferentialDrive.h b/wpilibc/src/main/native/include/frc/drive/DifferentialDrive.h index 50a7a3fe87..a011dbfeb2 100644 --- a/wpilibc/src/main/native/include/frc/drive/DifferentialDrive.h +++ b/wpilibc/src/main/native/include/frc/drive/DifferentialDrive.h @@ -142,10 +142,11 @@ class DifferentialDrive : public RobotDriveBase, * * @param xSpeed The robot's speed along the X axis [-1.0..1.0]. * Forward is positive. - * @param zRotation The robot's rotation rate around the Z axis - * [-1.0..1.0]. Clockwise is positive. + * @param zRotation The normalized curvature [-1.0..1.0]. Clockwise is + * positive. * @param allowTurnInPlace If set, overrides constant-curvature turning for - * turn-in-place maneuvers. + * turn-in-place maneuvers. zRotation will control + * turning rate instead of curvature. */ void CurvatureDrive(double xSpeed, double zRotation, bool allowTurnInPlace); @@ -184,10 +185,11 @@ class DifferentialDrive : public RobotDriveBase, * * @param xSpeed The robot's speed along the X axis [-1.0..1.0]. * Forward is positive. - * @param zRotation The robot's rotation rate around the Z axis - * [-1.0..1.0]. Clockwise is positive. + * @param zRotation The normalized curvature [-1.0..1.0]. Clockwise is + * positive. * @param allowTurnInPlace If set, overrides constant-curvature turning for - * turn-in-place maneuvers. + * turn-in-place maneuvers. zRotation will control + * turning rate instead of curvature. */ static WheelSpeeds CurvatureDriveIK(double xSpeed, double zRotation, bool allowTurnInPlace); diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/drive/DifferentialDrive.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/drive/DifferentialDrive.java index f9c1c8755c..2acca0f35e 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/drive/DifferentialDrive.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/drive/DifferentialDrive.java @@ -188,10 +188,9 @@ public class DifferentialDrive extends RobotDriveBase implements Sendable, AutoC * heading change. This makes the robot more controllable at high speeds. * * @param xSpeed The robot's speed along the X axis [-1.0..1.0]. Forward is positive. - * @param zRotation The robot's rotation rate around the Z axis [-1.0..1.0]. Clockwise is - * positive. + * @param zRotation The normalized curvature [-1.0..1.0]. Clockwise is positive. * @param allowTurnInPlace If set, overrides constant-curvature turning for turn-in-place - * maneuvers. + * maneuvers. zRotation will control turning rate instead of curvature. */ @SuppressWarnings("ParameterName") public void curvatureDrive(double xSpeed, double zRotation, boolean allowTurnInPlace) { @@ -313,10 +312,9 @@ public class DifferentialDrive extends RobotDriveBase implements Sendable, AutoC * heading change. This makes the robot more controllable at high speeds. * * @param xSpeed The robot's speed along the X axis [-1.0..1.0]. Forward is positive. - * @param zRotation The robot's rotation rate around the Z axis [-1.0..1.0]. Clockwise is - * positive. + * @param zRotation The normalized curvature [-1.0..1.0]. Clockwise is positive. * @param allowTurnInPlace If set, overrides constant-curvature turning for turn-in-place - * maneuvers. + * maneuvers. zRotation will control rotation rate around the Z axis instead of curvature. * @return Wheel speeds. */ @SuppressWarnings("ParameterName")