Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Boxop updates #95

Merged
merged 16 commits into from
Mar 22, 2024
Merged

Boxop updates #95

merged 16 commits into from
Mar 22, 2024

Conversation

1yd1a
Copy link
Contributor

@1yd1a 1yd1a commented Mar 19, 2024

added ability to override climber soft stops + buttons that must be pressed before climbing to prevent accidental climbing

@1yd1a 1yd1a requested a review from qntmcube March 19, 2024 23:56
@dejabot
Copy link
Contributor

dejabot commented Mar 21, 2024

nice job with this! I think it's close. main things:

  • I think you can simplify the logic by using two diff conditions. one for enabling movement of the climbers (within the isTriggering you can check for left or right stick movement) and one for overriding the soft limits. lmk if that wouldn't work, tho.
  • alternatively, you could have one condition checking A+B+X+Y and within that, check for left/right sticks and move the climbers, having disabled the soft limits (restoring when finished triggering), and another condition checking A+B+!(X+Y) and within that, check for left/right sticks and move the climbers (leaving soft limits enabled).
  • just to double-check - I thought I had heard you wanted the override controls to be A+B+LT+RT. if A+B+X+Y is more comfortable, great! if you wanted A+B+LT+RT but weren't sure about the condition, we can make that work too.

thank you!

Copy link
Contributor

@dejabot dejabot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know there are a lot of things going on here, so I put together a branch you can reference with the context-related priority changes (plus the shoulder rename).

@dejabot
Copy link
Contributor

dejabot commented Mar 22, 2024

I took a pass at creating a sample version of the restructured code so all climbing logic (incl overrides) happens within the climbing trigger, etc. this simplifies some of the context logic. I also merged main into this sample. See what you think. We can discuss tomorrow.

1yd1a and others added 7 commits March 22, 2024 11:01
* Sample Lights code (#96)

* code etc

* apply jay demon

* Drive set rotation (#87)

* added controlRobotOrientedWithRotationSetpoint

* added comment

* added rotation lock-on to drive

* added controls in OI

* turret shooter at home

* removed old code from drive

* used constant for threshold

* added default speaker positions

* spotless

* clean up

* changed controls and default

* apply linter to streamline PR process

* logs

* fixed oi stuff

* changed negative so that it tracks the red target correctly

* made shootNow work with new changes

* Allow shooting only for luis, seperate buttons for speaker vs amp, lint, some changes etc.

* update conflicting buttons

* new boxop code

* removed unused PID controller

* changed logic for shooting button without rotation lock

* added VisionConstants and made visionSpeakerHelper update the robot position based on the known speaker position (rather than vice versa)

* makes auton reset position based off of april tag if it sees

* deleted wrong boxop climber code

* added todo comment

* removed unnecessary logging, added vision update to shootnow

* theoretically fixed context issues

* stopped drive once done using in shootNow, added timeouts

* commented out spammy log

* added shooting ability

* added log to update

* added extra pid value

* added top

* added scoring position, changed some constants

* changed visionSpeakerHelper back to updating target position rather than robot position

* minor shooter changes

* Optimized turning so that it always goes in the shortest direction.

* Ran spotlessApply

* added drive rotation to be in  run so it continues even after calling once
everything works for the most part!

* spotless

* reverted untested drive change

* added comment

---------

Co-authored-by: Leek <[email protected]>
Co-authored-by: Mixmix00 <[email protected]>
Co-authored-by: ThatComposerDude <[email protected]>

* Fix canid on candle (#97)

* restructure climber controls so all climber stuff happens within an enable climber condition.  this allows us to simplify the context ownership logic a little.

* linting

* merging latest from main

* fix merge issues

* bringing back closer to base pr (reducing diffs)

---------

Co-authored-by: Mixmix00 <[email protected]>
Co-authored-by: Rajit G <[email protected]>
Co-authored-by: Leek <[email protected]>
Co-authored-by: Mixmix00 <[email protected]>
Co-authored-by: ThatComposerDude <[email protected]>
Co-authored-by: Debajit Ghosh <[email protected]>
Copy link
Contributor

@qntmcube qntmcube left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

went over, lg (needs testing)

@qntmcube qntmcube merged commit ac678d0 into main Mar 22, 2024
3 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants