Quote:
Originally Posted by SamCarlberg
That example is 4 years old. All you have to do on the pi:
Code:
NetworkTable.setClientMode();
NetworkTable.setTeamNumber(1512);
ITable visionTable = NetworkTable.getTable("vision");
That'll set up the pi and a table specifically for vision. If you launch OutlineViewer from Eclipse (WPILib > Launch OutlineViewer), you'll be able to see the values update in realtime.
Then to publish the results from the vision processing
Code:
visionTable.putBoolean("Have target", haveTarget);
visionTable.putNumber("Angle to target", angleToTarget);
...
In your robot program, you'd also declare a table for vision just like we did on the pi. To read the values the pi is publishing, use the corresponding 'get' methods
Code:
haveTarget = visionTable.getBoolean("Have target", false); // default to false
targetAngle = visionTable.getNumber("Angle to target", 0); // default to 0
...
|
Does anyone know of a vision processing tutorial?
Sent from my Pixel using Tapatalk