Go to Post We were also at 9,999 [characters] for Chairmans...Mom always said I was an under-achiever. - Chris Fultz [more]
Home
Go Back   Chief Delphi > Technical > Control System
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 26-01-2016, 15:49
moomoomoo309 moomoomoo309 is offline
Registered User
FRC #0224
 
Join Date: Jan 2016
Location: Piscataway
Posts: 9
moomoomoo309 is an unknown quantity at this point
Data from GRIP not available in Java Code

I've been using a roboRIO and trying to get a Contour Report from GRIP into my code. GRIP works well enough; data comes from it and into the Network Table viewer (I can see all of the data in the Network Table Viewer!). Once I attempt to get the data from the NetworkTable into my code, it does not work.

What I've tried (in teleopPeriodic) given table=NetworkTable.getTable("GRIP/myCountoursReport")):
  • Printing out table.getKeys() (which is empty)
  • Checking if a given index (I.E area) exists (table.containsKey("area") was false)
  • Publishing a different number into the GRIP table and trying to get that (put the framerate into the table, NetworkTable.getTable("GRIP").getNumber("myNumber" ,Double.NaN) returns NaN)

Do you have any advice for how I can fix this problem, or any other diagnostic steps you may need?
Reply With Quote
  #2   Spotlight this post!  
Unread 27-01-2016, 12:43
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: Data from GRIP not available in Java Code

Is OutlineViewer in client mode or server mode?

What is the NetworkTables server address in GRIP?
__________________
GRIP (Graphically Represented Image Processing) - rapidly develop computer vision algorithms for FRC
Reply With Quote
  #3   Spotlight this post!  
Unread 27-01-2016, 14:35
moomoomoo309 moomoomoo309 is offline
Registered User
FRC #0224
 
Join Date: Jan 2016
Location: Piscataway
Posts: 9
moomoomoo309 is an unknown quantity at this point
Re: Data from GRIP not available in Java Code

The OutlineViewer is in client mode and the NetworkTables server address is roborio-224-frc.local. GRIP deploys fine, and the data is correct in the OutlineViewer, but I can't import any NetworkTables.

Last edited by moomoomoo309 : 27-01-2016 at 14:46.
Reply With Quote
  #4   Spotlight this post!  
Unread 27-01-2016, 14:37
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: Data from GRIP not available in Java Code

What is GRIP running on?

Can you share a screenshot of your pipeline?
__________________
GRIP (Graphically Represented Image Processing) - rapidly develop computer vision algorithms for FRC
Reply With Quote
  #5   Spotlight this post!  
Unread 27-01-2016, 14:48
moomoomoo309 moomoomoo309 is offline
Registered User
FRC #0224
 
Join Date: Jan 2016
Location: Piscataway
Posts: 9
moomoomoo309 is an unknown quantity at this point
Re: Data from GRIP not available in Java Code

GRIP is running on a Windows 7 laptop, and here's the pipeline.

Reply With Quote
  #6   Spotlight this post!  
Unread 27-01-2016, 14:59
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: Data from GRIP not available in Java Code

Everything seems OK from the GRIP side of things. Can you post a link to your full robot code?
__________________
GRIP (Graphically Represented Image Processing) - rapidly develop computer vision algorithms for FRC
Reply With Quote
  #7   Spotlight this post!  
Unread 27-01-2016, 15:07
moomoomoo309 moomoomoo309 is offline
Registered User
FRC #0224
 
Join Date: Jan 2016
Location: Piscataway
Posts: 9
moomoomoo309 is an unknown quantity at this point
Re: Data from GRIP not available in Java Code

http://pastebin.com/8WrBNeK6

Here's the code. When I get the table, it always returns an empty one.
Reply With Quote
  #8   Spotlight this post!  
Unread 27-01-2016, 15:17
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: Data from GRIP not available in Java Code

PHP Code:
table NetworkTable.getTable("GRIP/myCountoursReport"); 
should be


PHP Code:
table NetworkTable.getTable("GRIP/myContoursReport"); 
__________________
GRIP (Graphically Represented Image Processing) - rapidly develop computer vision algorithms for FRC
Reply With Quote
  #9   Spotlight this post!  
Unread 27-01-2016, 15:26
moomoomoo309 moomoomoo309 is offline
Registered User
FRC #0224
 
Join Date: Jan 2016
Location: Piscataway
Posts: 9
moomoomoo309 is an unknown quantity at this point
Re: Data from GRIP not available in Java Code

Thank you, that fixed it. It's always the simple mistakes that get us.

On a side note, why did "NetworkTable.getTable("GRIP").getKeys()" return an empty set? Shouldn't it have "myContoursReport" in it?
Reply With Quote
  #10   Spotlight this post!  
Unread 27-01-2016, 15:28
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: Data from GRIP not available in Java Code

getKeys() returns the set of values directly inside the GRIP table. I don't think it include subtables.

getSubTables() is probably what you're looking for.
__________________
GRIP (Graphically Represented Image Processing) - rapidly develop computer vision algorithms for FRC
Reply With Quote
Reply


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 03:46.

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