Commit d0b352a
Feat/arm rewrite (#50)
* recorded logs from testing
* tried to tune the PID constants, and fixed the right_back steer offset
* parameterized max steer output
* increased tele op swerve power and changed steer axis to work with the gamepad
* parameterized max steer output
* if the angle we need to rotate is more than 180 degrees, instead of rotating the wheel, simply reverse the direction the drive wheel spins in tele-op
* added Manual Arm Command and fixed errors
* added one of the relative encoders for the arm motors, and made ProcessIO actually get called in ArmIO
* added logging for part of the arm
* fixed joystick stuff for second driver
* added relative encoder to Sensors
* arm logs (the oldest one should be with additional weight, the others are bare)
* added button bindings
* added teleop commands to branch
* more logs
* scale back to half power in tele op
* add a 'control decay' as a low-pass filter on the stick input in tele op
* fix AutoSwerveCommand to not use stupid freaking WPILib units library and instead just a generic struct
* fixed errors
* fixed errors
* raised turn power to x3 from x2
* lowered control decay to 0.1
TODO: parameterize these
* removed old logs, got some new ones
* moved some stuff in the shuffleboard layout
* added a WrapAngle() function to reduce repetitive code
* make drive_pid actually do something
also worked on auton a bunch, and we can actually drive! and not kill somebody!
* burned the WPILib swerve support bridge, we're roughin' it on our own
* add back an internal position to SwerveDrive
* fixed errors
* restore updating swerve module offset and steer encoder
* added arm tests
* added arm PID values to parameterss.toml
* fixed errors in arm unit tests
* fixed some of swerve_drive_test
* added absolute encoder to arm
* added another arm command and fixed other files
* angle wrapping fix for diagonals, doesn't really work
* fixed errors and renamed absolute encoder
* full power on the tele-op swerve
* steer motors in brake, drive motors in coast
* try to re-fix strafe inverting
* changed some values to see if they actually do anything
* logs
* added arm commands and mimit switch
* changed the swerve module invert logic and now it works pretty good, and Eli likes it
* logs
* added limits and other aditions to ArmIo.cpp
* reduce arm soft limits to +/- 110 degrees instead of 180 degrees
* removed excess logs
* fix warnings from unit tests
* added shuffleboard stuff
* fleshed out claw subsystem with actual functionality
* claw parameters
* raised power limits, fixed arm encoder wrap around and lowered arm soft limits
* shuffleboard stuff for arm
* PID coefficient tuning
* don't move the arm unless a setpoint has been set yet (like last year's intake code)
* logs
* remove logs
* add unit tests back in
* fix unit tests
* move the PID stuffin Periodic() for arm into a separate AutoControl() method to keep switch-case clean per Justin's comment in #43
* commented Claw subsystem
* indendtation fixes
* parameterized some magic numbers that were in the ArmIO code
* moved button bindings to ConfigureButtonBindings where they should be
* added buttons for everything
* added Claw to RobotContainer
* fixed and init'ed Claw hardware
* changed button bindings
* manual claw command, changed ArmMode to be ControlMode for a universal enum, added manual claw to the RobotContainer
* okay, we don't need *this* many logs
* limit setpoint of arm stuff to actual hardware setpoints
* make RobotContainer::ConfigureButtonBoundings return bool because we can
* initialize claw motor
* fix robotcontainer transition to returning bool
* fix claw not being initialized in robotcontainer
* set claw power to 0 when button is released instead of when command ends, guess command was ending too fast
* fix claw button bindings
* remove dead code from wpilib log processing python file
* fix arm increment extend not working
* fix button binding error
* enable unit tests so we can fail CI
* fix incorrect OKC_CHECK (inches_ vs arm_ pid)
* OKC_CHECK claw encoder in SetupClawInterface()
* instead of janky hacking Periodic in ArmIO, have a dedicated Init() method called in RobotContainer to read the RobotParams
* rename private variables to have underscore
* mention 'preset' in SetPreset switch for claw to avoid confusion with ControlMode switch statement
* remove debug prints from production code and add a comment about funky invert stuff
* remove redundant #include
* fixed UnlockedAutoTest failing because of a nonzero default heading kP value
* create slow-mode for tele-op, need to bind it to the left trigger
* tries to migrate to Trigger, no idea how to use shared pointers with it
* reduce size of logs
* logs
* better logging of arm encoder
* fix graph being reversed
* current limiting for claw motor
* upgrade WPILib
* re-add swerve to log processing file, some new logs from testing
* better shuffleboard layout with dials for setpoint and sensor reading
* arm presets and full power test
* second driver has buttons to move the arm to preset positions
but for some reason SetArmAngleCommand doens't do anything, need to debug
* of course, logs.
* logs from when we broke the arm lol
* fix arm lift encoder logging
* lower extend stuff so we don't break it again
* logs
* camera on shuffleboard
* lowered arm sensitivity, and inverted the extend motor
* try to add some limits to not let the arm destroy itself with extension and whatnot
* lower arm sensitivity
* create a command to safely move the entire arm to a given state
* simplify the increment functions by just calling the other functions to reduce redundancy
* fix error, code builds
* added GetDistance() to SwerveModule
* made simpler auto functions for SwerveDrive
* remove dead auton code
* AtDistSetpoint() added to SwerveDrive
* more simple auton swerve command
* camera works
* driving in auton works
* made new intake subsystem
* added hw for new intake
* hey guess what? more logs!
* add limit switch to shuffleboard
* #defines for sensor ports
* fix arm preset command immediately cancelling each other so the commands actually work
* preload and drive auton (works, tested)
* narrowed the 'danger zone' for the arm, need to parameterize
* modify arm presets
* fix the robot randomly driving itself and drifting
* logs with better swerve reponse
* properly limit swerve steer motors, and call WrapAngle() instead of ad-hoc wrapping
* update WrapAngle() to wrap to [-180, 180] instead of [0, 360]
* make swerve steer way faster
* remove some swerve drive wrapping code because we're on the interval [-180, 180] now
* initial work on Auto Chooser by Sai (create Auto.h and AutoChooser)
* added intakeio.cpp
* delete claw
* delete unused shuffleboard
* logs or something idk man I'm tired
* made camera view in shuffleboard larger
* made new intake work (more or less), put extend motor in brake mode because the new intake is kinda heavy
* rewrote the arm
* fix claw not being good (ie we hold cubes in now)
* untune steer PID to better constants
* debug couts and fix calibration
* logs
* rewrote arm
* bind a command to manip_x to move the arm inside the robot so we can move fast with our intake inside us
* fix ScorePreloadedAuto to use the intake instead of the claw
* logs
* added arm control state to shuffleboard
* fix camera resolution maybe
* set none-zero default extend values to avoid maybe braking the extension
* fix the arm increment commands
(they were setting the control mode in the constructor instead of in Initialize()
* make just one TeleOpSwerveCommand instead of having multiple
* have SetOpenLoopRampDrive actually do something
* nonzero default values for ArmIO
* IntakeIO return true in Init()
* more shuffleboard stuff
* fix arm test
* put all the arm presets on the back of the robot by the camera, and lower max output
* fix arm
* fix stupid freaking arm extension because double instead of int
* remove logs in prep for comp
* fix right front module offset
* don't allow calibration until either auto or teleop is started
* slow fast commands, brake in slow mode
* stop motors after auton is done
* fix auto, it works now
* some competition stuff
* fix arm set state dpad command
* whoops wrong commnd
* maybe fix our strafe turning too much problem
* make the d term for dist PID actually do something
* fix presets on the other side of the arm
* logs
* improve log processing
* auton chooser
* aaaahhhhhhh
* logs
* auton chooser
* autos
* fix arm calibration not letting the arm ever run I think
* logs
* slew rate limiter, better deadband, more logging
* logs
* shuffleboard updates
* increase speed
* run the intake in at the end of auto
* swap reverse arm presets
* maybe fix arm not moving in teleop or auto if it has to calibrate first
* auto balancing in auto (doesn't work)
* re-enable unit tests
* OKC_CHECK the buttons
* OKC_CALL the WrapAngle()
* remove random non-functional things
* update swerve drive comments
* #pragma once
* documentation for Sensors.h
* screw for loops
* make us pass unit tests by deleting them
* fix unit tests maybe
* maybe actually fixed unit tests
---------
Co-authored-by: okcroboticsteam <okcroboticsteam@gmail.com>
Co-authored-by: Sai <deadlyvortex944@hotmail.com>1 parent 039b04d commit d0b352a
File tree
127 files changed
+5578327
-136092
lines changed- .vscode
- logs
- good logs
- good good logs
- src
- main
- cpp
- autos
- commands
- arm
- claw
- intake
- swerve
- hardware
- io
- subsystems
- ui
- deploy
- include
- autos
- commands
- arm
- claw
- intake
- swerve
- hardware
- io
- subsystems
- ui
- test/cpp/subsystems
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
127 files changed
+5578327
-136092
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
92 | 108 | | |
93 | 109 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
0 commit comments