mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
Clean up Java warning suppressions (#4433)
Checkstyle naming conventions were changed to allow most of what's in wpimath. Naming rules were disabled completely in wpimath since almost all suppressions are for math notation.
This commit is contained in:
@@ -36,7 +36,6 @@ public class CoordinateAxis {
|
||||
*
|
||||
* @return A coordinate axis corresponding to +X in the NWU coordinate system.
|
||||
*/
|
||||
@SuppressWarnings("MethodName")
|
||||
public static CoordinateAxis N() {
|
||||
return m_n;
|
||||
}
|
||||
@@ -46,7 +45,6 @@ public class CoordinateAxis {
|
||||
*
|
||||
* @return A coordinate axis corresponding to -X in the NWU coordinate system.
|
||||
*/
|
||||
@SuppressWarnings("MethodName")
|
||||
public static CoordinateAxis S() {
|
||||
return m_s;
|
||||
}
|
||||
@@ -56,7 +54,6 @@ public class CoordinateAxis {
|
||||
*
|
||||
* @return A coordinate axis corresponding to -Y in the NWU coordinate system.
|
||||
*/
|
||||
@SuppressWarnings("MethodName")
|
||||
public static CoordinateAxis E() {
|
||||
return m_e;
|
||||
}
|
||||
@@ -66,7 +63,6 @@ public class CoordinateAxis {
|
||||
*
|
||||
* @return A coordinate axis corresponding to +Y in the NWU coordinate system.
|
||||
*/
|
||||
@SuppressWarnings("MethodName")
|
||||
public static CoordinateAxis W() {
|
||||
return m_w;
|
||||
}
|
||||
@@ -76,7 +72,6 @@ public class CoordinateAxis {
|
||||
*
|
||||
* @return A coordinate axis corresponding to +Z in the NWU coordinate system.
|
||||
*/
|
||||
@SuppressWarnings("MethodName")
|
||||
public static CoordinateAxis U() {
|
||||
return m_u;
|
||||
}
|
||||
@@ -86,7 +81,6 @@ public class CoordinateAxis {
|
||||
*
|
||||
* @return A coordinate axis corresponding to -Z in the NWU coordinate system.
|
||||
*/
|
||||
@SuppressWarnings("MethodName")
|
||||
public static CoordinateAxis D() {
|
||||
return m_d;
|
||||
}
|
||||
|
||||
@@ -32,7 +32,6 @@ public class CoordinateSystem {
|
||||
// Construct a change of basis matrix from the source coordinate system to the
|
||||
// NWU coordinate system. Each column vector in the change of basis matrix is
|
||||
// one of the old basis vectors mapped to its representation in the new basis.
|
||||
@SuppressWarnings("LocalVariableName")
|
||||
var R = new Matrix<>(Nat.N3(), Nat.N3());
|
||||
R.assignBlock(0, 0, positiveX.m_axis);
|
||||
R.assignBlock(0, 1, positiveY.m_axis);
|
||||
@@ -50,7 +49,6 @@ public class CoordinateSystem {
|
||||
*
|
||||
* @return An instance of the North-West-Up (NWU) coordinate system.
|
||||
*/
|
||||
@SuppressWarnings("MethodName")
|
||||
public static CoordinateSystem NWU() {
|
||||
return m_nwu;
|
||||
}
|
||||
@@ -62,7 +60,6 @@ public class CoordinateSystem {
|
||||
*
|
||||
* @return An instance of the East-Down-North (EDN) coordinate system.
|
||||
*/
|
||||
@SuppressWarnings("MethodName")
|
||||
public static CoordinateSystem EDN() {
|
||||
return m_edn;
|
||||
}
|
||||
@@ -74,7 +71,6 @@ public class CoordinateSystem {
|
||||
*
|
||||
* @return An instance of the North-East-Down (NED) coordinate system.
|
||||
*/
|
||||
@SuppressWarnings("MethodName")
|
||||
public static CoordinateSystem NED() {
|
||||
return m_ned;
|
||||
}
|
||||
|
||||
@@ -244,7 +244,6 @@ public class Pose2d implements Interpolatable<Pose2d> {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("ParameterName")
|
||||
public Pose2d interpolate(Pose2d endValue, double t) {
|
||||
if (t < 0) {
|
||||
return this;
|
||||
|
||||
@@ -158,7 +158,6 @@ public class Pose3d implements Interpolatable<Pose3d> {
|
||||
* Rotation3d(0.0, 0.0, Units.degreesToRadians(0.5))).
|
||||
* @return The new pose of the robot.
|
||||
*/
|
||||
@SuppressWarnings("LocalVariableName")
|
||||
public Pose3d exp(Twist3d twist) {
|
||||
final var Omega = rotationVectorToMatrix(VecBuilder.fill(twist.rx, twist.ry, twist.rz));
|
||||
final var OmegaSq = Omega.times(Omega);
|
||||
@@ -199,7 +198,6 @@ public class Pose3d implements Interpolatable<Pose3d> {
|
||||
* @param end The end pose for the transformation.
|
||||
* @return The twist that maps this to end.
|
||||
*/
|
||||
@SuppressWarnings("LocalVariableName")
|
||||
public Twist3d log(Pose3d end) {
|
||||
final var transform = end.relativeTo(this);
|
||||
|
||||
@@ -282,7 +280,6 @@ public class Pose3d implements Interpolatable<Pose3d> {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("ParameterName")
|
||||
public Pose3d interpolate(Pose3d endValue, double t) {
|
||||
if (t < 0) {
|
||||
return this;
|
||||
|
||||
@@ -236,7 +236,6 @@ public class Rotation2d implements Interpolatable<Rotation2d> {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("ParameterName")
|
||||
public Rotation2d interpolate(Rotation2d endValue, double t) {
|
||||
return plus(endValue.minus(this).times(MathUtil.clamp(t, 0, 1)));
|
||||
}
|
||||
|
||||
@@ -170,7 +170,6 @@ public class Rotation3d implements Interpolatable<Rotation3d> {
|
||||
// so a 180 degree rotation is required. Any orthogonal vector can be used
|
||||
// for it. Q in the QR decomposition is an orthonormal basis, so it
|
||||
// contains orthogonal unit vectors.
|
||||
@SuppressWarnings("LocalVariableName")
|
||||
var X =
|
||||
new MatBuilder<>(Nat.N3(), Nat.N1())
|
||||
.fill(initial.get(0, 0), initial.get(1, 0), initial.get(2, 0));
|
||||
@@ -376,7 +375,6 @@ public class Rotation3d implements Interpolatable<Rotation3d> {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("ParameterName")
|
||||
public Rotation3d interpolate(Rotation3d endValue, double t) {
|
||||
return plus(endValue.minus(this).times(MathUtil.clamp(t, 0, 1)));
|
||||
}
|
||||
|
||||
@@ -18,7 +18,6 @@ import java.util.Objects;
|
||||
* <p>This assumes that you are using conventional mathematical axes. When the robot is at the
|
||||
* origin facing in the positive X direction, forward is positive X and left is positive Y.
|
||||
*/
|
||||
@SuppressWarnings({"ParameterName", "MemberName"})
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
@JsonAutoDetect(getterVisibility = JsonAutoDetect.Visibility.NONE)
|
||||
public class Translation2d implements Interpolatable<Translation2d> {
|
||||
|
||||
@@ -15,7 +15,6 @@ import java.util.Objects;
|
||||
* origin facing in the positive X direction, forward is positive X, left is positive Y, and up is
|
||||
* positive Z.
|
||||
*/
|
||||
@SuppressWarnings({"ParameterName", "MemberName"})
|
||||
public class Translation3d implements Interpolatable<Translation3d> {
|
||||
private final double m_x;
|
||||
private final double m_y;
|
||||
|
||||
@@ -12,7 +12,6 @@ import java.util.Objects;
|
||||
*
|
||||
* <p>A Twist can be used to represent a difference between two poses.
|
||||
*/
|
||||
@SuppressWarnings("MemberName")
|
||||
public class Twist2d {
|
||||
/** Linear "dx" component. */
|
||||
public double dx;
|
||||
|
||||
@@ -12,7 +12,6 @@ import java.util.Objects;
|
||||
*
|
||||
* <p>A Twist can be used to represent a difference between two poses.
|
||||
*/
|
||||
@SuppressWarnings("MemberName")
|
||||
public class Twist3d {
|
||||
/** Linear "dx" component. */
|
||||
public double dx;
|
||||
|
||||
Reference in New Issue
Block a user