Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Python (http://www.chiefdelphi.com/forums/forumdisplay.php?f=187)
-   -   Raspberry Pi Stops PyNetworkTables (http://www.chiefdelphi.com/forums/showthread.php?t=155136)

Jayd009 11-02-2017 18:54

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

virtuald 11-02-2017 21:02

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?

virtuald 11-02-2017 21:05

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?).

virtuald 11-02-2017 21:06

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

Jayd009 11-02-2017 21:48

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.

Jayd009 11-02-2017 21:49

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.

virtuald 11-02-2017 23:13

Re: Raspberry Pi Stops PyNetworkTables
 
Quote:

Originally Posted by Jayd009 (Post 1643543)
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') )

Jayd009 11-02-2017 23:32

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.

virtuald 11-02-2017 23:35

Re: Raspberry Pi Stops PyNetworkTables
 
Quote:

Originally Posted by Jayd009 (Post 1643587)
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.


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

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