How to use GRIP?

How do you get the image of the camera into GRIP? and also, how do you get the results from that into the network table? Do you use GRIP outside of your code? or do you have to incorporate it into it? :confused:

As far as I know, you run GRIP on either your DS PC, your roboRIO, or a secondary processor such as a Raspberry Pi. The webcam is fed in as just a normal webcam (“Add Webcam”), and the data can be fed out to NetworkTables using a block in GRIP (i.e. Publish ContoursReport). See this example from WPILib screensteps to see how to use the data in your robot code.

Put the Web cam on your PC and walk through the examples found

Once you see the power of the tool then you will need to learn how to deploy the app to the roboRio. First the tutorials on using grip.

Thanks for the help, timtim17 and cpapplefamily.

We are already aware of the Screensteps and we love them and we have seen the power of GRIP (it’s pretty freaking powerful, I must admit). But how do we actually deploy it to the roboRIO?

Also, timtim17, our webcam is connected to our roboRIO, not our computer, so we can’t actually add it in the “add a webcam” option. Is there a way to add it on there through the roboRIO?

The other thing is that I’m not sure how to actually connect the resulting data to the code. I know that there is a deploy option, where You type in Your team number or roboRIO’s address but it isn’t working for us, and I’m not certain as to why. With that in mind, I don’t see how it could publish to the tables without even knowing where the tables it’s publishing to are.

Does anyone know about running it on a separate processor, on the DS or the roboRIO and how to actually do any of those? All help is appreciated.

As I’m sure is clear, we’re fairly confused. Thanks for all the help!

Timtim17, I just found the link You give to someone else with a similar question. I think that will likely help us in any way we need. We’ll let You know how it works out tomorrow.

Once more, thanks.

The deploy to Rio has been the hurdle. As far as I know you must create the profile.grip with the camera connected to the pc. Then get over the hurdle of deploing. There has been lots of chatter on how to get this to work. I been previewing the latest repository and the next release will be the one that takes this app off the map. I hadn’t tested to see if the deploy function has improved let’s hope.

Yeah, the deploy UI seems to be tripping up a lot of people from what I can tell. I’ve been working on a new version that has better error reporting and status messages, among other reliability improvements.

Feedback would be very much appreciated.

Thanks, guys. At least it’s good to know that we’re not alone in our struggle :stuck_out_tongue: If/when You have some way of getting past the whole deploying issue, please let us know.

Much appreciated.

If I wanted to run GRIP on a raspberry pi, would I have to download the linux version of GRIP? I currently have the pi running raspbian but that can be changed if need be.

Yes, from the raspbian website.

Raspbian is a free operating system based on Debian optimized for the Raspberry Pi hardware.

So you will want to download the linux version.

The official release of GRIP doesn’t support Raspberry Pi yet. The linux version in the downloads is for x64 processors, and the deployable roboRIO binaries are for the arm-softfp ABI (the raspberry pi is arm-hardfp)
Someone did manage to get a version built for the Pi, though. I haven’t personally tested it, but it looks promising.

This is the error I get, if that helps:

Failed to deploy Failed to deploy
at edu.wpi.grip.ui.util.deployment.DeployedInstanceManager.scpFileToTarget(
at edu.wpi.grip.ui.util.deployment.DeployedInstanceManager.access$200(
at edu.wpi.grip.ui.util.deployment.DeployedInstanceManager$
at edu.wpi.grip.ui.util.deployment.DeployedInstanceManager$
at java.util.concurrent.Executors$
at java.util.concurrent.ThreadPoolExecutor.runWorker(
at java.util.concurrent.ThreadPoolExecutor$
Caused by: com.jcraft.jsch.JSchException: Auth fail
at edu.wpi.grip.ui.util.deployment.DeployedInstanceManager.scpFileToTarget(
… 9 more
Caused by: com.jcraft.jsch.JSchException: Auth fail
at com.jcraft.jsch.Session.connect(
at com.jcraft.jsch.Session.connect(
… 10 more

I noticed that in terms of deployment, GRIP can only be “deployed” to the RoboRIO.

With that in mind, as far as I can tell, the only way to run it during a match on the driver station would be to use the application itself with all of the editor tools still visible. Is there a way to change some settings to get a minimal UI in GRIP on Windows? I feel like the screen real estate this takes up might just be a bit too large for some smaller driver station laptops.

is there a way to intercept the live feed on the SmartDashboard and use that as an input for grip?

Not currently, no.

GRIP v1.1.0 will have a few improvements that might help with these - one is a “Publish Video” operation that will let you run GRIP in headless mode but still see video in SmartDashboard. This only works if GRIP is running on the roboRIO, though (SmartDashboard is hardcoded to get video from the roboRIO’s address. I’ll see if I can submit a patch to change this.)

Another is a rewritten deploy tool that lets you specify custom addresses, usernames, directories, etc. Although, if you’re talking about running GRIP in headless mode on your laptop, you can already do that by running the JAR in AppData\GRIP\app\core-1.0.0-all.jar from the command line. If there’s more of a demand for this sort of setup, we could create a wiki page describing it.

So, just to make sure I understand the publish options. If you are running GRIP on a co-processor, publish won’t work. It will only work when you process and publish from the Roborio.

We’re looking at options of running GRIP on a co-processor, and also giving a live stream to Driver Station.


All of the current publish operations will work on a coprocessor, but the new “Publish Video” one won’t, until SmartDashboard gets an option to set a custom address for its USB Camera video widget