Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   We are going to Want a GRIP fourm (http://www.chiefdelphi.com/forums/showthread.php?t=141097)

cpapplefamily 08-01-2016 22:40

We are going to Want a GRIP fourm
 
I been testing the GRIP tool. We should start a forum to support it. I love the real time display when inserting the different filters.

cad321 08-01-2016 22:56

Re: We are going to Want a GRIP fourm
 
Seconded. Absolutely love the simplicity of the program thus far and am certain that a sub forum for either solely GRIP, or a general one for vision processing would be of great use to many teams.

jojoguy10 10-01-2016 22:43

Re: We are going to Want a GRIP fourm
 
Third-ed! We're a Labview team hoping to learn how to run the deployed GRIP code using a shell command!

Ti-Gars 10-01-2016 23:05

Re: We are going to Want a GRIP fourm
 
Hey! We are also planning on using GRIP this year, but we never worked with it! Is there a team who could share a exemple code or something like this, so we could take a look at the way it works ? (In java preferably)

Thanks

jojoguy10 11-01-2016 00:31

Re: We are going to Want a GRIP fourm
 
Quote:

Originally Posted by Ti-Gars (Post 1520726)
Hey! We are also planning on using GRIP this year, but we never worked with it! Is there a team who could share a exemple code or something like this, so we could take a look at the way it works ? (In java preferably)

Thanks

This is a great first step: http://wpilib.screenstepslive.com/s/4485/m/50711

cpapplefamily 11-01-2016 00:36

Re: We are going to Want a GRIP fourm
 
I been looking though that. I'm looking now for how to get the image from the webcam (on the RoboRio) to the PC drivers station for processing with GRIP. I have GRIP publishing to the Network table and verified its there. I have not capture the data in Java for reaction but seems that is documented.

OR

How to run the algorithms on the rio.

jkelleyrtp 11-01-2016 01:13

Re: We are going to Want a GRIP fourm
 
Quote:

Originally Posted by cpapplefamily (Post 1520809)

OR

How to run the algorithms on the rio.

You should look at the NVidia Jetson that's in FIRST Choice right now. 900 has lots of great experience and resources to help figure it out.

jojoguy10 11-01-2016 09:05

Re: We are going to Want a GRIP fourm
 
Quote:

Originally Posted by cpapplefamily (Post 1520809)
I been looking though that. I'm looking now for how to get the image from the webcam (on the RoboRio) to the PC drivers station for processing with GRIP. I have GRIP publishing to the Network table and verified its there. I have not capture the data in Java for reaction but seems that is documented.

OR

How to run the algorithms on the rio.

Their Wiki on GitHub is also very useful. Here is the section on running the algorithm on the RoboRIO: https://github.com/WPIRoboticsProjec...an-FRC-program

kgzak 11-01-2016 16:37

Re: We are going to Want a GRIP fourm
 
I am looking at trying to use grip. What exactly is it? Is it a piece of software I have to download somewhere? Is it a library? Where do I get it from? Thanks.

jojoguy10 11-01-2016 18:59

Re: We are going to Want a GRIP fourm
 
Quote:

Originally Posted by kgzak (Post 1521365)
I am looking at trying to use grip. What exactly is it? Is it a piece of software I have to download somewhere? Is it a library? Where do I get it from? Thanks.

If you look at the past two post I made in this thread, and use the links, you should have all of your answered questions.

https://github.com/WPIRoboticsProjec...an-FRC-program

http://wpilib.screenstepslive.com/s/4485/m/50711

Ti-Gars 11-01-2016 19:45

Re: We are going to Want a GRIP fourm
 
Quote:

Originally Posted by jojoguy10 (Post 1520805)

Thanks!

I made every steps from the tutorial, but I am having problems when it's time to read arrays values. I made a quick robot code as they are showing here, but my array of double who's suppose to receive the values is empty.

Just so you know, my webcam is presently connected to my computer and not my robot. I can see every values in "Network Table Viewer".

Thanks for your help.

jojoguy10 11-01-2016 19:48

Re: We are going to Want a GRIP fourm
 
I'm not as fluent in Java or C++ as I am in Labview. Also, our team has yet to try the Network Tables for GRIP. We have just been running from our laptop for testing. Hopefully, we will start working with Grip by the end of this week or next week.

nightpool 11-01-2016 20:20

Re: We are going to Want a GRIP fourm
 
Quote:

Originally Posted by Ti-Gars (Post 1521547)
Thanks!

I made every steps from the tutorial, but I am having problems when it's time to read arrays values. I made a quick robot code as they are showing here, but my array of double who's suppose to receive the values is empty.

Just so you know, my webcam is presently connected to my computer and not my robot. I can see every values in "Network Table Viewer".

Thanks for your help.

Can you read other types of NetworkTable values, such as from the Smart Dashboard or ones inserted manually in the NetworkTable Viewer? Sounds like your robot code isn't connecting to the same network/NT instance that your laptop is on.

Tparbotmail 11-01-2016 21:00

Re: We are going to Want a GRIP fourm
 
I am new to vision processing but not to computing, so I am trying to put together a how to get started guide. I definitely would like to see a forum. How do we make that happen?

An Outlier 11-01-2016 21:43

Re: We are going to Want a GRIP fourm
 
4-thed. (5-thd?)

I agree, however more before me voiced the same!

gbear605 12-01-2016 08:30

Re: We are going to Want a GRIP fourm
 
Agreed, there needs to be a forum

Ti-Gars 12-01-2016 16:49

Re: We are going to Want a GRIP fourm
 
Quote:

Originally Posted by nightpool (Post 1521571)
Can you read other types of NetworkTable values, such as from the Smart Dashboard or ones inserted manually in the NetworkTable Viewer? Sounds like your robot code isn't connecting to the same network/NT instance that your laptop is on.

I am connected to my robot while running my code. When my robot boot, I see in my Riolog :
Code:

NT: server: client CONNECTED: 10.33.60.25 port 56974
But I am not able to get my values. I am using this line of code to get them :
Code:

table = NetworkTable.getTable("/GRIP/myContoursReport");
double[] defaultValue = new double[0];
double[] areas = table.getNumberArray("area", defaultValue);

I also tried to see if he find my "key", but it doesn't see it.
Code:

System.out.println(table.containsKey("area");
We are guessing that our problem is that our robot is not able to connect to our Network Table who's on our laptop. Still, we don't know how to do it.

ThomasClark 12-01-2016 21:20

Re: We are going to Want a GRIP fourm
 
Quote:

Originally Posted by Ti-Gars (Post 1522223)
I am connected to my robot while running my code. When my robot boot, I see in my Riolog :
Code:

NT: server: client CONNECTED: 10.33.60.25 port 56974
But I am not able to get my values. I am using this line of code to get them :
Code:

table = NetworkTable.getTable("/GRIP/myContoursReport");
double[] defaultValue = new double[0];
double[] areas = table.getNumberArray("area", defaultValue);

I also tried to see if he find my "key", but it doesn't see it.
Code:

System.out.println(table.containsKey("area");
We are guessing that our problem is that our robot is not able to connect to our Network Table who's on our laptop. Still, we don't know how to do it.

Can you post a screenshot of your GRIP pipeline?

Ti-Gars 13-01-2016 13:45

Re: We are going to Want a GRIP fourm
 
Quote:

Originally Posted by ThomasClark (Post 1522370)
Can you post a screenshot of your GRIP pipeline?

This is my pipeline


And this is what I am able to see in Network Table Viewer


It seems like we now need to use NetworkTables 3.0 (Source) I am presently importing :
Code:

import edu.wpi.first.wpilibj.networktables.Networktable;
And I don't know how to import the new ntcore library.

shlynfrhm 13-01-2016 18:40

Re: We are going to Want a GRIP fourm
 
Hey, I'm also having problems accessing the data from my NetworkTables. This is my code, and I've also imported NetworkTables before my program. I'm not able to see live publishing from GRIP to the Network Tables, has anyone been able to successfully do this and could give me an example? I followed the instructions on WPILib, but I feel as if I'm missing some code. Also, we program in command-based and I'm not sure where to implement this code in that format.

Code:

public class Robot extends SampleRobot {
    final String defaultAuto = "Default";
    final String customAuto = "My Auto";
    String autoSelected;
    SendableChooser chooser;
    NetworkTable table;
       
    /**
    * This function is run when the robot is first started up and should be
    * used for any initialization code.
    */
    public Robot() {
            table = NetworkTable.getTable("/GRIP/myContoursReport");
    }
    public void robotInit() {
           
        chooser = new SendableChooser();
        chooser.addDefault("Default Auto", defaultAuto);
        chooser.addObject("My Auto", customAuto);
        SmartDashboard.putData("Auto choices", chooser);
        double[] defaultValue = new double[0];
        while(true){
                double[]areas=table.getNumberArray("area", defaultValue);
                System.out.print("areas:");
                for(double area:areas){
                        System.out.print(area + " ");
                }
                System.out.println();
                Timer.delay(1);
        }
    }

Thanks!
Ashlyn

ThomasClark 13-01-2016 20:12

Re: We are going to Want a GRIP fourm
 
Quote:

Originally Posted by Ti-Gars (Post 1522827)

Quote:

Originally Posted by shlynfrhm (Post 1523043)

Not sure if this will make a difference, but maybe try using "GRIP/myContoursReport" as the table name instead of "/GRIP/myContoursReport".

cpapplefamily 13-01-2016 20:26

Re: We are going to Want a GRIP fourm
 
Quote:

Originally Posted by jojoguy10 (Post 1520948)
Their Wiki on GitHub is also very useful. Here is the section on running the algorithm on the RoboRIO: https://github.com/WPIRoboticsProjec...an-FRC-program

That link is no help currently.

shlynfrhm 13-01-2016 20:56

Re: We are going to Want a GRIP fourm
 
Quote:

Originally Posted by ThomasClark (Post 1523130)
Not sure if this will make a difference, but maybe try using "GRIP/myContoursReport" as the table name instead of "/GRIP/myContoursReport".

I changed it and it had no effect. Does anyone know of teams with code releases who have successfully implemented GRIP?

cad321 13-01-2016 21:19

Re: We are going to Want a GRIP fourm
 
Quote:

Originally Posted by shlynfrhm (Post 1523169)
I changed it and it had no effect. Does anyone know of teams with code releases who have successfully implemented GRIP?

That will be a tough thing to find right now as GRIP is new for this season. I am unaware of any public code releases using it at the moment.

Juxttech 13-01-2016 22:50

Re: We are going to Want a GRIP fourm
 
Hey everyone, we're trying to get our GRIP deployed to the roboRIO (using its ip address 172.22.11.2 and our team number 4918) but every time we try to deploy it, GRIP says "failed to connect". Any reason why it might be doing this?

Peter Johnson 14-01-2016 00:32

Re: We are going to Want a GRIP fourm
 
Quote:

Originally Posted by shlynfrhm (Post 1523169)
I changed it and it had no effect. Does anyone know of teams with code releases who have successfully implemented GRIP?

I just tried your exact code using "GRIP/myContoursReport" (with no leading "/") and it works for me. When run with a leading "/" it doesn't work, because NetworkTable.getTable() unconditionally prepends "/" to the name you provide it.

As a side note, you really should put the operational part of your code into robotMain() instead of robotInit(), because FRCNetworkCommunication isn't getting initialized this way (you'll note it's not possible to enable your robot and the driver station says "no robot code" because you're never exiting robotInit).

cpapplefamily 14-01-2016 00:36

Re: We are going to Want a GRIP fourm
 
I got something to not fail by using the roboRIO.####-FRC.local in the advanced tab of deploy for an address. I then added the line
Code:

Runtime.getRuntime().exec(new String[]{"/usr/local/frc/JRE/bin/java", "-jar", "grip.jar", filename});
To my robotinit both with and without starting the image streaming but with no luck. Nothing posting to the network tables from the roborio. The code did post to the network table when grip running on my pc.

One of these days someone's going to crack this and get it working I hope they share with the rest of us. I would still like to find out how to:
1: deploy to the rio
2: use the driver station to process the usb cam

I do see my cam name is "cam1" but in grip its cam0 when plugged into the pc. All my searching on how to force the roborio cam name to cam0 resulted in just use the name it was assigned.

cpapplefamily 14-01-2016 00:40

Re: We are going to Want a GRIP fourm
 
I also browsed the roborio for mygripprogram.grip on the rio using sftp utility as discussed on how to add files to the robot but don't know where to look.

jmguillemette 14-01-2016 09:53

Re: We are going to Want a GRIP fourm
 
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.

cpapplefamily 14-01-2016 10:13

Re: We are going to Want a GRIP fourm
 
Quote:

Originally Posted by jmguillemette (Post 1523442)
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?

cpapplefamily 14-01-2016 10:17

Re: We are going to Want a GRIP fourm
 
Maybe to fix the problem of Grip vs Streaming the Grip app should generate a Java / C++ / your language script similar to RobotBuilder to insert directly into the code. Then They can share the same capture frames.

jmguillemette 14-01-2016 10:45

Re: We are going to Want a GRIP fourm
 
Quote:


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?

1. While developing the script the camera is connected to the pc running GRIP.. after the script is done, i move the camera to the USB port on the rio and then deploy the script to the rio.

2. Im lucky that even with the on board camera built into my laptop the usb camera we are using get identified as camera0 consistently when used on the RIO and on my laptop.

3. the process for getting the camera on the smartDashboard is entirely separate from using GRIP and thus they actually will conflict with one another.
The strategy when using grip is to do the analysis of the image on the RIO and then only transmit the raw numerical data back to dash to assist the driver via indicators.

4. roborio-4525-frc.local


Quote:

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.
let me clarify this. GRIP is a separate program from your Robot. Within the GRIP development UI there is the ability to deploy.. and after a brief wait a play button will appear to launch the GRIP script on the RIO.

A GRIP script should include as its last step one of the RIO publish tasks. These push data to the networkTables mechanism that your Robot code can access.

There are thus separate applications that talk via the networkTables.

jmguillemette 14-01-2016 10:46

Re: We are going to Want a GRIP fourm
 
Quote:

Originally Posted by cpapplefamily (Post 1523460)
Maybe to fix the problem of Grip vs Streaming the Grip app should generate a Java / C++ / your language script similar to RobotBuilder to insert directly into the code. Then They can share the same capture frames.

agreed.. i would like to embedded grip vs having to call to runtime to start yet another java application.. from my java application. :P

cpapplefamily 14-01-2016 11:50

Re: We are going to Want a GRIP fourm
 
Quote:

Originally Posted by jmguillemette (Post 1523442)
Hi Everyone,


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.

Scary.. I have had limited success deploying and running grip on the Rio. If the NetworkTable has old data it will not clear. How I see it if Grip does't launch you maybe acting on OLD DATA.

jmguillemette 14-01-2016 12:24

Re: We are going to Want a GRIP fourm
 
for the data to be good to the driver or autonomous system is needs to be constantly updating.. .if you see static numbers.. youll know somethings up.

ThomasClark 14-01-2016 12:51

Re: We are going to Want a GRIP fourm
 
Quote:

Originally Posted by cpapplefamily (Post 1523454)
Can we not stream and us Grip at the same time?

If it's a USB webcam, probably not. I don't think multiple applications can access a USB webcam on linux at the same time.

One planned feature for the next minor version of GRIP is a "publish image" operation. That should let you look at any image in your pipeline using SmartDashboard.

krieck 14-01-2016 12:52

Re: We are going to Want a GRIP fourm
 
I see the option for deploying a GRIP pipeline to the roboRIO. However, I'd like to try running my pipeline on a Raspberry Pi.

Is there an easy way to simply generate the pipeline's grip.jar file onto my local filesystem?

cpapplefamily 14-01-2016 12:55

Re: We are going to Want a GRIP fourm
 
Quote:

Originally Posted by ThomasClark (Post 1523567)
If it's a USB webcam, probably not. I don't think multiple applications can access a USB webcam on linux at the same time.

One planned feature for the next minor version of GRIP is a "publish image" operation. That should let you look at any image in your pipeline using SmartDashboard.

Seen that in the issues tab of the project #355. Would help heaps. Also is there talk about adding blocks to get data from the SmartDashboard to get values to plug into the slider controls to dynamically control the filters from the Robot or Smartdashboard?

BrianAtlanta 14-01-2016 13:19

Re: We are going to Want a GRIP fourm
 
I love the discussion going on. I've challenged our programming team with GRIP. I've asked them to give a short presentation to the team leaders and mentors about GRIP. What is it, what can it do, what are the pain points, and how can it make our bot better.

My first thought is to run it on a Raspberry Pi too. But we'll see. With all the talk in here, I think they'll get a good feel of what to expect. It might be interesting to spin up an IRC chat room in the evenings for help/advice, if there is interest in it. Being an alpha version, we're all experiencing growing pains.

Brian

rsisk 14-01-2016 13:35

Re: We are going to Want a GRIP fourm
 
Help me out please... What is GRIP?

Can you point me to documentation/description?

BrianAtlanta 14-01-2016 13:54

Re: We are going to Want a GRIP fourm
 
GRIPis GRaphical Iage Processing. It allows easy creation of 'pipelines' that will allow you to identify objects. It's not apart of your robot code, but is a separate program. After getting things setup, you then have to connect the data from GRIP to your robot software.


Jojoguy10 posted a link for more information: http://wpilib.screenstepslive.com/s/4485/m/50711

cpapplefamily 14-01-2016 13:55

Re: We are going to Want a GRIP fourm
 
Quote:

Originally Posted by rsisk (Post 1523588)
Help me out please... What is GRIP?

Can you point me to documentation/description?

GRIP - Graphical Image Processing

Ti-Gars 14-01-2016 15:04

Re: We are going to Want a GRIP fourm
 
Quote:

Originally Posted by cpapplefamily (Post 1523454)
JAVA:
Code:

Runtime.getRuntime().exec(new String[]{"/usr/local/frc/JRE/bin/java", "-jar", "grip.jar", filename});

Is "filename" a variable in your code, or am I supossed to write something specific? If I only write filename, eclipse is showing me an error

jmguillemette 14-01-2016 15:22

Re: We are going to Want a GRIP fourm
 
Quote:

Originally Posted by ThomasClark (Post 1523567)
If it's a USB webcam, probably not. I don't think multiple applications can access a USB webcam on linux at the same time.

One planned feature for the next minor version of GRIP is a "publish image" operation. That should let you look at any image in your pipeline using SmartDashboard.

Thomas

if you have insight into the inner working of GRIP..
can you provide a build of the existing version where by i can programmatically start (<here is my .grip file) and stop() grip.
suggesting we call out to an external process to run it means we have no control over grips lifecyle in relation to our robot.

cpapplefamily 14-01-2016 15:35

Re: We are going to Want a GRIP fourm
 
Quote:

Originally Posted by Ti-Gars (Post 1523643)
Is "filename" a variable in your code, or am I supossed to write something specific? If I only write filename, eclipse is showing me an error

I'm Quoting from https://github.com/WPIRoboticsProjec...va-FRC-program

In my code I created a variable to String filename = "myGripProgram.grip"; There is no documentation on how or why to do this I just assumed. It hasn't work for me yet.

ThomasClark 14-01-2016 18:08

Re: We are going to Want a GRIP fourm
 
Quote:

Originally Posted by krieck (Post 1523568)
I see the option for deploying a GRIP pipeline to the roboRIO. However, I'd like to try running my pipeline on a Raspberry Pi.

Is there an easy way to simply generate the pipeline's grip.jar file onto my local filesystem?

I haven't tried running GRIP on a raspberry pi, but it might work. On Windows, the headless jar is likely at C:\Users\YourName\AppData\GRIP\app\core-1.0.0.jar. On Linux it's /opt/GRIP/app/core-1.0.0.jar (this jar is renamed to grip.jar and uploaded to the roboRIO when you deploy).

I don't think JavaFX has been ported to arm linux, so you probably can only run in headless mode on a Pi. Let us know if it works.

Quote:

Originally Posted by cpapplefamily (Post 1523570)
Also is there talk about adding blocks to get data from the SmartDashboard to get values to plug into the slider controls to dynamically control the filters from the Robot or Smartdashboard?

That definitely sounds like a cool idea. If you open an issue on GitHub, I can make sure you get notified when we implement this

ThomasClark 14-01-2016 18:10

Re: We are going to Want a GRIP fourm
 
Quote:

Originally Posted by jmguillemette (Post 1523654)
Thomas

if you have insight into the inner working of GRIP..
can you provide a build of the existing version where by i can programmatically start (<here is my .grip file) and stop() grip.
suggesting we call out to an external process to run it means we have no control over grips lifecyle in relation to our robot.

If you're using java, I think you could also use the GRIP jar as a library in your robot project. That would let you manipulate the pipeline however you want. I'll play around with this idea and write up a tutorial if I can get it to work

We also might want to just let people start and stop the pipeline by setting a boolean in NetworkTables. Thoughts?

Thad House 14-01-2016 18:28

Re: We are going to Want a GRIP fourm
 
Quote:

Originally Posted by ThomasClark (Post 1523793)
I haven't tried running GRIP on a raspberry pi, but it might work. On Windows, the headless jar is likely at C:\Users\YourName\AppData\GRIP\app\core-1.0.0.jar. On Linux it's /opt/GRIP/app/core-1.0.0.jar (this jar is renamed to grip.jar and uploaded to the roboRIO when you deploy).

I don't think JavaFX has been ported to arm linux, so you probably can only run in headless mode on a Pi. Let us know if it works.



That definitely sounds like a cool idea. If you open an issue on GitHub, I can make sure you get notified when we implement this

I was going to test running it on a Pi2 soon. However, NetworkTables will most likely not work without a specific NetworkTables build for Pi2, and OpenCV probably will run into the same issue. I know 100% it won't work on a Pi 1, however I haven't tested on a Pi 2. I know I tried RoboRIO binaries on a BeagleBoneBlack, and they did not work. And a Pi2 and BBB should be able to run the same binaries.

ajaquin3171 14-01-2016 19:39

Re: We are going to Want a GRIP fourm
 
Has anyone been able to successfully deploy grip to their roboRio? Every time we try to deploy it we get a message saying that it failed. Has anyone encountered this error before? The firewall on our laptop is also turned completely off as well.

Arhowk 14-01-2016 20:26

Re: We are going to Want a GRIP fourm
 
Pardon my ignorance but I can't seem to find the example files for the 2016 game.. the GitHub has the last 3 games (in addition to 3 fotos of a goat) but no 2016 game samples.

ThomasClark 14-01-2016 21:04

Re: We are going to Want a GRIP fourm
 
Quote:

Originally Posted by Arhowk (Post 1523881)
Pardon my ignorance but I can't seem to find the example files for the 2016 game.. the GitHub has the last 3 games (in addition to 3 fotos of a goat) but no 2016 game samples.

https://usfirst.collab.net/sf/frs/do...6_field_images

ThomasClark 14-01-2016 21:13

Re: We are going to Want a GRIP fourm
 
Quote:

Originally Posted by Thad House (Post 1523806)
I was going to test running it on a Pi2 soon. However, NetworkTables will most likely not work without a specific NetworkTables build for Pi2, and OpenCV probably will run into the same issue. I know 100% it won't work on a Pi 1, however I haven't tested on a Pi 2. I know I tried RoboRIO binaries on a BeagleBoneBlack, and they did not work. And a Pi2 and BBB should be able to run the same binaries.

Yeah, I was afraid that might be true. The roboRIO and Raspbery Pi are both Linux/ARM, but they probably have different libc and kernel versions that make native binaries incompatible. I don't have a Raspberry Pi, but I'll see if I can get my hands on one and build and test the necessary binaries.

For updates, you can subscribe to this issue: https://github.com/WPIRoboticsProjects/GRIP/issues/366

cpapplefamily 14-01-2016 22:48

Re: We are going to Want a GRIP fourm
 
Quote:

Originally Posted by ajaquin3171 (Post 1523851)
Has anyone been able to successfully deploy grip to their roboRio? Every time we try to deploy it we get a message saying that it failed. Has anyone encountered this error before? The firewall on our laptop is also turned completely off as well.

Yes a few have. I have a few times too. Seems you may want to try in the settings both roborio-####-frc:local or 10.##.##.20 then when you go to deploy select the FRC advance. You will find the Deploy button is disabled. Edit the box but return it to what it was. (ie delete the .20 and retype .20) The button will enable.

#### - your roborio team number

For me roborio-####-frc:local did not fail but it did not transfer the files as well. When I used 10.##.##.20 it deployed and I got a Play/stop button above the counsel window.

I'm still working on launching the Grip.jar from the robot code. Grip has a wiki to do this but its not working for me.

Mark_Ebert 14-01-2016 23:33

Re: We are going to Want a GRIP fourm
 
We have tried using the advanced tab and retyping in the roboRio's address and have tried it using the mDNS and the IP address wirelessly and also directly connected to the roboRio through the USB 2.0 type B cable and none of these way seems to be able to deploy to the roboRio from GRIP. Though running GRIP from our pc we are still able to have it work and successfully use the Network tables, we are just unable to have the program deploy to the roboRio so that we don't require the laptop.

cpapplefamily 14-01-2016 23:42

Re: We are going to Want a GRIP fourm
 
Quote:

Originally Posted by Mark_Ebert (Post 1524008)
We have tried using the advanced tab and retyping in the roboRio's address and have tried it using the mDNS and the IP address wirelessly and also directly connected to the roboRio through the USB 2.0 type B cable and none of these way seems to be able to deploy to the roboRio from GRIP. Though running GRIP from our pc we are still able to have it work and successfully use the Network tables, we are just unable to have the program deploy to the roboRio so that we don't require the laptop.

Did you set the deploy address in the settings tab where you set the network table address and team number. Did you try both mDNS and ip from there first before going to the deploy gui? I have not nailed down how I got it to work yet. Was earlier today and have not gotten back.

Mark_Ebert 14-01-2016 23:54

Re: We are going to Want a GRIP fourm
 
Yes, we have tried all available addresses to connect to the roboRio with. I was starting to think it may be a configuration issue though be we are not sure. Have you setup any sort of password or user account in the NI Web Dashboard that would allow GRIP to push the needed files onto the roboRio or are you guys just using the default admin account with no password?

cpapplefamily 15-01-2016 00:11

Re: We are going to Want a GRIP fourm
 
I did download and install filezila per the wpilib.setupscreens pages to connect and browse the roboRio via sftp. I wanted to see the deploied files. They were not the. The next day when testing again I got a successful deploy. This could of punched a hole in somewhere? It did confirm that files could be transferred or maybe when it logged in it opened the password.

I have had chats with the developers because I wished to directly copy the files. Coping the grip.1.0.0.jar as grip.jar and myGripPipe.grip to the usr/ivuser and sound like it might work. I have to confirm the file locations as I'm not near my pc now. Look at the wiki java/cpp page it exposes the rio folder location "deploy " use. This would be OK for me if I can get the robot code to launch grip.jar. as per the same java/cpp page.

Mark_Ebert 15-01-2016 00:23

Re: We are going to Want a GRIP fourm
 
I have tried copying the files over manually however they did not work. When you were able to successfully deploy, were you doing it over ethernet?

cpapplefamily 15-01-2016 00:32

Re: We are going to Want a GRIP fourm
 
I was wire ethernet. I was also using last year's hub. We have not dug into the new bag of tricks other than to inventory.

H2O Enthusiast 15-01-2016 13:06

Re: We are going to Want a GRIP fourm
 
Quote:

Originally Posted by Peter Johnson (Post 1523289)
I just tried your exact code using "GRIP/myContoursReport" (with no leading "/") and it works for me. When run with a leading "/" it doesn't work, because NetworkTable.getTable() unconditionally prepends "/" to the name you provide it.

As a side note, you really should put the operational part of your code into robotMain() instead of robotInit(), because FRCNetworkCommunication isn't getting initialized this way (you'll note it's not possible to enable your robot and the driver station says "no robot code" because you're never exiting robotInit).

By robotMain() do you mean outside the robotInit() but inside the Robot() class? Also, by operational part of my code do you mean where I publish the data?

Peter Johnson 15-01-2016 16:32

Re: We are going to Want a GRIP fourm
 
Quote:

Originally Posted by H2O Enthusiast (Post 1524272)
By robotMain() do you mean outside the robotInit() but inside the Robot() class? Also, by operational part of my code do you mean where I publish the data?

Yes to both questions. If you look at SampleRobot.java (the base class your code is using), you'll see there's a number of different functions you can override. robotInit() is one. robotMain() is another (as is operatorControl(), disabled(), autonomous(), etc). The startCompetition() function shows the sequence in which these functions are called. robotInit() is called first, and should contain only initialization code -- code you want to run before the match. Only after robotInit() returns does startCompetition() call the FRCNetworkCommunicationsLibrary to let the driver station know robot code is ready to run (which is what makes "No Robot Code" disappear). Note it's somewhat risky to override robotMain() instead of the individual operatorControl(), disabled(), etc. functions, as you will need to handle the state transitions between these modes yourself (versus having startCompetition() handle it for you).

While SampleRobot is okay for small test programs like this one, for your actual competition robot code, if you don't want to do command-based programming, I recommend you use a different template such as IterativeRobot and override only robotInit and the various autonomous/operatorControl functions. The IterativeRobot class startCompetition() function will take care of calling these functions in the right order and putting in appropriate delays to not swamp the CPU.

hewittalec 15-01-2016 18:57

Re: We are going to Want a GRIP fourm
 
Hello. New to vision processing.

I'm trying to deploy GRIP to my roborio but no luck. It doesn't tell me that it failed, it simply spins and there is no run button or console activity. I've tried deploying to roborio-58-frc.local and other ip addresses.

As a side note I also cannot get Network table data from the outline viewer. thanks.

1337WaffleBendr 15-01-2016 21:59

Re: We are going to Want a GRIP fourm
 
^^^^^^
Same :-/

ThomasClark 15-01-2016 22:35

Re: We are going to Want a GRIP fourm
 
I honestly can't help much with deploying, maybe try checking the issues page for similar problems.

If you go to the chat you can also talk to @JLLeitschuh, who wrote the deploy code.

cpapplefamily 16-01-2016 12:36

Re: We are going to Want a GRIP fourm
 
Quote:

Originally Posted by hewittalec (Post 1524508)
Hello. New to vision processing.

I'm trying to deploy GRIP to my roborio but no luck. It doesn't tell me that it failed, it simply spins and there is no run button or console activity. I've tried deploying to roborio-58-frc.local and other ip addresses.

As a side note I also cannot get Network table data from the outline viewer. thanks.

When the robot is on Communication to the drivers station with the smartdashboard working and displaying data from robot code run GRIP on the PC. Set the GRIP project NetworkTable address to 10.TE.AM.20 (Is you TEAM 0058?) if not your roborio-58-frc.local is wrong and should be roborio-TEAM-frc.local were TEAM = your number 1234. Now create a pipeline in GRIP to write data to the Network table. Online Viewer.jar should show your smart dashboard data and Grip Data. You must also enter 10.TE.AM.20 in the Online Viewer and select client. Or Test GRIP not using the Roborio by tring to follow a suggestion I made on the GRIP issues pages. https://github.com/WPIRoboticsProjects/GRIP/issues/349

cpapplefamily 16-01-2016 23:44

Re: We are going to Want a GRIP fourm
 
new page to the wiki

Tutorial:-Deploy-to-the-Robot

team-4480 17-01-2016 12:48

Re: We are going to Want a GRIP fourm
 
This may sound really stupid, but for the life of me, I can't figure out how to get the results from the "Publish ContoursReport". I don't want to deploy it onto the robot yet, but I want to be able to see what the X and Y coordinates it finds in the sample images so I can try and write a program that would make decisions on it.

cpapplefamily 17-01-2016 12:55

Re: We are going to Want a GRIP fourm
 
Quote:

Originally Posted by team-4480 (Post 1525352)
This may sound really stupid, but for the life of me, I can't figure out how to get the results from the "Publish ContoursReport". I don't want to deploy it onto the robot yet, but I want to be able to see what the X and Y coordinates it finds in the sample images so I can try and write a program that would make decisions on it.

I did share a way with the developers and they marked it as a Wiki item. I just started poking through their code and with their blessing my help and write this to the Wiki. For the mean time check this out.

https://github.com/WPIRoboticsProjects/GRIP/issues/349

team-4480 17-01-2016 13:11

Re: We are going to Want a GRIP fourm
 
Quote:

Originally Posted by cpapplefamily (Post 1525363)
I did share a way with the developers and they marked it as a Wiki item. I just started poking through their code and with their blessing my help and write this to the Wiki. For the mean time check this out.

https://github.com/WPIRoboticsProjects/GRIP/issues/349

Is there a way to just get the Outline Viewer? We use Python so I would rather not have to install Eclipse and Java in order to just use the one program.

cpapplefamily 17-01-2016 13:25

Re: We are going to Want a GRIP fourm
 
I wonder if you could extract it from the off line Java tools install method mentioned at the end of the "Installing Eclipse (C++/Java)" set up pages.

MultipleMono 17-01-2016 14:32

Re: We are going to Want a GRIP fourm
 
To everyone having deployment problems, you can also try to deploy it manually:

1. Set your publish address in GRIP's settings to your RoboRIO's address (roborio-<teamnumber>.local)
2. SCP (using PuTTY pscp on Windows) app/core-1.0.0-all.jar from GRIP's install location (typically C:\Users\<username>\AppData\Local\GRIP) to your RoboRIO:

Code:

pscp app\core-1.0.0-all.jar lvuser@roborio-<teamnumber>.local:/home/lvuser/GRIP.jar
3. SCP your grip profile:

Code:

pscp profile.grip lvuser@roborio-<teamnumber>.local:/home/lvuser
4. Login over ssh/PuTTY to the lvuser account
5. Start GRIP:

Code:

java -jar GRIP.jar profile.grip

ThomasClark 22-01-2016 12:22

Re: We are going to Want a GRIP fourm
 
Quote:

Originally Posted by ajaquin3171 (Post 1523851)
Has anyone been able to successfully deploy grip to their roboRio? Every time we try to deploy it we get a message saying that it failed. Has anyone encountered this error before? The firewall on our laptop is also turned completely off as well.

Quote:

Originally Posted by Mark_Ebert (Post 1524008)
We have tried using the advanced tab and retyping in the roboRio's address and have tried it using the mDNS and the IP address wirelessly and also directly connected to the roboRio through the USB 2.0 type B cable and none of these way seems to be able to deploy to the roboRio from GRIP. Though running GRIP from our pc we are still able to have it work and successfully use the Network tables, we are just unable to have the program deploy to the roboRio so that we don't require the laptop.

Quote:

Originally Posted by hewittalec (Post 1524508)
Hello. New to vision processing.

I'm trying to deploy GRIP to my roborio but no luck. It doesn't tell me that it failed, it simply spins and there is no run button or console activity. I've tried deploying to roborio-58-frc.local and other ip addresses.

As a side note I also cannot get Network table data from the outline viewer. thanks.

FYI GRIP v1.1.x is out now. This show hopefully fix all of your deploying problems and more.


All times are GMT -5. The time now is 07:14.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi