I am a beginner programmer for my rookie team and i was wondering if anyone could help me with vision programming. What we basically want to do is have a Limelight and a gyro on our robot and we want to have a button on our SmartDashboard that is red until our robot sees that it is in range of the target that we are shooting at. When it is in range we want to press a button on the controller that will line our robot up at the right angle and shoot the balls. I could use any help possible I am completely lost
Here are the basics of what I would recommend:
- Create a vision subsystem
- In the periodic method of the subsystem, check whether you have a valid target etc.
- Make a network tables Boolean entry available to the dashboard (we use Shuffleboard)
- Bind a button to a command group that will rotate to the target and shoot
We do most of those things, though we don’t couple align and shoot to one button because we shoot from multiple distances and haven’t worked that out yet.
In our code you’ll see the vision subsystem, the RotateToTarget command, that should get you close to what you need if you are using command based.
Thanks so much this should help a lot.