Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swerve Logging (networktables) #6

Open
ErikCald opened this issue Sep 27, 2023 · 1 comment
Open

Swerve Logging (networktables) #6

ErikCald opened this issue Sep 27, 2023 · 1 comment
Labels
difficulty:low Low difficulty priority:high High priority Swerve Swerve drive

Comments

@ErikCald
Copy link
Collaborator

It is very important to send data to the networktables so we can view it in real time and debug or tune the robot. Also, we can enable the DataLogManager to log all networktable values into a log file on a usb stick. This will be very helpful to know what happened during matches when something went wrong. Though, if a piece of data should be logged but doens't need to use networktables, that can also be done with a DoubleLogEntry object (or other types) to avoid consuming bandwidth on the network.

Another part of this will be reading networktable entries and updating specific constants in code. This is specially for the PID values of swerve (drive and steering), the kS, kV and kA values of the swerve drive motor, and an offset value between the cancoder and steer encoder. We can use glass/shuffleboard/outlineviewer to set networktable entries allowing us to update these constants very quickly, making tuning go much faster.

@ErikCald
Copy link
Collaborator Author

Things to log with swerve:

  • Desired angle of the module
  • Desired speed of the module
  • Measured angle of the module
  • Measured speed of the module
  • Difference between measured and desired angle of the module
  • Difference between measured and desired speed of the module
  • Cancoder measured position
  • A boolean whether the steer encoder and cancoder are aligned (more complex than it seems, if cancoder=0deg and steer=720deg that is considered aligned)
  • The difference between cancoder and steer encoder (accounting for the same thing as above)
  • SwerveModuleState for AdvantageScope, see information here and can ask Erik about it.
  • Odometry pose (might consider 3 seperate entries for X, Y, Rot AND 1 array entry for AdvantageScope)
  • Raw gyro value

@ErikCald ErikCald added Swerve Swerve drive priority:high High priority difficulty:low Low difficulty labels Sep 27, 2023
@ErikCald ErikCald mentioned this issue Nov 4, 2023
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty:low Low difficulty priority:high High priority Swerve Swerve drive
Projects
None yet
Development

No branches or pull requests

1 participant