OCCRA
Go to Post The Glass is Half Full - Optimist.......The Glass is Half Empty - Pessimist.......The Glass is too Big - Engineer - mpking [more]
Home
Go Back   Chief Delphi > Technical > Programming > Python
CD-Media  
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 01-30-2018, 12:56 AM
Romanos Romanos is offline
Registered User
no team
 
Join Date: Jan 2018
Location: US
Posts: 3
Romanos is an unknown quantity at this point
Problem with Networktables

Hello

I have problem with networktables and GRIP pipeline processing python script.

I am trying to set up raspberry Pi 3 as co-processor for vision system.

1. I created GRIP pipeline with my windows 10 laptop and I copied it into raspberry Pi 3 along with script to proceed with this pipeline and send coordinates of contoured target.

2. I installed Pynetworktables tables as You see on image bellow


3. I am trying to execute python script and I have such error:



I have not any idea how to fix this error.

I have hope that You can help me handle it.
Reply With Quote
  #2   Spotlight this post!  
Unread 01-30-2018, 07:18 AM
vScourge's Avatar
vScourge vScourge is offline
Videogame Developer
AKA: Adam Pletcher
FRC #4096 (Ctrl-Z)
Team Role: Coach
 
Join Date: Jan 2014
Rookie Year: 2012
Location: Champaign, IL
Posts: 67
vScourge will become famous soon enough
Re: Problem with Networktables

[edit]
Are you sure you're running the correct install of Python? Verify networktables is on the python path somewhere.

Code:
import sys
print(sys.path)
Reply With Quote
  #3   Spotlight this post!  
Unread 01-30-2018, 07:26 AM
vScourge's Avatar
vScourge vScourge is offline
Videogame Developer
AKA: Adam Pletcher
FRC #4096 (Ctrl-Z)
Team Role: Coach
 
Join Date: Jan 2014
Rookie Year: 2012
Location: Champaign, IL
Posts: 67
vScourge will become famous soon enough
Re: Problem with Networktables

Actually, scratch that suggestion. It's finding that module, just not finding that class inside it. This may have to do with the fact your test file is named "...grip/networktables.py". Try renaming your script to something else and give it another go.
Reply With Quote
  #4   Spotlight this post!  
Unread 01-30-2018, 11:05 PM
Romanos Romanos is offline
Registered User
no team
 
Join Date: Jan 2018
Location: US
Posts: 3
Romanos is an unknown quantity at this point
Re: Problem with Networktables

Thank You for Your reply vScourge, there is one line of error less right now.




Bellow You can see this python script begin:




Any other idea how to fix it?

Thanks
Reply With Quote
  #5   Spotlight this post!  
Unread 01-31-2018, 01:11 AM
auscompgeek's Avatar
auscompgeek auscompgeek is offline
Registered User
AKA: David Vo
FRC #4774 (The Drop Bears)
Team Role: Mentor
 
Join Date: Jan 2018
Rookie Year: 2016
Location: Sydney, Australia
Posts: 34
auscompgeek is an unknown quantity at this point
Re: Problem with Networktables

That looks like very old NetworkTables code. The only thing you need to import is:

Code:
from networktables import NetworkTables
You can take a read of our NetworkTables docs here: https://robotpy.readthedocs.io/proje...atest/api.html
Reply With Quote
  #6   Spotlight this post!  
Unread 02-01-2018, 11:02 PM
Romanos Romanos is offline
Registered User
no team
 
Join Date: Jan 2018
Location: US
Posts: 3
Romanos is an unknown quantity at this point
Re: Problem with Networktables

Thank You for answer. I fixed problem with NetworkTables right now,

There was missed "s" in code (should be NetworkTables, not NetworkTable)

But now I am getting problem with proceed pipeline, can You look at this error code and help me again? why value cv2.contourArea(hull) is equal 0 ?

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 06:37 AM.

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


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi