Skip to content

Commit

Permalink
Check if SwerveDriveKinematics<5> works
Browse files Browse the repository at this point in the history
  • Loading branch information
KangarooKoala committed Nov 29, 2023
1 parent 5f71828 commit e2a26a9
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@ class SwerveDriveKinematicsTest : public ::testing::Test {
SwerveDriveKinematics<4> m_kinematics{m_fl, m_fr, m_bl, m_br};
};

TEST_F(SwerveDriveKinematicsTest, Desaturate5Wheels) {
SwerveModuleState state1{1.0_mps, 0_deg};
SwerveModuleState state2{1.0_mps, 0_deg};
SwerveModuleState state3{1.0_mps, 0_deg};
SwerveModuleState state4{1.0_mps, 0_deg};
SwerveModuleState state5{1.0_mps, 0_deg};
wpi::array<SwerveModuleState, 5> arr{state1, state2, state3, state4, state5};
SwerveDriveKinematics<5>::DesaturateWheelSpeeds(&arr, 1.0_mps);
}

TEST_F(SwerveDriveKinematicsTest, StraightLineInverseKinematics) {
ChassisSpeeds speeds{5.0_mps, 0.0_mps, 0.0_rad_per_s};

Expand Down

0 comments on commit e2a26a9

Please sign in to comment.