View Single Post
  #30   Spotlight this post!  
Unread 14-01-2016, 10:13
cpapplefamily cpapplefamily is offline
Registered User
FRC #3244 (Granite City Gearheads)
Team Role: Mentor
 
Join Date: May 2015
Rookie Year: 2015
Location: Minnesota
Posts: 243
cpapplefamily has a spectacular aura aboutcpapplefamily has a spectacular aura about
Re: We are going to Want a GRIP fourm

Quote:
Originally Posted by jmguillemette View Post
Hi Everyone,

My team has succeeded at making a GRIP vision script, loading it to the RIO and getting the values out of the network tables.

the only thing that i now want to do is be able to controll the launching and stopping of grip from my code (instead of using the GRIP UI application)

some things we tripped on getting this this point:
-The Grip deploy process
---when you deploy make sure your settings are your robot's address
---after you deploy there is a delay (about a min) then a NEW button appears just above the deploy log window (it looks like the "play" triangle) Push this button to run the GRIP process in headless mode on the rio..
No data will be published to the network tables till you do this step.

NetworkTables
---Despite the fact i told my last step in the GRIP script to publish to "Vision" which would translate to "GRIP/Vision" in networkTables .. it didnt use my value.. instead only the default value provided by the step appears to work.

in out case this was a contours publish so its "GRIP/myContoursReport"

Another Note:
GRIP will have dedicated control of the camera.. Any attempts to stream the camera after grip has started will failed with an "in use" error. If your already streaming its likely grip wont be able to access the camera and will silently fail.

If any team is looking as to how to use GRIP to do targeting i would be happy to provide a plain english write up on how we are approaching this problem and how you can use grip to solve it.
Can you clear up a few steps leading up to this.
1. When developing the Grip script where is the camera connected? PC/Rio USB/IP Web cam
2. On the PC what is the Camera Name? Cam0.1.2....
3. If USB what is the USB camera name when viewing the WebDashboard?
4. What is the Deploy address you are useing?


I have never waited for the PC deploy and didn't know I would have an option to start the script on the Robot from the PC. I'll check that out.

As for starting the GRIP Wiki say to add this to start the app with the robot.
For stopping I don't have an answer but I can see a need.

JAVA:
Code:
Runtime.getRuntime().exec(new String[]{"/usr/local/frc/JRE/bin/java", "-jar", "grip.jar", filename});
Can we not stream and us Grip at the same time?

Last edited by cpapplefamily : 14-01-2016 at 10:18. Reason: Added the Java Tag for start code