Go to Post Go get Al, he probably isn't busy! - Jimmy Nichols [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 15-02-2016, 20:36
Cobra Commander's Avatar
Cobra Commander Cobra Commander is offline
Registered User
FRC #0498 (Cobra Commanders)
Team Role: Leadership
 
Join Date: Jan 2015
Rookie Year: 2001
Location: Glendale, AZ
Posts: 30
Cobra Commander is on a distinguished road
Question Grip persist after Robot reset

Is there a way to make Grip stay and run automatically after the robot restarts?

It works fine if I deploy it and use it without power cycling the robot.

If not, having to redeploy at the beginning of each match would most likely count as a delay penalty.
  #2   Spotlight this post!  
Unread 15-02-2016, 20:39
robert1356 robert1356 is offline
Registered User
AKA: Robert Palmer
FRC #3824 (RoHAWKtics)
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2012
Location: Knoxville, TN
Posts: 48
robert1356 is an unknown quantity at this point
Re: Grip persist after Robot reset

Quote:
Originally Posted by Cobra Commander View Post
Is there a way to make Grip stay and run automatically after the robot restarts?

It works fine if I deploy it and use it without power cycling the robot.

If not, having to redeploy at the beginning of each match would most likely count as a delay penalty.
You need to add code to your robot code to start GRIP. This is documented on the GRIP github Wiki
  #3   Spotlight this post!  
Unread 15-02-2016, 22:05
Cobra Commander's Avatar
Cobra Commander Cobra Commander is offline
Registered User
FRC #0498 (Cobra Commanders)
Team Role: Leadership
 
Join Date: Jan 2015
Rookie Year: 2001
Location: Glendale, AZ
Posts: 30
Cobra Commander is on a distinguished road
Re: Grip persist after Robot reset

For anyone else who didn't know this. Here is the link to the article.

https://github.com/WPIRoboticsProjec...EW-FRC-program
  #4   Spotlight this post!  
Unread 16-02-2016, 00:37
Cobra Commander's Avatar
Cobra Commander Cobra Commander is offline
Registered User
FRC #0498 (Cobra Commanders)
Team Role: Leadership
 
Join Date: Jan 2015
Rookie Year: 2001
Location: Glendale, AZ
Posts: 30
Cobra Commander is on a distinguished road
Re: Grip persist after Robot reset

After looking at the wiki I'm still having trouble. I am having a permission denied error.

We are using Java.

I am trying to start "/home/lvuser/grip.jar" is this the right file?

The code
Code:
try {
        	 new ProcessBuilder("/home/lvuser/grip.jar").inheritIO().start();
            SmartDashboard.putString("Grip", "Started");
            System.out.println("Grip Process Started"); //Print to RioLog
        } catch (Exception e) {
            SmartDashboard.putString("Grip", "Is Bad News");
            e.printStackTrace();
        }
		visionTable = NetworkTable.getTable("GRIP/myContoursReport");
The Error
Code:
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1042) 
 	at org.usfirst.frc.team498.robot.Robot.<init>(Robot.java:23) 
 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) 
 	at java.lang.reflect.Constructor.newInstance(Constructor.java:408) 
 	at edu.wpi.first.wpilibj.RobotBase.main(RobotBase.java:204) 
 	at java.lang.UNIXProcess.forkAndExec(Native Method) 
 	at java.lang.ProcessImpl.start(ProcessImpl.java:134) 
 	... 8 more 
 platform: /Linux/arm/ 
 	at org.usfirst.frc.team498.robot.VisionManager2016.<init>(VisionManager2016.java:26) 
 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) 
 Caused by: java.io.IOException: error=13, Permission denied 
 	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1023) 
 java.io.IOException: Cannot run program "/home/lvuser/grip.jar": error=13, Permission denied 
 	at java.lang.Class.newInstance(Class.java:433) 
 NT: server: client CONNECTED: 10.4.98.147 port 49582 
 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 
 	at java.lang.UNIXProcess.<init>(UNIXProcess.java:187)
  #5   Spotlight this post!  
Unread 16-02-2016, 17:21
ThomasClark's Avatar
ThomasClark ThomasClark is offline
Registered User
FRC #0237
 
Join Date: Dec 2012
Location: Watertown, CT
Posts: 146
ThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud of
Re: Grip persist after Robot reset

Quote:
Originally Posted by Cobra Commander View Post
After looking at the wiki I'm still having trouble. I am having a permission denied error.

We are using Java.

I am trying to start "/home/lvuser/grip.jar" is this the right file?
Check out the wiki page. You actually just need to run "/home/lvuser/grip", which is a wrapper script that kills previous instances of GRIP and runs it with the appropriate command line args.
__________________
GRIP (Graphically Represented Image Processing) - rapidly develop computer vision algorithms for FRC
  #6   Spotlight this post!  
Unread 16-02-2016, 20:21
Cobra Commander's Avatar
Cobra Commander Cobra Commander is offline
Registered User
FRC #0498 (Cobra Commanders)
Team Role: Leadership
 
Join Date: Jan 2015
Rookie Year: 2001
Location: Glendale, AZ
Posts: 30
Cobra Commander is on a distinguished road
Re: Grip persist after Robot reset

I had tried that originally.

This is the error I get with the copy and paste initialization.

Code:
➔ Launching «'/usr/local/frc/JRE/bin/java' '-jar' '/home/lvuser/FRCUserProgram.jar'» 
 java.io.IOException: Cannot run program "/home/lvuser/grip": error=2, No such file or directory 
 	at org.usfirst.frc.team498.robot.Robot.robotInit(Robot.java:23) 
 	at edu.wpi.first.wpilibj.RobotBase.main(RobotBase.java:241) 
 	at java.lang.UNIXProcess.forkAndExec(Native Method) 
 	at java.lang.ProcessImpl.start(ProcessImpl.java:134) 
 	... 3 more 
 platform: /Linux/arm/ 
 	at edu.wpi.first.wpilibj.SampleRobot.startCompetition(SampleRobot.java:124) 
 	at java.lang.UNIXProcess.<init>(UNIXProcess.java:187) 
  	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1042) 
 	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1023) 
 Caused by: java.io.IOException: error=2, No such file or directory
Is there possibly a step I am missing in the deploying process from the GUI part of GRIP?
  #7   Spotlight this post!  
Unread 16-02-2016, 20:22
ThomasClark's Avatar
ThomasClark ThomasClark is offline
Registered User
FRC #0237
 
Join Date: Dec 2012
Location: Watertown, CT
Posts: 146
ThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud of
Re: Grip persist after Robot reset

Do you have an old version of GRIP? If so, you should upgrade to v1.2.0 and deploy again

If not, can you post the log from the deploy console?
__________________
GRIP (Graphically Represented Image Processing) - rapidly develop computer vision algorithms for FRC
  #8   Spotlight this post!  
Unread 16-02-2016, 23:10
Cobra Commander's Avatar
Cobra Commander Cobra Commander is offline
Registered User
FRC #0498 (Cobra Commanders)
Team Role: Leadership
 
Join Date: Jan 2015
Rookie Year: 2001
Location: Glendale, AZ
Posts: 30
Cobra Commander is on a distinguished road
Re: Grip persist after Robot reset

Yep! I was still using an old version. Thank you for the help. All appears to work now.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 01:30.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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