I am trying to build a swerve drive(first time in team history) and while building the odometer I encountered a problem
private final SwerveDriveOdometry odometer = new SwerveDriveOdometry(DriveConstants.kDriveKinematics,
new Rotation2d(0));
when I wrote this code to setup the odometer I was informed that I had to add SwerveModuleStates. How could I add the swerve module states.
amb
2
It wants a SwerveModulePosition[]
array, use readings from your motors to construct the SwerveModulePositions
how do I get those readings
Have you tried looking into Swerve Libraries, like CTRE Tuner X or YAGSL?
From the encoders on each of your wheels.
system
Closed
6
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.