mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
SCRIPT: Spotless Apply
This commit is contained in:
committed by
Peter Johnson
parent
c89910b7c6
commit
c48b722dac
@@ -4,8 +4,8 @@
|
||||
|
||||
package org.wpilib;
|
||||
|
||||
import org.wpilib.util.protobuf.Protobuf;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.util.protobuf.Protobuf;
|
||||
import us.hebi.quickbuf.ProtoMessage;
|
||||
|
||||
public abstract class ProtoTestBase<T, MessageType extends ProtoMessage<MessageType>> {
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
|
||||
package org.wpilib;
|
||||
|
||||
import org.wpilib.util.struct.Struct;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.util.struct.Struct;
|
||||
|
||||
public abstract class StructTestBase<T> {
|
||||
private final T m_testData;
|
||||
|
||||
@@ -8,14 +8,14 @@ import static org.junit.jupiter.api.Assertions.assertAll;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
|
||||
import java.util.function.BiFunction;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.linalg.MatBuilder;
|
||||
import org.wpilib.math.linalg.Matrix;
|
||||
import org.wpilib.math.util.Nat;
|
||||
import org.wpilib.math.numbers.N1;
|
||||
import org.wpilib.math.numbers.N2;
|
||||
import org.wpilib.math.system.NumericalIntegration;
|
||||
import java.util.function.BiFunction;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.util.Nat;
|
||||
|
||||
class ArmFeedforwardTest {
|
||||
/**
|
||||
|
||||
@@ -6,13 +6,13 @@ package org.wpilib.math.controller;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.linalg.MatBuilder;
|
||||
import org.wpilib.math.linalg.Matrix;
|
||||
import org.wpilib.math.util.Nat;
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import org.wpilib.math.numbers.N1;
|
||||
import org.wpilib.math.numbers.N2;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.util.Nat;
|
||||
|
||||
class ControlAffinePlantInversionFeedforwardTest {
|
||||
@Test
|
||||
|
||||
@@ -9,12 +9,12 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.linalg.Matrix;
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import org.wpilib.math.numbers.N1;
|
||||
import org.wpilib.math.numbers.N2;
|
||||
import org.wpilib.math.system.plant.LinearSystemId;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class DifferentialDriveAccelerationLimiterTest {
|
||||
@Test
|
||||
|
||||
@@ -6,13 +6,13 @@ package org.wpilib.math.controller;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.linalg.Matrix;
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import org.wpilib.math.numbers.N1;
|
||||
import org.wpilib.math.numbers.N2;
|
||||
import org.wpilib.math.system.LinearSystem;
|
||||
import org.wpilib.math.system.plant.LinearSystemId;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class DifferentialDriveFeedforwardTest {
|
||||
private static final double kVLinear = 1.0;
|
||||
|
||||
@@ -8,11 +8,11 @@ import static org.junit.jupiter.api.Assertions.assertAll;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.linalg.MatBuilder;
|
||||
import org.wpilib.math.util.Nat;
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import org.wpilib.math.numbers.N1;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.util.Nat;
|
||||
|
||||
class ElevatorFeedforwardTest {
|
||||
private static final double ks = 0.5;
|
||||
|
||||
@@ -7,12 +7,12 @@ package org.wpilib.math.controller;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.linalg.Matrix;
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import org.wpilib.math.numbers.N1;
|
||||
import org.wpilib.math.numbers.N2;
|
||||
import org.wpilib.math.system.plant.LinearSystemId;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class ImplicitModelFollowerTest {
|
||||
@Test
|
||||
|
||||
@@ -7,13 +7,13 @@ package org.wpilib.math.controller;
|
||||
import static org.junit.jupiter.api.Assertions.assertAll;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.wpilib.math.linalg.MatBuilder;
|
||||
import org.wpilib.math.util.MathUtil;
|
||||
import org.wpilib.math.linalg.Matrix;
|
||||
import org.wpilib.math.util.Nat;
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import java.util.ArrayList;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.geometry.Pose2d;
|
||||
import org.wpilib.math.geometry.Rotation2d;
|
||||
import org.wpilib.math.linalg.MatBuilder;
|
||||
import org.wpilib.math.linalg.Matrix;
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import org.wpilib.math.numbers.N1;
|
||||
import org.wpilib.math.numbers.N2;
|
||||
import org.wpilib.math.numbers.N5;
|
||||
@@ -22,8 +22,8 @@ import org.wpilib.math.system.NumericalIntegration;
|
||||
import org.wpilib.math.system.plant.LinearSystemId;
|
||||
import org.wpilib.math.trajectory.TrajectoryConfig;
|
||||
import org.wpilib.math.trajectory.TrajectoryGenerator;
|
||||
import java.util.ArrayList;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.util.MathUtil;
|
||||
import org.wpilib.math.util.Nat;
|
||||
|
||||
class LTVDifferentialDriveControllerTest {
|
||||
private static final double kTolerance = 1 / 12.0;
|
||||
|
||||
@@ -7,15 +7,15 @@ package org.wpilib.math.controller;
|
||||
import static org.junit.jupiter.api.Assertions.assertAll;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.wpilib.math.util.MathUtil;
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import java.util.ArrayList;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.geometry.Pose2d;
|
||||
import org.wpilib.math.geometry.Rotation2d;
|
||||
import org.wpilib.math.geometry.Twist2d;
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import org.wpilib.math.trajectory.TrajectoryConfig;
|
||||
import org.wpilib.math.trajectory.TrajectoryGenerator;
|
||||
import java.util.ArrayList;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.util.MathUtil;
|
||||
|
||||
class LTVUnicycleControllerTest {
|
||||
private static final double kTolerance = 1 / 12.0;
|
||||
|
||||
@@ -6,13 +6,13 @@ package org.wpilib.math.controller;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.linalg.MatBuilder;
|
||||
import org.wpilib.math.linalg.Matrix;
|
||||
import org.wpilib.math.util.Nat;
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import org.wpilib.math.numbers.N1;
|
||||
import org.wpilib.math.numbers.N2;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.util.Nat;
|
||||
|
||||
class LinearPlantInversionFeedforwardTest {
|
||||
@Test
|
||||
|
||||
@@ -6,15 +6,15 @@ package org.wpilib.math.controller;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.linalg.MatBuilder;
|
||||
import org.wpilib.math.linalg.Matrix;
|
||||
import org.wpilib.math.util.Nat;
|
||||
import org.wpilib.math.util.Num;
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import org.wpilib.math.system.Discretization;
|
||||
import org.wpilib.math.system.plant.DCMotor;
|
||||
import org.wpilib.math.system.plant.LinearSystemId;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.util.Nat;
|
||||
import org.wpilib.math.util.Num;
|
||||
|
||||
class LinearQuadraticRegulatorTest {
|
||||
@Test
|
||||
|
||||
@@ -7,10 +7,11 @@ package org.wpilib.math.controller;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.wpilib.math.linalg.Matrix;
|
||||
import org.wpilib.math.util.Nat;
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import java.util.Random;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.estimator.KalmanFilter;
|
||||
import org.wpilib.math.linalg.Matrix;
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import org.wpilib.math.numbers.N1;
|
||||
import org.wpilib.math.numbers.N2;
|
||||
import org.wpilib.math.system.LinearSystem;
|
||||
@@ -18,8 +19,7 @@ import org.wpilib.math.system.LinearSystemLoop;
|
||||
import org.wpilib.math.system.plant.DCMotor;
|
||||
import org.wpilib.math.system.plant.LinearSystemId;
|
||||
import org.wpilib.math.trajectory.TrapezoidProfile;
|
||||
import java.util.Random;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.util.Nat;
|
||||
|
||||
class LinearSystemLoopTest {
|
||||
private static final double kDt = 0.005;
|
||||
|
||||
@@ -6,8 +6,8 @@ package org.wpilib.math.controller;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.wpilib.math.trajectory.TrapezoidProfile;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.trajectory.TrapezoidProfile;
|
||||
|
||||
class ProfiledPIDControllerTest {
|
||||
@Test
|
||||
|
||||
@@ -7,8 +7,8 @@ package org.wpilib.math.controller;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.wpilib.math.trajectory.TrapezoidProfile;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.trajectory.TrapezoidProfile;
|
||||
|
||||
class ProfiledPIDInputOutputTest {
|
||||
@Test
|
||||
|
||||
@@ -8,11 +8,11 @@ import static org.junit.jupiter.api.Assertions.assertAll;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.linalg.MatBuilder;
|
||||
import org.wpilib.math.util.Nat;
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import org.wpilib.math.numbers.N1;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.util.Nat;
|
||||
|
||||
class SimpleMotorFeedforwardTest {
|
||||
@Test
|
||||
|
||||
@@ -6,9 +6,9 @@ package org.wpilib.math.controller.proto;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.controller.ArmFeedforward;
|
||||
import org.wpilib.math.proto.Controller.ProtobufArmFeedforward;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class ArmFeedforwardProtoTest {
|
||||
private static final ArmFeedforward DATA = new ArmFeedforward(0.174, 0.229, 4.4, 4.4);
|
||||
|
||||
@@ -6,9 +6,9 @@ package org.wpilib.math.controller.proto;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.wpilib.ProtoTestBase;
|
||||
import org.wpilib.math.controller.DifferentialDriveFeedforward;
|
||||
import org.wpilib.math.proto.Controller.ProtobufDifferentialDriveFeedforward;
|
||||
import org.wpilib.ProtoTestBase;
|
||||
|
||||
@SuppressWarnings("PMD.TestClassWithoutTestCases")
|
||||
class DifferentialDriveFeedforwardProtoTest
|
||||
|
||||
@@ -6,9 +6,9 @@ package org.wpilib.math.controller.proto;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.controller.DifferentialDriveWheelVoltages;
|
||||
import org.wpilib.math.proto.Controller.ProtobufDifferentialDriveWheelVoltages;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class DifferentialDriveWheelVoltagesProtoTest {
|
||||
private static final DifferentialDriveWheelVoltages DATA =
|
||||
|
||||
@@ -6,9 +6,9 @@ package org.wpilib.math.controller.proto;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.controller.ElevatorFeedforward;
|
||||
import org.wpilib.math.proto.Controller.ProtobufElevatorFeedforward;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class ElevatorFeedforwardProtoTest {
|
||||
private static final ElevatorFeedforward DATA = new ElevatorFeedforward(1.91, 1.1, 1.1, 0.229);
|
||||
|
||||
@@ -6,9 +6,9 @@ package org.wpilib.math.controller.proto;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.wpilib.ProtoTestBase;
|
||||
import org.wpilib.math.controller.SimpleMotorFeedforward;
|
||||
import org.wpilib.math.proto.Controller.ProtobufSimpleMotorFeedforward;
|
||||
import org.wpilib.ProtoTestBase;
|
||||
|
||||
@SuppressWarnings("PMD.TestClassWithoutTestCases")
|
||||
class SimpleMotorFeedforwardProtoTest
|
||||
|
||||
@@ -6,10 +6,10 @@ package org.wpilib.math.controller.struct;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.wpilib.math.controller.ArmFeedforward;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.controller.ArmFeedforward;
|
||||
|
||||
class ArmFeedforwardStructTest {
|
||||
private static final ArmFeedforward DATA = new ArmFeedforward(0.174, 0.229, 4.4, 4.4);
|
||||
|
||||
@@ -6,8 +6,8 @@ package org.wpilib.math.controller.struct;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.wpilib.math.controller.DifferentialDriveFeedforward;
|
||||
import org.wpilib.StructTestBase;
|
||||
import org.wpilib.math.controller.DifferentialDriveFeedforward;
|
||||
|
||||
@SuppressWarnings("PMD.TestClassWithoutTestCases")
|
||||
class DifferentialDriveFeedforwardStructTest extends StructTestBase<DifferentialDriveFeedforward> {
|
||||
|
||||
@@ -6,10 +6,10 @@ package org.wpilib.math.controller.struct;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.wpilib.math.controller.DifferentialDriveWheelVoltages;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.controller.DifferentialDriveWheelVoltages;
|
||||
|
||||
class DifferentialDriveWheelVoltagesStructTest {
|
||||
private static final DifferentialDriveWheelVoltages DATA =
|
||||
|
||||
@@ -6,10 +6,10 @@ package org.wpilib.math.controller.struct;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.wpilib.math.controller.ElevatorFeedforward;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.controller.ElevatorFeedforward;
|
||||
|
||||
class ElevatorFeedforwardStructTest {
|
||||
private static final ElevatorFeedforward DATA = new ElevatorFeedforward(1.91, 1.1, 1.1, 0.229);
|
||||
|
||||
@@ -6,8 +6,8 @@ package org.wpilib.math.controller.struct;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.wpilib.math.controller.SimpleMotorFeedforward;
|
||||
import org.wpilib.StructTestBase;
|
||||
import org.wpilib.math.controller.SimpleMotorFeedforward;
|
||||
|
||||
@SuppressWarnings("PMD.TestClassWithoutTestCases")
|
||||
class SimpleMotorFeedforwardStructTest extends StructTestBase<SimpleMotorFeedforward> {
|
||||
|
||||
@@ -6,11 +6,11 @@ package org.wpilib.math.estimator;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.linalg.MatBuilder;
|
||||
import org.wpilib.math.linalg.Matrix;
|
||||
import org.wpilib.math.util.Nat;
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.util.Nat;
|
||||
|
||||
class AngleStatisticsTest {
|
||||
@Test
|
||||
|
||||
@@ -8,7 +8,12 @@ import static org.junit.jupiter.api.Assertions.assertAll;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.Random;
|
||||
import java.util.TreeMap;
|
||||
import java.util.function.Function;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.geometry.Pose2d;
|
||||
import org.wpilib.math.geometry.Pose3d;
|
||||
import org.wpilib.math.geometry.Rotation2d;
|
||||
@@ -18,15 +23,10 @@ import org.wpilib.math.geometry.Translation2d;
|
||||
import org.wpilib.math.geometry.Translation3d;
|
||||
import org.wpilib.math.kinematics.ChassisSpeeds;
|
||||
import org.wpilib.math.kinematics.DifferentialDriveKinematics;
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import org.wpilib.math.trajectory.Trajectory;
|
||||
import org.wpilib.math.trajectory.TrajectoryConfig;
|
||||
import org.wpilib.math.trajectory.TrajectoryGenerator;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.Random;
|
||||
import java.util.TreeMap;
|
||||
import java.util.function.Function;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class DifferentialDrivePoseEstimator3dTest {
|
||||
private static final double kEpsilon = 1e-9;
|
||||
|
||||
@@ -8,22 +8,22 @@ import static org.junit.jupiter.api.Assertions.assertAll;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import org.wpilib.math.geometry.Pose2d;
|
||||
import org.wpilib.math.geometry.Rotation2d;
|
||||
import org.wpilib.math.geometry.Transform2d;
|
||||
import org.wpilib.math.geometry.Translation2d;
|
||||
import org.wpilib.math.kinematics.ChassisSpeeds;
|
||||
import org.wpilib.math.kinematics.DifferentialDriveKinematics;
|
||||
import org.wpilib.math.trajectory.Trajectory;
|
||||
import org.wpilib.math.trajectory.TrajectoryConfig;
|
||||
import org.wpilib.math.trajectory.TrajectoryGenerator;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.Random;
|
||||
import java.util.TreeMap;
|
||||
import java.util.function.Function;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.geometry.Pose2d;
|
||||
import org.wpilib.math.geometry.Rotation2d;
|
||||
import org.wpilib.math.geometry.Transform2d;
|
||||
import org.wpilib.math.geometry.Translation2d;
|
||||
import org.wpilib.math.kinematics.ChassisSpeeds;
|
||||
import org.wpilib.math.kinematics.DifferentialDriveKinematics;
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import org.wpilib.math.trajectory.Trajectory;
|
||||
import org.wpilib.math.trajectory.TrajectoryConfig;
|
||||
import org.wpilib.math.trajectory.TrajectoryGenerator;
|
||||
|
||||
class DifferentialDrivePoseEstimatorTest {
|
||||
private static final double kEpsilon = 1e-9;
|
||||
|
||||
@@ -7,12 +7,12 @@ package org.wpilib.math.estimator;
|
||||
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.wpilib.math.linalg.Matrix;
|
||||
import org.wpilib.math.util.Nat;
|
||||
import org.wpilib.math.util.StateSpaceUtil;
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import java.util.List;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.geometry.Pose2d;
|
||||
import org.wpilib.math.geometry.Rotation2d;
|
||||
import org.wpilib.math.linalg.Matrix;
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import org.wpilib.math.numbers.N1;
|
||||
import org.wpilib.math.numbers.N2;
|
||||
import org.wpilib.math.numbers.N3;
|
||||
@@ -22,8 +22,8 @@ import org.wpilib.math.system.NumericalJacobian;
|
||||
import org.wpilib.math.system.plant.DCMotor;
|
||||
import org.wpilib.math.trajectory.TrajectoryConfig;
|
||||
import org.wpilib.math.trajectory.TrajectoryGenerator;
|
||||
import java.util.List;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.util.Nat;
|
||||
import org.wpilib.math.util.StateSpaceUtil;
|
||||
|
||||
class ExtendedKalmanFilterTest {
|
||||
private static Matrix<N5, N1> getDynamics(final Matrix<N5, N1> x, final Matrix<N2, N1> u) {
|
||||
|
||||
@@ -7,12 +7,14 @@ package org.wpilib.math.estimator;
|
||||
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.wpilib.math.linalg.MatBuilder;
|
||||
import org.wpilib.math.linalg.Matrix;
|
||||
import org.wpilib.math.util.Nat;
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.geometry.Pose2d;
|
||||
import org.wpilib.math.geometry.Rotation2d;
|
||||
import org.wpilib.math.linalg.MatBuilder;
|
||||
import org.wpilib.math.linalg.Matrix;
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import org.wpilib.math.numbers.N1;
|
||||
import org.wpilib.math.numbers.N2;
|
||||
import org.wpilib.math.numbers.N3;
|
||||
@@ -22,9 +24,7 @@ import org.wpilib.math.system.plant.DCMotor;
|
||||
import org.wpilib.math.system.plant.LinearSystemId;
|
||||
import org.wpilib.math.trajectory.TrajectoryConfig;
|
||||
import org.wpilib.math.trajectory.TrajectoryGenerator;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.util.Nat;
|
||||
|
||||
class KalmanFilterTest {
|
||||
private static LinearSystem<N2, N1, N2> elevatorPlant;
|
||||
|
||||
@@ -8,7 +8,12 @@ import static org.junit.jupiter.api.Assertions.assertAll;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.Random;
|
||||
import java.util.TreeMap;
|
||||
import java.util.function.Function;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.geometry.Pose2d;
|
||||
import org.wpilib.math.geometry.Pose3d;
|
||||
import org.wpilib.math.geometry.Rotation2d;
|
||||
@@ -19,15 +24,10 @@ import org.wpilib.math.geometry.Translation3d;
|
||||
import org.wpilib.math.kinematics.ChassisSpeeds;
|
||||
import org.wpilib.math.kinematics.MecanumDriveKinematics;
|
||||
import org.wpilib.math.kinematics.MecanumDriveWheelPositions;
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import org.wpilib.math.trajectory.Trajectory;
|
||||
import org.wpilib.math.trajectory.TrajectoryConfig;
|
||||
import org.wpilib.math.trajectory.TrajectoryGenerator;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.Random;
|
||||
import java.util.TreeMap;
|
||||
import java.util.function.Function;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class MecanumDrivePoseEstimator3dTest {
|
||||
private static final double kEpsilon = 1e-9;
|
||||
|
||||
@@ -8,7 +8,12 @@ import static org.junit.jupiter.api.Assertions.assertAll;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.Random;
|
||||
import java.util.TreeMap;
|
||||
import java.util.function.Function;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.geometry.Pose2d;
|
||||
import org.wpilib.math.geometry.Rotation2d;
|
||||
import org.wpilib.math.geometry.Transform2d;
|
||||
@@ -16,15 +21,10 @@ import org.wpilib.math.geometry.Translation2d;
|
||||
import org.wpilib.math.kinematics.ChassisSpeeds;
|
||||
import org.wpilib.math.kinematics.MecanumDriveKinematics;
|
||||
import org.wpilib.math.kinematics.MecanumDriveWheelPositions;
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import org.wpilib.math.trajectory.Trajectory;
|
||||
import org.wpilib.math.trajectory.TrajectoryConfig;
|
||||
import org.wpilib.math.trajectory.TrajectoryGenerator;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.Random;
|
||||
import java.util.TreeMap;
|
||||
import java.util.function.Function;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class MecanumDrivePoseEstimatorTest {
|
||||
private static final double kEpsilon = 1e-9;
|
||||
|
||||
@@ -6,10 +6,10 @@ package org.wpilib.math.estimator;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.wpilib.math.linalg.MatBuilder;
|
||||
import org.wpilib.math.util.Nat;
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.linalg.MatBuilder;
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import org.wpilib.math.util.Nat;
|
||||
|
||||
class MerweScaledSigmaPointsTest {
|
||||
@Test
|
||||
|
||||
@@ -8,13 +8,15 @@ import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.wpilib.math.linalg.MatBuilder;
|
||||
import org.wpilib.math.linalg.Matrix;
|
||||
import org.wpilib.math.util.Nat;
|
||||
import org.wpilib.math.util.StateSpaceUtil;
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.geometry.Pose2d;
|
||||
import org.wpilib.math.geometry.Rotation2d;
|
||||
import org.wpilib.math.linalg.MatBuilder;
|
||||
import org.wpilib.math.linalg.Matrix;
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import org.wpilib.math.numbers.N1;
|
||||
import org.wpilib.math.numbers.N2;
|
||||
import org.wpilib.math.numbers.N3;
|
||||
@@ -27,10 +29,8 @@ import org.wpilib.math.system.plant.DCMotor;
|
||||
import org.wpilib.math.system.plant.LinearSystemId;
|
||||
import org.wpilib.math.trajectory.TrajectoryConfig;
|
||||
import org.wpilib.math.trajectory.TrajectoryGenerator;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.util.Nat;
|
||||
import org.wpilib.math.util.StateSpaceUtil;
|
||||
|
||||
class MerweUKFTest {
|
||||
private static Matrix<N5, N1> driveDynamics(Matrix<N5, N1> x, Matrix<N2, N1> u) {
|
||||
|
||||
@@ -8,13 +8,13 @@ import static org.junit.jupiter.api.Assertions.assertAll;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.linalg.MatBuilder;
|
||||
import org.wpilib.math.linalg.Matrix;
|
||||
import org.wpilib.math.util.Nat;
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import org.wpilib.math.linalg.Vector;
|
||||
import org.wpilib.math.numbers.N2;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.util.Nat;
|
||||
|
||||
class S3SigmaPointsTest {
|
||||
@Test
|
||||
|
||||
@@ -8,13 +8,15 @@ import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.wpilib.math.linalg.MatBuilder;
|
||||
import org.wpilib.math.linalg.Matrix;
|
||||
import org.wpilib.math.util.Nat;
|
||||
import org.wpilib.math.util.StateSpaceUtil;
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.geometry.Pose2d;
|
||||
import org.wpilib.math.geometry.Rotation2d;
|
||||
import org.wpilib.math.linalg.MatBuilder;
|
||||
import org.wpilib.math.linalg.Matrix;
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import org.wpilib.math.numbers.N1;
|
||||
import org.wpilib.math.numbers.N2;
|
||||
import org.wpilib.math.numbers.N3;
|
||||
@@ -27,10 +29,8 @@ import org.wpilib.math.system.plant.DCMotor;
|
||||
import org.wpilib.math.system.plant.LinearSystemId;
|
||||
import org.wpilib.math.trajectory.TrajectoryConfig;
|
||||
import org.wpilib.math.trajectory.TrajectoryGenerator;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.util.Nat;
|
||||
import org.wpilib.math.util.StateSpaceUtil;
|
||||
|
||||
class S3UKFTest {
|
||||
private static Matrix<N5, N1> driveDynamics(Matrix<N5, N1> x, Matrix<N2, N1> u) {
|
||||
|
||||
@@ -8,7 +8,12 @@ import static org.junit.jupiter.api.Assertions.assertAll;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.Random;
|
||||
import java.util.TreeMap;
|
||||
import java.util.function.Function;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.geometry.Pose2d;
|
||||
import org.wpilib.math.geometry.Pose3d;
|
||||
import org.wpilib.math.geometry.Rotation2d;
|
||||
@@ -19,15 +24,10 @@ import org.wpilib.math.geometry.Translation3d;
|
||||
import org.wpilib.math.kinematics.ChassisSpeeds;
|
||||
import org.wpilib.math.kinematics.SwerveDriveKinematics;
|
||||
import org.wpilib.math.kinematics.SwerveModulePosition;
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import org.wpilib.math.trajectory.Trajectory;
|
||||
import org.wpilib.math.trajectory.TrajectoryConfig;
|
||||
import org.wpilib.math.trajectory.TrajectoryGenerator;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.Random;
|
||||
import java.util.TreeMap;
|
||||
import java.util.function.Function;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class SwerveDrivePoseEstimator3dTest {
|
||||
private static final double kEpsilon = 1e-9;
|
||||
|
||||
@@ -8,7 +8,12 @@ import static org.junit.jupiter.api.Assertions.assertAll;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.Random;
|
||||
import java.util.TreeMap;
|
||||
import java.util.function.Function;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.geometry.Pose2d;
|
||||
import org.wpilib.math.geometry.Rotation2d;
|
||||
import org.wpilib.math.geometry.Transform2d;
|
||||
@@ -16,15 +21,10 @@ import org.wpilib.math.geometry.Translation2d;
|
||||
import org.wpilib.math.kinematics.ChassisSpeeds;
|
||||
import org.wpilib.math.kinematics.SwerveDriveKinematics;
|
||||
import org.wpilib.math.kinematics.SwerveModulePosition;
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import org.wpilib.math.trajectory.Trajectory;
|
||||
import org.wpilib.math.trajectory.TrajectoryConfig;
|
||||
import org.wpilib.math.trajectory.TrajectoryGenerator;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.Random;
|
||||
import java.util.TreeMap;
|
||||
import java.util.function.Function;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class SwerveDrivePoseEstimatorTest {
|
||||
private static final double kEpsilon = 1e-9;
|
||||
|
||||
@@ -9,10 +9,10 @@ import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertSame;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.wpilib.util.WPIUtilJNI;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.util.WPIUtilJNI;
|
||||
|
||||
class DebouncerTest {
|
||||
@BeforeEach
|
||||
|
||||
@@ -7,10 +7,10 @@ package org.wpilib.math.filter;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.wpilib.util.WPIUtilJNI;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.util.WPIUtilJNI;
|
||||
|
||||
class SlewRateLimiterTest {
|
||||
@BeforeEach
|
||||
|
||||
@@ -6,8 +6,8 @@ package org.wpilib.math.geometry;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.wpilib.math.util.Units;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.util.Units;
|
||||
|
||||
class CoordinateSystemTest {
|
||||
private void checkPose3dConvert(
|
||||
|
||||
@@ -8,9 +8,9 @@ import static org.junit.jupiter.api.Assertions.assertAll;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotEquals;
|
||||
|
||||
import org.wpilib.units.Units;
|
||||
import java.util.List;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.units.Units;
|
||||
|
||||
class Pose2dTest {
|
||||
private static final double kEpsilon = 1E-9;
|
||||
|
||||
@@ -9,10 +9,10 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotEquals;
|
||||
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import org.wpilib.math.util.Units;
|
||||
import java.util.List;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import org.wpilib.math.util.Units;
|
||||
|
||||
class Pose3dTest {
|
||||
private static final double kEpsilon = 1E-9;
|
||||
|
||||
@@ -8,8 +8,8 @@ import static org.junit.jupiter.api.Assertions.assertAll;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotEquals;
|
||||
|
||||
import org.wpilib.math.util.Units;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.util.Units;
|
||||
|
||||
class QuaternionTest {
|
||||
@Test
|
||||
|
||||
@@ -8,8 +8,8 @@ import static org.junit.jupiter.api.Assertions.assertAll;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotEquals;
|
||||
|
||||
import org.wpilib.units.Units;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.units.Units;
|
||||
|
||||
class Rotation2dTest {
|
||||
private static final double kEpsilon = 1E-9;
|
||||
|
||||
@@ -9,12 +9,12 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.linalg.MatBuilder;
|
||||
import org.wpilib.math.linalg.Matrix;
|
||||
import org.wpilib.math.util.Nat;
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import org.wpilib.math.util.Nat;
|
||||
import org.wpilib.math.util.Units;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class Rotation3dTest {
|
||||
private static final double kEpsilon = 1E-9;
|
||||
|
||||
@@ -6,8 +6,8 @@ package org.wpilib.math.geometry;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.wpilib.units.Units;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.units.Units;
|
||||
|
||||
class Transform2dTest {
|
||||
private static final double kEpsilon = 1E-9;
|
||||
|
||||
@@ -6,9 +6,9 @@ package org.wpilib.math.geometry;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import org.wpilib.math.util.Units;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class Transform3dTest {
|
||||
@Test
|
||||
|
||||
@@ -8,9 +8,9 @@ import static org.junit.jupiter.api.Assertions.assertAll;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotEquals;
|
||||
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import java.util.List;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
|
||||
class Translation2dTest {
|
||||
private static final double kEpsilon = 1E-9;
|
||||
|
||||
@@ -4,15 +4,15 @@
|
||||
|
||||
package org.wpilib.math.geometry;
|
||||
|
||||
import static org.wpilib.units.Units.Inches;
|
||||
import static org.junit.jupiter.api.Assertions.assertAll;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotEquals;
|
||||
import static org.wpilib.units.Units.Inches;
|
||||
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import org.wpilib.math.util.Units;
|
||||
import java.util.List;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import org.wpilib.math.util.Units;
|
||||
|
||||
class Translation3dTest {
|
||||
private static final double kEpsilon = 1E-9;
|
||||
|
||||
@@ -7,9 +7,9 @@ package org.wpilib.math.geometry;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import org.wpilib.math.util.Units;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class Twist3dTest {
|
||||
@Test
|
||||
|
||||
@@ -6,11 +6,11 @@ package org.wpilib.math.geometry.proto;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.geometry.Ellipse2d;
|
||||
import org.wpilib.math.geometry.Pose2d;
|
||||
import org.wpilib.math.geometry.Rotation2d;
|
||||
import org.wpilib.math.proto.Geometry2D.ProtobufEllipse2d;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class Ellipse2dProtoTest {
|
||||
private static final Ellipse2d DATA =
|
||||
|
||||
@@ -6,11 +6,11 @@ package org.wpilib.math.geometry.proto;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.geometry.Pose2d;
|
||||
import org.wpilib.math.geometry.Rotation2d;
|
||||
import org.wpilib.math.geometry.Translation2d;
|
||||
import org.wpilib.math.proto.Geometry2D.ProtobufPose2d;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class Pose2dProtoTest {
|
||||
private static final Pose2d DATA =
|
||||
|
||||
@@ -6,12 +6,12 @@ package org.wpilib.math.geometry.proto;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.geometry.Pose3d;
|
||||
import org.wpilib.math.geometry.Quaternion;
|
||||
import org.wpilib.math.geometry.Rotation3d;
|
||||
import org.wpilib.math.geometry.Translation3d;
|
||||
import org.wpilib.math.proto.Geometry3D.ProtobufPose3d;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class Pose3dProtoTest {
|
||||
private static final Pose3d DATA =
|
||||
|
||||
@@ -6,9 +6,9 @@ package org.wpilib.math.geometry.proto;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.geometry.Quaternion;
|
||||
import org.wpilib.math.proto.Geometry3D.ProtobufQuaternion;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class QuaternionProtoTest {
|
||||
private static final Quaternion DATA = new Quaternion(1.1, 0.191, 35.04, 19.1);
|
||||
|
||||
@@ -6,11 +6,11 @@ package org.wpilib.math.geometry.proto;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.geometry.Pose2d;
|
||||
import org.wpilib.math.geometry.Rectangle2d;
|
||||
import org.wpilib.math.geometry.Rotation2d;
|
||||
import org.wpilib.math.proto.Geometry2D.ProtobufRectangle2d;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class Rectangle2dProtoTest {
|
||||
private static final Rectangle2d DATA =
|
||||
|
||||
@@ -6,9 +6,9 @@ package org.wpilib.math.geometry.proto;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.geometry.Rotation2d;
|
||||
import org.wpilib.math.proto.Geometry2D.ProtobufRotation2d;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class Rotation2dProtoTest {
|
||||
private static final Rotation2d DATA = new Rotation2d(1.91);
|
||||
|
||||
@@ -6,10 +6,10 @@ package org.wpilib.math.geometry.proto;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.geometry.Quaternion;
|
||||
import org.wpilib.math.geometry.Rotation3d;
|
||||
import org.wpilib.math.proto.Geometry3D.ProtobufRotation3d;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class Rotation3dProtoTest {
|
||||
private static final Rotation3d DATA = new Rotation3d(new Quaternion(2.29, 0.191, 0.191, 17.4));
|
||||
|
||||
@@ -6,11 +6,11 @@ package org.wpilib.math.geometry.proto;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.geometry.Rotation2d;
|
||||
import org.wpilib.math.geometry.Transform2d;
|
||||
import org.wpilib.math.geometry.Translation2d;
|
||||
import org.wpilib.math.proto.Geometry2D.ProtobufTransform2d;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class Transform2dProtoTest {
|
||||
private static final Transform2d DATA =
|
||||
|
||||
@@ -6,12 +6,12 @@ package org.wpilib.math.geometry.proto;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.geometry.Quaternion;
|
||||
import org.wpilib.math.geometry.Rotation3d;
|
||||
import org.wpilib.math.geometry.Transform3d;
|
||||
import org.wpilib.math.geometry.Translation3d;
|
||||
import org.wpilib.math.proto.Geometry3D.ProtobufTransform3d;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class Transform3dProtoTest {
|
||||
private static final Transform3d DATA =
|
||||
|
||||
@@ -6,9 +6,9 @@ package org.wpilib.math.geometry.proto;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.geometry.Translation2d;
|
||||
import org.wpilib.math.proto.Geometry2D.ProtobufTranslation2d;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class Translation2dProtoTest {
|
||||
private static final Translation2d DATA = new Translation2d(3.504, 22.9);
|
||||
|
||||
@@ -6,9 +6,9 @@ package org.wpilib.math.geometry.proto;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.geometry.Translation3d;
|
||||
import org.wpilib.math.proto.Geometry3D.ProtobufTranslation3d;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class Translation3dProtoTest {
|
||||
private static final Translation3d DATA = new Translation3d(35.04, 22.9, 3.504);
|
||||
|
||||
@@ -6,9 +6,9 @@ package org.wpilib.math.geometry.proto;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.geometry.Twist2d;
|
||||
import org.wpilib.math.proto.Geometry2D.ProtobufTwist2d;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class Twist2dProtoTest {
|
||||
private static final Twist2d DATA = new Twist2d(2.29, 35.04, 35.04);
|
||||
|
||||
@@ -6,9 +6,9 @@ package org.wpilib.math.geometry.proto;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.geometry.Twist3d;
|
||||
import org.wpilib.math.proto.Geometry3D.ProtobufTwist3d;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class Twist3dProtoTest {
|
||||
private static final Twist3d DATA = new Twist3d(1.1, 2.29, 35.04, 0.174, 19.1, 4.4);
|
||||
|
||||
@@ -6,12 +6,12 @@ package org.wpilib.math.geometry.struct;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.wpilib.math.geometry.Ellipse2d;
|
||||
import org.wpilib.math.geometry.Pose2d;
|
||||
import org.wpilib.math.geometry.Rotation2d;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.geometry.Ellipse2d;
|
||||
import org.wpilib.math.geometry.Pose2d;
|
||||
import org.wpilib.math.geometry.Rotation2d;
|
||||
|
||||
class Ellipse2dStructTest {
|
||||
private static final Ellipse2d DATA =
|
||||
|
||||
@@ -6,12 +6,12 @@ package org.wpilib.math.geometry.struct;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.wpilib.math.geometry.Pose2d;
|
||||
import org.wpilib.math.geometry.Rotation2d;
|
||||
import org.wpilib.math.geometry.Translation2d;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.geometry.Pose2d;
|
||||
import org.wpilib.math.geometry.Rotation2d;
|
||||
import org.wpilib.math.geometry.Translation2d;
|
||||
|
||||
class Pose2dStructTest {
|
||||
private static final Pose2d DATA =
|
||||
|
||||
@@ -6,13 +6,13 @@ package org.wpilib.math.geometry.struct;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.geometry.Pose3d;
|
||||
import org.wpilib.math.geometry.Quaternion;
|
||||
import org.wpilib.math.geometry.Rotation3d;
|
||||
import org.wpilib.math.geometry.Translation3d;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class Pose3dStructTest {
|
||||
private static final Pose3d DATA =
|
||||
|
||||
@@ -6,10 +6,10 @@ package org.wpilib.math.geometry.struct;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.wpilib.math.geometry.Quaternion;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.geometry.Quaternion;
|
||||
|
||||
class QuaternionStructTest {
|
||||
private static final Quaternion DATA = new Quaternion(1.1, 0.191, 35.04, 19.1);
|
||||
|
||||
@@ -6,12 +6,12 @@ package org.wpilib.math.geometry.struct;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.wpilib.math.geometry.Pose2d;
|
||||
import org.wpilib.math.geometry.Rectangle2d;
|
||||
import org.wpilib.math.geometry.Rotation2d;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.geometry.Pose2d;
|
||||
import org.wpilib.math.geometry.Rectangle2d;
|
||||
import org.wpilib.math.geometry.Rotation2d;
|
||||
|
||||
class Rectangle2dStructTest {
|
||||
private static final Rectangle2d DATA =
|
||||
|
||||
@@ -6,10 +6,10 @@ package org.wpilib.math.geometry.struct;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.wpilib.math.geometry.Rotation2d;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.geometry.Rotation2d;
|
||||
|
||||
class Rotation2dStructTest {
|
||||
private static final Rotation2d DATA = new Rotation2d(1.91);
|
||||
|
||||
@@ -6,11 +6,11 @@ package org.wpilib.math.geometry.struct;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.wpilib.math.geometry.Quaternion;
|
||||
import org.wpilib.math.geometry.Rotation3d;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.geometry.Quaternion;
|
||||
import org.wpilib.math.geometry.Rotation3d;
|
||||
|
||||
class Rotation3dStructTest {
|
||||
private static final Rotation3d DATA = new Rotation3d(new Quaternion(2.29, 0.191, 0.191, 17.4));
|
||||
|
||||
@@ -6,12 +6,12 @@ package org.wpilib.math.geometry.struct;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.wpilib.math.geometry.Rotation2d;
|
||||
import org.wpilib.math.geometry.Transform2d;
|
||||
import org.wpilib.math.geometry.Translation2d;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.geometry.Rotation2d;
|
||||
import org.wpilib.math.geometry.Transform2d;
|
||||
import org.wpilib.math.geometry.Translation2d;
|
||||
|
||||
class Transform2dStructTest {
|
||||
private static final Transform2d DATA =
|
||||
|
||||
@@ -6,13 +6,13 @@ package org.wpilib.math.geometry.struct;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.geometry.Quaternion;
|
||||
import org.wpilib.math.geometry.Rotation3d;
|
||||
import org.wpilib.math.geometry.Transform3d;
|
||||
import org.wpilib.math.geometry.Translation3d;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class Transform3dStructTest {
|
||||
private static final Transform3d DATA =
|
||||
|
||||
@@ -6,10 +6,10 @@ package org.wpilib.math.geometry.struct;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.wpilib.math.geometry.Translation2d;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.geometry.Translation2d;
|
||||
|
||||
class Translation2dStructTest {
|
||||
private static final Translation2d DATA = new Translation2d(3.504, 22.9);
|
||||
|
||||
@@ -6,10 +6,10 @@ package org.wpilib.math.geometry.struct;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.wpilib.math.geometry.Translation3d;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.geometry.Translation3d;
|
||||
|
||||
class Translation3dStructTest {
|
||||
private static final Translation3d DATA = new Translation3d(35.04, 22.9, 3.504);
|
||||
|
||||
@@ -6,10 +6,10 @@ package org.wpilib.math.geometry.struct;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.wpilib.math.geometry.Twist2d;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.geometry.Twist2d;
|
||||
|
||||
class Twist2dStructTest {
|
||||
private static final Twist2d DATA = new Twist2d(2.29, 35.04, 35.04);
|
||||
|
||||
@@ -6,10 +6,10 @@ package org.wpilib.math.geometry.struct;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.wpilib.math.geometry.Twist3d;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.geometry.Twist3d;
|
||||
|
||||
class Twist3dStructTest {
|
||||
private static final Twist3d DATA = new Twist3d(1.1, 2.29, 35.04, 0.174, 19.1, 4.4);
|
||||
|
||||
@@ -6,9 +6,9 @@ package org.wpilib.math.interpolation;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.geometry.Pose2d;
|
||||
import org.wpilib.math.geometry.Rotation2d;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class TimeInterpolatableBufferTest {
|
||||
@Test
|
||||
|
||||
@@ -4,15 +4,15 @@
|
||||
|
||||
package org.wpilib.math.kinematics;
|
||||
|
||||
import static org.wpilib.units.Units.InchesPerSecond;
|
||||
import static org.wpilib.units.Units.RPM;
|
||||
import static org.junit.jupiter.api.Assertions.assertAll;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.wpilib.units.Units.InchesPerSecond;
|
||||
import static org.wpilib.units.Units.RPM;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.geometry.Pose2d;
|
||||
import org.wpilib.math.geometry.Rotation2d;
|
||||
import org.wpilib.math.geometry.Twist2d;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class ChassisSpeedsTest {
|
||||
private static final double kEpsilon = 1E-9;
|
||||
|
||||
@@ -7,10 +7,10 @@ package org.wpilib.math.kinematics;
|
||||
import static org.junit.jupiter.api.Assertions.assertAll;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.geometry.Pose3d;
|
||||
import org.wpilib.math.geometry.Rotation3d;
|
||||
import org.wpilib.math.util.Units;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class DifferentialDriveOdometry3dTest {
|
||||
private static final double kEpsilon = 1E-9;
|
||||
|
||||
@@ -7,9 +7,9 @@ package org.wpilib.math.kinematics;
|
||||
import static org.junit.jupiter.api.Assertions.assertAll;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.geometry.Pose2d;
|
||||
import org.wpilib.math.geometry.Rotation2d;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class DifferentialDriveOdometryTest {
|
||||
private static final double kEpsilon = 1E-9;
|
||||
|
||||
@@ -7,8 +7,8 @@ package org.wpilib.math.kinematics;
|
||||
import static org.junit.jupiter.api.Assertions.assertAll;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.wpilib.math.geometry.Translation2d;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.geometry.Translation2d;
|
||||
|
||||
class MecanumDriveKinematicsTest {
|
||||
private static final double kEpsilon = 1E-9;
|
||||
|
||||
@@ -7,6 +7,9 @@ package org.wpilib.math.kinematics;
|
||||
import static org.junit.jupiter.api.Assertions.assertAll;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.geometry.Pose2d;
|
||||
import org.wpilib.math.geometry.Pose3d;
|
||||
import org.wpilib.math.geometry.Rotation2d;
|
||||
@@ -16,9 +19,6 @@ import org.wpilib.math.geometry.Translation3d;
|
||||
import org.wpilib.math.trajectory.TrajectoryConfig;
|
||||
import org.wpilib.math.trajectory.TrajectoryGenerator;
|
||||
import org.wpilib.math.util.Units;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class MecanumDriveOdometry3dTest {
|
||||
private final Translation2d m_fl = new Translation2d(12, 12);
|
||||
|
||||
@@ -7,14 +7,14 @@ package org.wpilib.math.kinematics;
|
||||
import static org.junit.jupiter.api.Assertions.assertAll;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.geometry.Pose2d;
|
||||
import org.wpilib.math.geometry.Rotation2d;
|
||||
import org.wpilib.math.geometry.Translation2d;
|
||||
import org.wpilib.math.trajectory.TrajectoryConfig;
|
||||
import org.wpilib.math.trajectory.TrajectoryGenerator;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class MecanumDriveOdometryTest {
|
||||
private final Translation2d m_fl = new Translation2d(12, 12);
|
||||
|
||||
@@ -7,9 +7,9 @@ package org.wpilib.math.kinematics;
|
||||
import static org.junit.jupiter.api.Assertions.assertAll;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.geometry.Rotation2d;
|
||||
import org.wpilib.math.geometry.Translation2d;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class SwerveDriveKinematicsTest {
|
||||
private static final double kEpsilon = 1E-9;
|
||||
|
||||
@@ -7,6 +7,9 @@ package org.wpilib.math.kinematics;
|
||||
import static org.junit.jupiter.api.Assertions.assertAll;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.geometry.Pose2d;
|
||||
import org.wpilib.math.geometry.Pose3d;
|
||||
import org.wpilib.math.geometry.Rotation2d;
|
||||
@@ -16,9 +19,6 @@ import org.wpilib.math.geometry.Translation3d;
|
||||
import org.wpilib.math.trajectory.TrajectoryConfig;
|
||||
import org.wpilib.math.trajectory.TrajectoryGenerator;
|
||||
import org.wpilib.math.util.Units;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class SwerveDriveOdometry3dTest {
|
||||
private final Translation2d m_fl = new Translation2d(12, 12);
|
||||
|
||||
@@ -7,14 +7,14 @@ package org.wpilib.math.kinematics;
|
||||
import static org.junit.jupiter.api.Assertions.assertAll;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.geometry.Pose2d;
|
||||
import org.wpilib.math.geometry.Rotation2d;
|
||||
import org.wpilib.math.geometry.Translation2d;
|
||||
import org.wpilib.math.trajectory.TrajectoryConfig;
|
||||
import org.wpilib.math.trajectory.TrajectoryGenerator;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class SwerveDriveOdometryTest {
|
||||
private final Translation2d m_fl = new Translation2d(12, 12);
|
||||
|
||||
@@ -7,8 +7,8 @@ package org.wpilib.math.kinematics;
|
||||
import static org.junit.jupiter.api.Assertions.assertAll;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.wpilib.math.geometry.Rotation2d;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.geometry.Rotation2d;
|
||||
|
||||
class SwerveModuleStateTest {
|
||||
private static final double kEpsilon = 1E-9;
|
||||
|
||||
@@ -6,9 +6,9 @@ package org.wpilib.math.kinematics.proto;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.kinematics.ChassisSpeeds;
|
||||
import org.wpilib.math.proto.Kinematics.ProtobufChassisSpeeds;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class ChassisSpeedsProtoTest {
|
||||
private static final ChassisSpeeds DATA = new ChassisSpeeds(2.29, 2.2, 0.3504);
|
||||
|
||||
@@ -6,9 +6,9 @@ package org.wpilib.math.kinematics.proto;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.kinematics.DifferentialDriveKinematics;
|
||||
import org.wpilib.math.proto.Kinematics.ProtobufDifferentialDriveKinematics;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class DifferentialDriveKinematicsProtoTest {
|
||||
private static final DifferentialDriveKinematics DATA = new DifferentialDriveKinematics(1.74);
|
||||
|
||||
@@ -6,9 +6,9 @@ package org.wpilib.math.kinematics.proto;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.kinematics.DifferentialDriveWheelSpeeds;
|
||||
import org.wpilib.math.proto.Kinematics.ProtobufDifferentialDriveWheelSpeeds;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class DifferentialDriveWheelSpeedsProtoTest {
|
||||
private static final DifferentialDriveWheelSpeeds DATA =
|
||||
|
||||
@@ -6,10 +6,10 @@ package org.wpilib.math.kinematics.proto;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.geometry.Translation2d;
|
||||
import org.wpilib.math.kinematics.MecanumDriveKinematics;
|
||||
import org.wpilib.math.proto.Kinematics.ProtobufMecanumDriveKinematics;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class MecanumDriveKinematicsProtoTest {
|
||||
private static final MecanumDriveKinematics DATA =
|
||||
|
||||
@@ -6,9 +6,9 @@ package org.wpilib.math.kinematics.proto;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.kinematics.MecanumDriveWheelPositions;
|
||||
import org.wpilib.math.proto.Kinematics.ProtobufMecanumDriveWheelPositions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class MecanumDriveWheelPositionsProtoTest {
|
||||
private static final MecanumDriveWheelPositions DATA =
|
||||
|
||||
@@ -6,9 +6,9 @@ package org.wpilib.math.kinematics.proto;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.kinematics.MecanumDriveWheelSpeeds;
|
||||
import org.wpilib.math.proto.Kinematics.ProtobufMecanumDriveWheelSpeeds;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class MecanumDriveWheelSpeedsProtoTest {
|
||||
private static final MecanumDriveWheelSpeeds DATA =
|
||||
|
||||
@@ -6,10 +6,10 @@ package org.wpilib.math.kinematics.proto;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
|
||||
|
||||
import org.wpilib.ProtoTestBase;
|
||||
import org.wpilib.math.geometry.Translation2d;
|
||||
import org.wpilib.math.kinematics.SwerveDriveKinematics;
|
||||
import org.wpilib.math.proto.Kinematics.ProtobufSwerveDriveKinematics;
|
||||
import org.wpilib.ProtoTestBase;
|
||||
|
||||
@SuppressWarnings("PMD.TestClassWithoutTestCases")
|
||||
class SwerveDriveKinematicsProtoTest
|
||||
|
||||
@@ -6,10 +6,10 @@ package org.wpilib.math.kinematics.proto;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.geometry.Rotation2d;
|
||||
import org.wpilib.math.kinematics.SwerveModulePosition;
|
||||
import org.wpilib.math.proto.Kinematics.ProtobufSwerveModulePosition;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class SwerveModulePositionProtoTest {
|
||||
private static final SwerveModulePosition DATA =
|
||||
|
||||
@@ -6,10 +6,10 @@ package org.wpilib.math.kinematics.proto;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.geometry.Rotation2d;
|
||||
import org.wpilib.math.kinematics.SwerveModuleState;
|
||||
import org.wpilib.math.proto.Kinematics.ProtobufSwerveModuleState;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class SwerveModuleStateProtoTest {
|
||||
private static final SwerveModuleState DATA = new SwerveModuleState(22.9, new Rotation2d(3.3));
|
||||
|
||||
@@ -6,10 +6,10 @@ package org.wpilib.math.kinematics.struct;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.wpilib.math.kinematics.ChassisSpeeds;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.kinematics.ChassisSpeeds;
|
||||
|
||||
class ChassisSpeedsStructTest {
|
||||
private static final ChassisSpeeds DATA = new ChassisSpeeds(2.29, 2.2, 0.3504);
|
||||
|
||||
@@ -6,10 +6,10 @@ package org.wpilib.math.kinematics.struct;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.wpilib.math.kinematics.DifferentialDriveKinematics;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.kinematics.DifferentialDriveKinematics;
|
||||
|
||||
class DifferentialDriveKinematicsStructTest {
|
||||
private static final DifferentialDriveKinematics DATA = new DifferentialDriveKinematics(1.74);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user