From 02a0ced9b0fd17cdbc51764f39f4b0f1d610dd2c Mon Sep 17 00:00:00 2001 From: sciencewhiz Date: Fri, 21 Jan 2022 16:22:17 -0800 Subject: [PATCH] [wpilib] MecanumDrive: update docs for axis to match implementation (NFC) (#3942) Added note that implementation may change in the future, #3930. --- .../native/include/frc/drive/MecanumDrive.h | 17 ++++++++-------- .../wpi/first/wpilibj/drive/MecanumDrive.java | 20 +++++++++---------- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/wpilibc/src/main/native/include/frc/drive/MecanumDrive.h b/wpilibc/src/main/native/include/frc/drive/MecanumDrive.h index 778aa54171..757ae67570 100644 --- a/wpilibc/src/main/native/include/frc/drive/MecanumDrive.h +++ b/wpilibc/src/main/native/include/frc/drive/MecanumDrive.h @@ -46,14 +46,13 @@ class SpeedController; * Each Drive() function provides different inverse kinematic relations for a * Mecanum drive robot. * - * This library uses the NED axes convention (North-East-Down as external - * reference in the world frame): - * http://www.nuclearprojects.com/ins/images/axis_big.png. - * - * The positive X axis points ahead, the positive Y axis points to the right, + * The positive Y axis points ahead, the positive X axis points to the right, * and the positive Z axis points down. Rotations follow the right-hand rule, so * clockwise rotation around the Z axis is positive. * + * Note: the axis conventions used in this class differ from DifferentialDrive. + * This may change in a future year's WPILib release. + * * Inputs smaller then 0.02 will be set to 0, and larger values will be scaled * so that the full range is still used. This deadband value can be changed * with SetDeadband(). @@ -104,9 +103,9 @@ class MecanumDrive : public RobotDriveBase, * Angles are measured clockwise from the positive X axis. The robot's speed * is independent from its angle or rotation rate. * - * @param ySpeed The robot's speed along the Y axis [-1.0..1.0]. Right is + * @param ySpeed The robot's speed along the Y axis [-1.0..1.0]. Forward is * positive. - * @param xSpeed The robot's speed along the X axis [-1.0..1.0]. Forward is + * @param xSpeed The robot's speed along the X axis [-1.0..1.0]. Right is * positive. * @param zRotation The robot's rotation rate around the Z axis [-1.0..1.0]. * Clockwise is positive. @@ -137,9 +136,9 @@ class MecanumDrive : public RobotDriveBase, * Angles are measured clockwise from the positive X axis. The robot's speed * is independent from its angle or rotation rate. * - * @param ySpeed The robot's speed along the Y axis [-1.0..1.0]. Right is + * @param ySpeed The robot's speed along the Y axis [-1.0..1.0]. Forward is * positive. - * @param xSpeed The robot's speed along the X axis [-1.0..1.0]. Forward is + * @param xSpeed The robot's speed along the X axis [-1.0..1.0]. Right is * positive. * @param zRotation The robot's rotation rate around the Z axis [-1.0..1.0]. * Clockwise is positive. diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/drive/MecanumDrive.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/drive/MecanumDrive.java index 30eb6f3302..aa2577f874 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/drive/MecanumDrive.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/drive/MecanumDrive.java @@ -36,13 +36,13 @@ import edu.wpi.first.wpilibj.SpeedController; *

Each drive() function provides different inverse kinematic relations for a Mecanum drive * robot. * - *

This library uses the NED axes convention (North-East-Down as external reference in the world - * frame): http://www.nuclearprojects.com/ins/images/axis_big.png. - * - *

The positive X axis points ahead, the positive Y axis points right, and the positive Z axis + *

The positive Y axis points ahead, the positive X axis points right, and the positive Z axis * points down. Rotations follow the right-hand rule, so clockwise rotation around the Z axis is * positive. * + *

Note: the axis conventions used in this class differ from DifferentialDrive. This may change + * in a future year's WPILib release. + * *

Inputs smaller then {@value edu.wpi.first.wpilibj.drive.RobotDriveBase#kDefaultDeadband} will * be set to 0, and larger values will be scaled so that the full range is still used. This deadband * value can be changed with {@link #setDeadband}. @@ -140,8 +140,8 @@ public class MecanumDrive extends RobotDriveBase implements Sendable, AutoClosea *

Angles are measured clockwise from the positive X axis. The robot's speed is independent * from its angle or rotation rate. * - * @param ySpeed The robot's speed along the Y axis [-1.0..1.0]. Right is positive. - * @param xSpeed The robot's speed along the X axis [-1.0..1.0]. Forward is positive. + * @param ySpeed The robot's speed along the Y axis [-1.0..1.0]. Forward is positive. + * @param xSpeed The robot's speed along the X axis [-1.0..1.0]. Right is positive. * @param zRotation The robot's rotation rate around the Z axis [-1.0..1.0]. Clockwise is * positive. */ @@ -156,8 +156,8 @@ public class MecanumDrive extends RobotDriveBase implements Sendable, AutoClosea *

Angles are measured clockwise from the positive X axis. The robot's speed is independent * from its angle or rotation rate. * - * @param ySpeed The robot's speed along the Y axis [-1.0..1.0]. Right is positive. - * @param xSpeed The robot's speed along the X axis [-1.0..1.0]. Forward is positive. + * @param ySpeed The robot's speed along the Y axis [-1.0..1.0]. Forward is positive. + * @param xSpeed The robot's speed along the X axis [-1.0..1.0]. Right is positive. * @param zRotation The robot's rotation rate around the Z axis [-1.0..1.0]. Clockwise is * positive. * @param gyroAngle The current angle reading from the gyro in degrees around the Z axis. Use this @@ -215,8 +215,8 @@ public class MecanumDrive extends RobotDriveBase implements Sendable, AutoClosea *

Angles are measured clockwise from the positive X axis. The robot's speed is independent * from its angle or rotation rate. * - * @param ySpeed The robot's speed along the Y axis [-1.0..1.0]. Right is positive. - * @param xSpeed The robot's speed along the X axis [-1.0..1.0]. Forward is positive. + * @param ySpeed The robot's speed along the Y axis [-1.0..1.0]. Forward is positive. + * @param xSpeed The robot's speed along the X axis [-1.0..1.0]. Right is positive. * @param zRotation The robot's rotation rate around the Z axis [-1.0..1.0]. Clockwise is * positive. * @param gyroAngle The current angle reading from the gyro in degrees around the Z axis. Use this