This repository has been archived by the owner on Aug 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Swerve_Drive_Odometry
spamtactics edited this page Oct 13, 2023
·
8 revisions
What is odometry? Odometry is the process of using data from sensors to allow the robot to know where its current position is. For example, if the robot knows that it is moving at bearing 0 at 1m/s. After 1s, it must therefore know that it is currently at coordinate (0,1). (this is assuming that bearing 0 is corresponding to the x-axis) How to set up odometry in the code? First, intialise a SwerveDriveKinemtics class, a list of all SwerveModulePosition classes of the motors. Do note that the gyro angle will have to be provided by your IMU's gyroscope. Input the necessary variables to create a new SwerveDriveOdometry class. What are the functions of SwerveDriveOdometry: