Skip to content
Zach4346074545723 edited this page Nov 7, 2024 · 16 revisions

links

found this page, looked like it might have some useful sources for control loop implementation:

https://www.chiefdelphi.com/t/anyone-use-a-custom-pid-loop-with-feed-forward-in-2019/359040

I think this will be very important to set up this year:

https://docs.wpilib.org/en/stable/docs/software/dashboards/advantagescope.html

roadmap

  1. figure out why this page wont look the way I want

  2. get python deployed to the robot (print("hello world"))

  3. get a motor moving

  4. get sensor readings working
    3a. get data from an encoder
    3b. ensure that the data is converted to the correct units using a wpilib Rotation2D
    3c. zero the encoders, DONT do this by adding a local constant to the encoder output, instead be tune it using Phoenix Tuner X
    3d. make sure that the bevel gears in the zeroed configuration are all facing the same direction
    3e. double check that the data is what you expect, eg. when the wheels turn to face the same direction, the values are roughly the same\

  5. set up advantage scope / logging tools
    4a. this one is new for us this year, there will be some hurdles to climb over\

  6. set up basic closed loop control for the swerve module turn motors
    5a. pretty sure that the spark maxes have a built in PIDF controller, so maybe use that if it will make our lives easy otherwise use WPILib's controller\

  7. use the measurements from the logging tools to analyze the motion profile & error/time of the turn motor

  8. tune the swerve drive module turn motors

  9. find out what steps Zach forgot

?. set up open loop and closed loop control for the drive motors ?a. this is where advantage scope should come in handy ?b. the SwerveModule class will receive speeds in the form of a SwerveModuleState which has speed in m/s 8ba. the ?. create a structure (aka subsystem) to manage our 4 swerve modules ?a. make sure that the subsystem takes in a ChassisSpeeds and then sets the motors to do what we expect