![]() |
Raspberry Pi as Coprocessor
We plan on using the Raspberry Pi to do our vision processing. How would we output Python script results (after processing) and receive on RoboRio (Java)? I looked into pynetworktables and am confused on how to receive the data from the RoboRio.
|
Re: Raspberry Pi as Coprocessor
GRIP has some examples. Specifically samples/frc_find_red_areas.
Basically, you just publish your results to NetworkTables with the pi connected to the roborio/radio/switch with an ethernet cable, then you can read that from your robot program. |
Re: Raspberry Pi as Coprocessor
Quote:
|
Re: Raspberry Pi as Coprocessor
|
Re: Raspberry Pi as Coprocessor
Quote:
Code:
//========================================Looks like what I need, but is it missing something (ie setTeam, etc.)? |
Re: Raspberry Pi as Coprocessor
That example is 4 years old. All you have to do on the pi:
Code:
NetworkTable.setClientMode();Then to publish the results from the vision processing Code:
visionTable.putBoolean("Have target", haveTarget);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 |
Re: Raspberry Pi as Coprocessor
Thank you so much!
|
Quote:
Sent from my Pixel using Tapatalk |
| All times are GMT -5. The time now is 12:57. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi