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

harden camera logic and update alliance logic (delay getting alliance until we'd expect it to be set) #103

Merged
merged 8 commits into from
Mar 23, 2024

Conversation

dejabot
Copy link
Contributor

@dejabot dejabot commented Mar 23, 2024

Description

  • protect against issues with ForwardAprilTagCamera not being able to get the alliance at mechanism construction time. defer when we get the alliance until later.
  • protect against other potential camera initialization errors where camera is null. log and proceed without camera.

How Has This Been Tested?

needs testing.

  • Unit tests: [Add your description here]
  • Simulator testing: [Add your description here]
  • On-robot bench testing: [Add your description here]
  • On-robot field testing: [Add your description here]

…e and protect against other potential initialization errors
@rcahoon rcahoon changed the base branch from main to fresno-comp March 23, 2024 09:26
@dejabot
Copy link
Contributor Author

dejabot commented Mar 23, 2024

but wait, there's more

@dejabot dejabot changed the title harden camera logic and delay when we get alliance harden camera logic and update alliance logic (delay getting alliance until we'd expect it to be set) Mar 23, 2024
@maxspier
Copy link
Member

Wait please don't merge yet -- I already updated the ForwardApriltagCamera mechanism to check for alliance color in run() and that code is in main (it looks VERY similar to yours). Please please check this before merging as it seems like your branch doesn't have these changes on it

@rcahoon
Copy link
Member

rcahoon commented Mar 23, 2024

Wait please don't merge yet -- I already updated the ForwardApriltagCamera mechanism to check for alliance color in run() and that code is in main (it looks VERY similar to yours). Please please check this before merging as it seems like your branch doesn't have these changes on it

Changes merged, and discussed concerns with Max offline

@dejabot dejabot merged commit 566549c into fresno-comp Mar 23, 2024
2 checks passed
maxspier added a commit that referenced this pull request Mar 28, 2024
…off of main instead of fresno comp (also since this is the updated code) (#110)

* changed paths

* fixed absolute encoder

* edit paths

* Update AdvantageKit to match WPILib 3.2, and add fancy new AK version check

* Fix mention of "uncaught" exceptions which might actually be caught

* added a bunch of autons, needs testing

* fix (#102) (#104)

Co-authored-by: Lydia Honerkamp <[email protected]>

* harden camera logic and update alliance logic (delay getting alliance until we'd expect it to be set) (#103)

* harden camera/visionspeakerhelper code.  delay when we get the alliance and protect against other potential initialization errors

* update more alliance logic

* set path to what path.flipPath() returns

* address PR comments

* Spotless fixes

* Skip auton if can't determine flipping

* linting

---------

Co-authored-by: Ryan Cahoon <[email protected]>

* exception

* Tool to read log files off of the robot

* logging, shoulder context, reverting swerve optimization

* context improvement, shoot low tweaks

* removed a bunch of logging

* more logging

* made shootVelocityAndIntake have less waits

* commit code from ds laptop (max)

* Add old shooting code back, add it in OI but no removal of other targeting code in OI (just no way to trigger it now)

* code for reverting to old shooting code

* lint all code

* integrated with driver OI

* apply linter to pass CL

* add a stop drive

* 54 point match!

* Apply linter

* removed intake takeOwnership in shootNow

---------

Co-authored-by: qntmcube <[email protected]>
Co-authored-by: Leek <[email protected]>
Co-authored-by: Lydia Honerkamp <[email protected]>
Co-authored-by: dejabot <[email protected]>
Co-authored-by: Ryan Cahoon <[email protected]>
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.

3 participants