Go to Post FIRST: The hardest thing you'll ever love to do. - Stephen Kowski [more]
Home
Go Back   Chief Delphi > Technical > Programming > Python
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 Yesterday, 18:54
Jayd009's Avatar
Jayd009 Jayd009 is online now
Registered User
AKA: Jonathan
FRC #4468 (Fernbank LINKS)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2016
Location: Atlanta, Georgia
Posts: 37
Jayd009 is on a distinguished road
Exclamation Raspberry Pi Stops PyNetworkTables

Hello everyone,

My team is attempting to create a vision processing system with a raspberry pi connected to the RIO through ethernet and with pynetworktables. Today, while we were testing, the pi just stopped sending networktables values. We couldn't change anything on the table. The server appears to be working fine on the RIO where we could change variables with the outline viewer from our computer, but nothing is working from the Pi. Everything is imaged, the pi is picking up a RIO on the network (verified with ping), we have the pi connected to the RIO by using the initialize command (with the mDNS name of the RIO), but nothing is working. When we ran the .isConnected() method on the pi, all it returned was false. We know we've set all the variables up correctly, but the pi just doesn't want to connect to the RIO. How do we fix this?

Code on Github: https://github.com/FernbankLINKSRobo...master/main.py

Thanks,

Jonathan Daniel
Head Programmer
Fernbank LINKS Robotics
__________________
2016: District Event Winner @ Columbus District Qualifier (PCH)
2016: Engineering Inspiration Award @ Peachtree District State Championship
2016: Tesla Subdivision Playoffs Appearance @ FIRST Championship


Reply With Quote
  #2   Spotlight this post!  
Unread Yesterday, 21:02
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,114
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: Raspberry Pi Stops PyNetworkTables

I'm assuming that if you restarted the vision program then it would work again? Or did you try that and it didn't work?
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
Reply With Quote
  #3   Spotlight this post!  
Unread Yesterday, 21:05
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,114
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: Raspberry Pi Stops PyNetworkTables

Also, was there any console output? And are you positive that your code loop was still executing (maybe inserting a periodic print statement?).
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
Reply With Quote
  #4   Spotlight this post!  
Unread Yesterday, 21:06
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,114
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: Raspberry Pi Stops PyNetworkTables

Oh, also, you ignored the first rule when setting up pynetworktables -- NEVER use mDNS names, always use static IPs. Try changing that and see if it fixes your issue.

http://robotpy.readthedocs.io/en/sta...-configuration
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
Reply With Quote
  #5   Spotlight this post!  
Unread Yesterday, 21:48
Jayd009's Avatar
Jayd009 Jayd009 is online now
Registered User
AKA: Jonathan
FRC #4468 (Fernbank LINKS)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2016
Location: Atlanta, Georgia
Posts: 37
Jayd009 is on a distinguished road
Re: Raspberry Pi Stops PyNetworkTables

We did attempt the static IP and it still wouldn't connect. It also wouldn't work after rebooting the Pi and the RIO.
__________________
2016: District Event Winner @ Columbus District Qualifier (PCH)
2016: Engineering Inspiration Award @ Peachtree District State Championship
2016: Tesla Subdivision Playoffs Appearance @ FIRST Championship


Reply With Quote
  #6   Spotlight this post!  
Unread Yesterday, 21:49
Jayd009's Avatar
Jayd009 Jayd009 is online now
Registered User
AKA: Jonathan
FRC #4468 (Fernbank LINKS)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2016
Location: Atlanta, Georgia
Posts: 37
Jayd009 is on a distinguished road
Re: Raspberry Pi Stops PyNetworkTables

The loop was executing, and it was running the lines responsible for inputting variables. We even tested it in the python shell cmd line and it still wouldn't input values.
__________________
2016: District Event Winner @ Columbus District Qualifier (PCH)
2016: Engineering Inspiration Award @ Peachtree District State Championship
2016: Tesla Subdivision Playoffs Appearance @ FIRST Championship


Reply With Quote
  #7   Spotlight this post!  
Unread Yesterday, 23:13
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,114
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: Raspberry Pi Stops PyNetworkTables

Quote:
Originally Posted by Jayd009 View Post
We did attempt the static IP and it still wouldn't connect. It also wouldn't work after rebooting the Pi and the RIO.
Did you change the code to reflect the static IP after switching (eg, NetworkTables.initialize(server='10.xx.xx.2') )
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
Reply With Quote
  #8   Spotlight this post!  
Unread Yesterday, 23:32
Jayd009's Avatar
Jayd009 Jayd009 is online now
Registered User
AKA: Jonathan
FRC #4468 (Fernbank LINKS)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2016
Location: Atlanta, Georgia
Posts: 37
Jayd009 is on a distinguished road
Re: Raspberry Pi Stops PyNetworkTables

Yes. What's funny is that we were able to use the mDNS before this happened, and all of a sudden it just stopped. We didn't change any code, and it still won't pick up the tables. We're pretty sure it's in the right port on the radio.
__________________
2016: District Event Winner @ Columbus District Qualifier (PCH)
2016: Engineering Inspiration Award @ Peachtree District State Championship
2016: Tesla Subdivision Playoffs Appearance @ FIRST Championship


Reply With Quote
  #9   Spotlight this post!  
Unread Yesterday, 23:35
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,114
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: Raspberry Pi Stops PyNetworkTables

Quote:
Originally Posted by Jayd009 View Post
Yes. What's funny is that we were able to use the mDNS before this happened, and all of a sudden it just stopped. We didn't change any code, and it still won't pick up the tables. We're pretty sure it's in the right port on the radio.
Yes, but mDNS has a tendency to not work correctly on the field, which is why I don't recommend using anything other than static IPs at this time.

Did you look at the console output of the RoboRIO via the driver station or netconsole? Maybe there were some errors there.
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
Reply With Quote
  #10   Spotlight this post!  
Unread Today, 08:45
Jayd009's Avatar
Jayd009 Jayd009 is online now
Registered User
AKA: Jonathan
FRC #4468 (Fernbank LINKS)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2016
Location: Atlanta, Georgia
Posts: 37
Jayd009 is on a distinguished road
Re: Raspberry Pi Stops PyNetworkTables

We didn't look at the RIO output, we mainly looked at the outline viewer. I'll make sure to check that next time. Is there anything else you can think of that would cause the pi to stop?
__________________
2016: District Event Winner @ Columbus District Qualifier (PCH)
2016: Engineering Inspiration Award @ Peachtree District State Championship
2016: Tesla Subdivision Playoffs Appearance @ FIRST Championship


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 09:52.

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