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?
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 http://wpilib.screenstepslive.com/s/4485/m/50711
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 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
java.io.IOException: Failed to deploy
at edu.wpi.grip.ui.util.deployment.DeployedInstanceManager.scpFileToTarget(DeployedInstanceManager.java:162)
at edu.wpi.grip.ui.util.deployment.DeployedInstanceManager.access$200(DeployedInstanceManager.java:41)
at edu.wpi.grip.ui.util.deployment.DeployedInstanceManager$1.call(DeployedInstanceManager.java:141)
at edu.wpi.grip.ui.util.deployment.DeployedInstanceManager$1.call(DeployedInstanceManager.java:137)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.jcraft.jsch.JSchException: Auth fail
at org.apache.tools.ant.taskdefs.optional.ssh.Scp.execute(Scp.java:245)
at edu.wpi.grip.ui.util.deployment.DeployedInstanceManager.scpFileToTarget(DeployedInstanceManager.java:160)
⌠9 more
Caused by: com.jcraft.jsch.JSchException: Auth fail
at com.jcraft.jsch.Session.connect(Session.java:512)
at com.jcraft.jsch.Session.connect(Session.java:183)
at org.apache.tools.ant.taskdefs.optional.ssh.SSHBase.openSession(SSHBase.java:223)
at org.apache.tools.ant.taskdefs.optional.ssh.Scp.upload(Scp.java:324)
at org.apache.tools.ant.taskdefs.optional.ssh.Scp.execute(Scp.java:226)
⌠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?
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.
Brian
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