This year for infinite recharge I have been tasked with vision processing. I’ve been using chameleon vision and am now on the step where I have to put the network table objects in our code however I have seen no example of where to put it in a command-based program. Does anybody have example code I could look at?
Our Github has an example that will get you started. This one does not quite function yet, and we haven’t uploaded the fixes from last Saturday when we got it working pretty well from about 30’ away (or so).
Basically the gist in the new Command-Based framework is:
Create a Vision subsystem.
In that subsystem’s periodic() method, update all of your network table variables you’re getting from the vision co-processor.
Create a Command that receives the Vision and DriveTrain subsystems and setup the logic that you will do while driving with the camera.
Bind that command to a button.whileHeld() method (or any other command binding mechanism you choose for your setup).
Thank you for that example code and extra thanks for the explanation.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.