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

Design a command hierarchy for drivetrain commands #24

Open
jkleiber opened this issue Dec 24, 2022 · 2 comments
Open

Design a command hierarchy for drivetrain commands #24

jkleiber opened this issue Dec 24, 2022 · 2 comments
Assignees
Labels
design Create a design for something

Comments

@jkleiber
Copy link
Contributor

Summary
We currently have an assortment of drivetrain commands with some duplicate functionality. This is mostly due to the rush of build season distracting from good engineering design process. Thus, it would be good for us to figure out a design in pre-season and go through the design exercise now, so we can be in the practice for during build season.

Work to do

  • Propose a new set of drivetrain commands that have non-duplicate useful function.
  • Do this all in the context of the swerve drive, we can leave the old code how it is for now.

Verification

  • Consensus is reached about the new design

FYI: @danielbrownmsm assigned to you for awareness

@jkleiber jkleiber added the design Create a design for something label Dec 24, 2022
@danielbrownmsm
Copy link
Collaborator

So at a minimum I think we need a Tele-Op drive command and an autonomous drive command. Last year we had:

  • drive distance (with an overload for max output)
  • drive distance at a given output (seems like basically the same thing)
  • turbo mode tele-op (cube inputs, reduce open loop ramp rate, and set max output to 1)
  • drive at a given speed for a set time (because something was up with the gyro and encoders so went back to a simple auto)
  • slow mode tele-op (divide inputs by 3)
  • standard tele-op drive command
  • turn to heading auto command

which, especially seeing as I think we’re going to use WPILib’s swerve drive support for pathing and stuff, can probably be reduced to:

  • tele-op drive command, with overloads for turbo and slow modes.
  • auto drive command, that takes a Translation2D and Rotation2D and then uses WPILib’s stuff to get necessary speeds. Also uses the SwerveOdometry class to figure out if we’re at the setpoint. Probably overloads for max output and open loop ramp rate

@danielbrownmsm
Copy link
Collaborator

Also tele-op should have overload for field oriented drive or robot oriented drive

@danielbrownmsm danielbrownmsm added this to the Enhanced Functionality milestone Dec 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design Create a design for something
Projects
None yet
Development

No branches or pull requests

2 participants