Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unified vision system #4

Open
5 of 6 tasks
Tracked by #1
SoZ0 opened this issue Sep 24, 2024 · 3 comments
Open
5 of 6 tasks
Tracked by #1

Unified vision system #4

SoZ0 opened this issue Sep 24, 2024 · 3 comments

Comments

@SoZ0
Copy link
Member

SoZ0 commented Sep 24, 2024

The problem

The current vision implementation in the code base is scattered and needs a unified location to manage the vision system.
this should include many system the limelight is currently supporting by creating the supporting methods inside this new class

Vision

The RobotVison class should handle all things vision, this includes multiple cameras. This should include getting values from the different cameras, being able to trigger events on specific values and switching over to a supplier system where possible

Limelight is currently out of data and does not have full support for the fudical markers, we will need to implement the new changes to fully support the system, Investigation to an event based system to trigger actions may be warranted

File: RobotVision.java & Limelight.java

Location: src/main/java/frc/robot/utils/vision


Variables

  • Hashmap<String,Limelight> cameras
  • Limelight defaultCamera

Constructor Limelight... cameras

This should loop through all the cameras and use their table name as the key inside the hashmap,
the first camera passed in will be considered the defaultCamera

public Limelight getCamera(String key)

public Limelight getDefaultCamera()

public createTrigger<T>(String key, Consumer<T>, BooleanSupplier condition)

TODO - Will need to figure out possibly a wider implementation for this task, will need more thought on how to move forwards

public ShuffleboardLayout shuffleboard()

Tasks

  • Constructor
  • Getters
  • Limelight Updated
  • Shuffleboard
@SoZ0
Copy link
Member Author

SoZ0 commented Oct 12, 2024

@MahditS i just realized the 2 classes you made will not work properly. You do need an update function before getting the value else it will update once and that's during initialization then never update again. I would make a method that call getRaw which will pull from the NT and just have the other methods pull their specific values

@MahditS
Copy link
Member

MahditS commented Oct 13, 2024

I think I fixed it @SoZ0 .

@SoZ0
Copy link
Member Author

SoZ0 commented Oct 13, 2024

@MahditS LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants