Skip to content

Commit

Permalink
Move Bot-Full into main (#40)
Browse files Browse the repository at this point in the history
* better falcon class wrapper

* formatting

* neutral mode implementation

* limit switch implementation

* the start

* full arm states for 3 joints

* buttons!

* logging of rotation states

* begin cartesian coord interpolation

* in da lab

* manual mode override control

* cancoder stuff

* constants tuning

* sim updates

* renaming

* use encoder values for actual positioning of the arm

* helper functions for positioning

* 3d logging poses

* new constants

* profiled pid

* formatting

* optional smoothing (testing only)

* minor spelling mistake

* updated arm config

* more logging, constants changed, function fixes

* epsilon extra allow possible arm configs

* interpolate in end effector space

* better state logging

* account for v4bar caused by chain

* formatting

* clamp angles based on realistic positions

* ground intake position

* endstops toggle, I like how this looks for smoothness more

* darn you formatting

* fix reset to account for local --> 4bar

* simfalcon pylint fix

* arm center of mass logging

* feed forwads based on COM distance

* log FFs

* formatting fun stuff

* make more methods that don't need direct access private

* surpress warnings on simfalcon

* oops guess mega find and replace got something more

* better mid position

* update mechanism2d positions

* account for robotpy update

* use correct ratios

* tolerence at position

* tweaks

* somewhat scuffed joint interpolation option

* no encoders

* cartesian default

* constant tweaks, tolerence

* proper gearing, clamping better

* single substation

* better interpolation

* demo state for the pits

* better constants for testing

* lights

* debug fix

* lab constants

* more logging of actual motor values

* don't clamp on reset state -- should be resting at position to begin with

* over compensation

* ground safe position

* raw positions

* autos

* current limiting

* top safe position

* motor neutral state

* lab constants changes

* controls updates lab

* default cartesian

* wrist care for <-180 deg

* achievable stored position

* end-effector-constrained poses

* arm fudge factor

* button binding changes

* ground cone intake state

* encoder initialization

* ground intake safe spot

* wrist changes

* lets not do that again

* startup position and stored are different

* more accurate COMs

* theorhetical arm adjustments

* add a bit of waiting for top setting

* AutoBalance on charge station command (probably not that good)

* auto balance with pid loop totally done by myself im so smart no help needed(im lying)

* auto balance fixed, maybe

* pitch change

* lab changes

* formatting

* tweaks for landon

* constants from lab

* tweaks from merge

* arm adjust

* make the driver happy

proper defense state

* driv

* more ds logging

* commit

* const changes

* reset on reset

* angle align

* move double substation position out a bit

* vision tweaks

* light slight change

* oi tweaks

* slight increase current limit

* update atTarget

* lab stuff

* more lab tweaks

* turbo fix

* walpole changes

* tweaking positions based on adjustments

* driving tweaks

* auto tweaks and balance adjust

* lights but with PWM port

* rewrite angle align

* Revert "lights but with PWM port"

This reverts commit 2636af7.

* luke seems to be the only one who knows how to work on the robot code

* comp day 1

* comp day 2

* oscilation

* increase sensitivity

* auton tweaks

* mid score tweak

* button to coast

* start using a bit of vision data

* vision system rewrite

* 1153 fixes 2

* practice day wpi

* wpi day 1

* changes wpi day 1 4:45

* Borrow auto balance algorithm from 6328

* 2 piece

* Revert "Borrow auto balance algorithm from 6328"

This reverts commit 290c0cf.

* angle gyro fix

* 2 piece again

* better ground intake

* necmp2 day 1

* 2 piece works

* necmp final

* seperate double sub cube and cone position

* put the current limits back!

* encoder start back

* pre-cmp changes

* all new calibrations

* small warning suppression, remove vision

* better light anims

* transfer to set in stone angles for startup hardcoded

* auto enhancements

* override is an arm "freeze" button

* new intake who dis

* falcon motor switch

* lab changes positions

* intake current limit

* arm cube score position adjustment

* arm tweaks

* lab position tweaks + cube flange mode

* drive gearing change

* bugfix atTarget

* modify auto

* cone double sub flange

* top score position cone

* put fudge on other driver

* at position and auto tweaks

* get pose script

* ground cone tip intake position

* auton changes

* formatting

* run checks on latest windows

---------

Co-authored-by: loopylefty <[email protected]>
Co-authored-by: Jacob Kaplan <[email protected]>
Co-authored-by: Christopher Aloisio <[email protected]>
  • Loading branch information
4 people authored Oct 7, 2023
1 parent 5745f8d commit 30de70f
Show file tree
Hide file tree
Showing 46 changed files with 3,816 additions and 695 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ "windows-2019", "ubuntu-latest" ]
os: [ "windows-latest", "ubuntu-latest" ]
python-version: ["3.9", "3.10"]
steps:
- uses: actions/checkout@v3
Expand Down
141 changes: 116 additions & 25 deletions ControlScheme.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,80 @@
{
"alignClosestWaypoint": [
2,
{
"Button": 3
},
"replace me"
],
"armDemo": [
2,
{
"Button": 7
},
"replace me"
],
"armDoubleSubstation": [
2,
{
"Button": 4
},
"replace me"
],
"armFudgeFactorIncrease": [
1,
{
"POV": [0, 0]
},
"POV up"
],
"armFudgeFactorDecrease": [
1,
{
"POV": [0, 180]
},
"POV down"
],
"armGroundCone": [
2,
{
"POV": [0, 90]
},
"replace me"
],
"armGroundIntake": [
2,
{
"POV": [0, 180]
},
"replace me"
],
"armMid": [
2,
{
"POV": [0, 270]
},
"replace me"
],
"armOverride": [
2,
{
"Button": 1
},
"replace me"
],
"autoBallIntake": [
0,
"armSingleSubstation": [
2,
{
"Button": 4
"Button": 5
},
"right button on top of joystick (ThrustmasterT16000M)"
"replace me"
],
"armTop": [
2,
{
"POV": [0, 0]
},
"replace me"
],
"chassisForwardsBackwards": [
0,
Expand All @@ -28,9 +91,9 @@
"Joystick Horizontal (ThrustmasterTWCSThrottle)"
],
"chassisXRotation": [
1,
2,
{
"Axis": 0
"Axis": 5
},
"Joystick Horizontal (ThrustmasterTWCSThrottle)"
],
Expand All @@ -44,57 +107,85 @@
"defenseStateControl": [
0,
{
"Button": 3
"Button": 4
},
"left button on top of joystick (ThrustmasterT16000M)"
"right button on top of joystick (ThrustmasterT16000M)"
],
"driveToTargetControl": [
"hookScore": [
0,
{
"Button": 2
"Button": 3
},
"B (Xbox)"
"left button on top of joystick (ThrustmasterT16000M)"
],
"fieldRelativeCoordinateModeControl": [
1,
0,
{
"Button": 6
},
"Middle Down (ThrustmasterTWCSThrottle)"
],
"resetGyro": [
1,
"lightsCone": [
0,
{
"Button": 10
"POV": [0, 90]
},
"Middle POV left (ThrustmasterTWCSThrottle)"
"replace me"
],
"targetRelativeCoordinateModeControl": [
1,
"lightsConeFlange": [
0,
{
"Button": 7
"POV": [0, 0]
},
"Middle Up (ThrustmasterTWCSThrottle)"
"replace me"
],
"turboSpeed": [
"lightsCube": [
0,
{
"POV": [0, 270]
},
"replace me"
],
"resetArm": [
2,
{
"Button": 8
},
"replace me"
],
"resetGyro": [
0,
{
"Button": 10
},
"Middle POV left (ThrustmasterTWCSThrottle)"
],
"turboSpeed": [
2,
{
"Button": 2
},
"bottom button on top of joystick (ThrustmasterT16000M)"
],
"intakeGamepiece": [
2,
0,
{
"Button": 3
"Button": 2
},
"PLACEHOLDER"
],
"outtakeGamepiece": [
2,
0,
{
"Button": 1
},
"PLACEHOLDER"
],
"AutoBalance": [
0,
{
"Button": 5
},
"left bumper(xbox)"
]
}
}
149 changes: 149 additions & 0 deletions commands/arm/demoFile.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
-6.524122 128.438975 -56.012807
-8.294799 129.158959 -55.003968
-10.084786 129.635297 -53.560991
-11.876246 129.883642 -51.729554
-13.659518 129.898505 -49.522976
-15.410404 129.697260 -46.995257
-17.110961 129.286588 -44.181728
-18.741971 128.676010 -41.122055
-20.285343 127.875935 -37.855787
-21.724924 126.897565 -34.421281
-23.046981 125.753195 -30.855622
-24.240613 124.456142 -27.194192
-25.302004 123.008592 -23.452609
-26.222522 121.438168 -19.680145
-27.003399 119.751043 -15.891907
-27.646700 117.959648 -12.109242
-28.157038 116.076401 -8.350974
-28.541180 114.113466 -4.633520
-28.807699 112.082831 -0.971281
-28.966600 109.996474 2.622778
-29.029062 107.866288 6.136931
-29.007106 105.704192 9.560274
-28.913465 103.522213 12.882510
-28.761285 101.332495 16.093618
-28.564133 99.147736 19.183478
-28.335643 96.980435 22.142218
-28.089706 94.844020 24.959253
-27.840121 92.751899 27.623986
-27.600663 90.718012 30.125239
-27.384991 88.756771 32.451274
-27.203993 86.880881 34.592026
-27.057769 85.094615 36.546249
-26.946104 83.408460 38.308294
-26.859975 81.805838 39.892956
-26.800126 80.302370 41.290116
-26.766280 78.910200 42.492430
-26.747489 77.609821 43.515945
-26.749379 76.432535 44.338805
-26.760557 75.358884 44.976481
-26.785026 74.415628 45.410543
-26.816451 73.599468 45.644245
-26.851347 72.916108 45.674155
-26.885964 72.371018 45.496720
-26.916147 71.969212 45.108543
-26.940482 71.724342 44.499601
-26.945487 71.616419 43.683609
-26.933534 71.672085 42.640372
-26.889198 71.868097 41.384926
-26.810548 72.221300 39.902942
-26.684687 72.718620 38.200825
-26.500202 73.352885 36.280093
-26.244213 74.114308 34.143358
-25.902297 74.990307 31.794466
-25.458470 75.965425 29.238640
-24.897240 77.027247 26.478026
-24.195371 78.141244 23.530557
-23.338403 79.285232 20.411824
-22.326966 80.422657 17.177330
-21.163587 81.499074 13.906392
-19.862451 82.486323 10.662315
-18.443097 83.364043 7.505856
-16.923708 84.097742 4.512224
-15.334130 84.684353 1.735158
-13.705446 85.120310 -0.769236
-12.069493 85.402869 -2.944463
-10.465697 85.556514 -4.755174
-8.928614 85.592953 -6.156838
-7.488726 85.514938 -7.099065
-6.183197 85.358090 -7.560114
-5.040953 85.137557 -7.504535
-4.087376 84.867163 -6.899371
-3.342512 84.554279 -5.710504
-2.817571 84.189929 -3.895825
-2.516458 83.788669 -1.462261
-2.408691 83.385818 1.463425
-2.468735 83.055742 4.702150
-2.677791 82.875958 8.078969
-3.028199 82.936364 11.417654
-3.523643 83.337515 14.542654
-4.177236 84.185770 17.282105
-5.003280 85.558474 19.503918
-5.983964 87.366282 21.253032
-7.102056 89.503817 22.599532
-8.343336 91.868490 23.613549
-9.690725 94.334960 24.387411
-11.139829 96.810166 24.991334
-12.686864 99.192071 25.506129
-14.331984 101.390286 26.003881
-16.068128 103.285909 26.580627
-17.885894 104.770369 27.318542
-19.768704 105.781947 28.250291
-21.680159 106.309798 29.370684
-23.572127 106.355246 30.659193
-25.397437 105.972168 32.038898
-27.099423 105.164149 33.479333
-28.633983 103.994527 34.897684
-29.958726 102.498238 36.244696
-31.042691 100.722354 37.469762
-31.867361 98.726150 38.521765
-32.426641 96.575576 39.355086
-32.720489 94.324182 39.943803
-32.760900 92.042188 40.256049
-32.561902 89.785063 40.278029
-32.143468 87.615426 39.994036
-31.528276 85.596306 39.390589
-30.738617 83.786579 38.458166
-29.795443 82.242615 37.188351
-28.718791 81.023638 35.568336
-27.514982 80.156231 33.606167
-26.195073 79.695399 31.283308
-24.744418 79.633708 28.621582
-23.153622 80.002231 25.605505
-21.383111 80.762691 22.262385
-19.389705 81.893558 18.596240
-17.111881 83.303385 14.652976
-14.511058 84.815991 10.539613
-11.578082 86.277768 6.356536
-8.321138 87.543757 2.214375
-4.771399 88.488755 -1.771887
-0.995456 89.063071 -5.530303
2.923909 89.237357 -8.991225
6.886887 89.030423 -12.116514
10.784091 88.504778 -14.902076
14.504387 87.756238 -17.374890
17.930042 86.939968 -19.616486
20.956376 86.197158 -21.704453
23.491348 85.708110 -23.760971
25.531577 85.561896 -25.864065
27.096918 85.811594 -28.069528
28.217497 86.462033 -30.393857
28.917276 87.528034 -32.859384
29.232711 88.965919 -35.439994
29.188721 90.763816 -38.132577
28.819690 92.860711 -40.891868
28.149554 95.223144 -43.691825
27.204507 97.793016 -46.482364
26.009239 100.509095 -49.209170
24.575007 103.338979 -51.834026
22.927649 106.210316 -54.293085
21.065359 109.099773 -56.543158
19.011608 111.933188 -58.516683
16.759858 114.689559 -60.167867
14.330557 117.299333 -61.430790
11.722745 119.733790 -62.257714
8.948374 121.948055 -62.598267
6.024304 123.900806 -62.410444
2.974960 125.554313 -61.663494
-0.165130 126.877102 -60.342980
-3.350045 127.845268 -58.453483
Loading

0 comments on commit 30de70f

Please sign in to comment.