|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: Using GRIP on Raspberry Pi
NetworkTables is a library for synchronizing variables over multiple machines in a network. It allows you to read what you publish from the RIO on your driver station, but it also allows the RIO to read values from another network device, and so can your driver station.
The RIO is the server. So, both the Pi and the driver station connect to the RIO. However, using NetworkTables is mostly the same regardless of whether you are on the client or the server. You can read values on the rio that the Pi publishes using something like this Code:
NetworkTable gripTable = NetworkTable.getTable("path/to/grip/table");
double someValue = gripTable.getNumber("numberVariableName", defaultValue)
//Or getString, getBoolean, etc
To center - With a gyroscope: calculate the angle to the target and turn by that amount. If your camera is nice, use a simple pinhole camera model. If not, you're kind of screwed because the distortion correction functions of OpenCV aren't in GRIP last time I checked - Without a gyroscope: turn until the target is centered. This will be much slower than if you had a gyro because the feedback is slower Last edited by euhlmann : 11-17-2016 at 07:57 PM. |
|
#2
|
||||
|
||||
|
Re: Using GRIP on Raspberry Pi
Hi! I'm working to try and implement this:
https://github.com/WPIRoboticsProjec...Raspberry-Pi-2 I'm using a Pi 3, and the Pi camera. So far I'm successfully able to stream the camera to GRIP on the PC, but when I start GRIP on the Pi, I get an error. Working in another thread about the error https://www.chiefdelphi.com/forums/s...d.php?t=151892 |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|