Issues connecting to Raspberry Pi during Competition

#1

We are having problems connecting to our Raspberry Pi on our robot. In the pits and during tethered practice matches it works fine, but whenever we connect to FMS we can’t connect to the Pi. We use our Pi for our two camera feeds and vision processing. When we can’t connect, we have no camera feed and the browser vision interface can’t connect. When tethered, we have our roboRIO and network switch connected to the radio, and the network switch connected to the Raspberry Pi and driver station. When using FMS, our RIO and Pi are connected to the radio. We were using the following ip addresses:

Raspberry pi: 10.70.34.6
Subnet mask: 255.255.255.0
Default gateway: 10.70.34.1 (radio)

We talked to a CSA about this problem, and he thinks it might have to do with the time each device starts up. Our Raspberry Pi starts first, then the RIO, then our radio. He recommended these ips:

Raspberry Pi: 10.70.34.11
Subnet Mask: 255.0.0.0
Default gateway: 0.0.0.0

We have not tested these at the field, so I will give an update after we do. Any ideas?

0 Likes

#2

Can you elaborate on the vision setup you got?
I mean, how is the pi sending the stream (what program did you use)?
Is the pi sending the stream to the DS or to the RIO or is the DS connects to the pi via the static ip you use?

This should be fine, although if a CSA told you to try something else, I’ll recommend on trying it.

Also if you want you can move all your system to static IP (It helped a lot of teams which use the pi).
More info on how to do that: https://wpilib.screenstepslive.com/s/currentCS/m/troubleshooting/l/319135-ip-networking-at-the-event

0 Likes

#3

What port does your stream run on (and is it TCP or UDP or both)?

0 Likes

#4

I’ve read that setting everything to static, including driver station, can help.

I’ve also read putting the RPi behind a network switch (probably put the Rio on the switch too), has solved many team’s similar problems.

Also rebooting in proper order in stand-by right before match has helped others.

We gave up on our RPi and plugged everything directly to the Rio, to ensure 100% reliability.

0 Likes

#5

We use network tables and py network table to send the feed. We use the FRCvision Raspberry Pi image. We do camera switching using a modified version of the default camera switching program. We’re not sure where the feed is being sent, but when tethered we can get the stream on the Smart Dashboard and frcvision.local on the driver station.

0 Likes

#6

We can’t use the network switch during competition, due to weight and lack of a power source. We are currently working on finding a good start up sequence, turning the Pi on last.

0 Likes

#7

Have you tried connecting to the IP instead of the DNS? Sometimes there can be DNS resolution problems.
Try connecting to {IP_ADDRESS} instead of frcvision.local and see if you get any feed.

You can go with the simplest of just connecting its power last while on the field or rebooting the pi (after you have a solid connection with the robot) until you find a better solution.

1 Like

#8

We are now able to connect to our raspberry pi but are still having issues with network tables. That is also the reason why we can’t connect directly to the DNS as we would then loose our ability to switch cameras and the ability to connect to the network tables.

0 Likes

#9

Is the Rio set to static 10.TE.AM.2? Are you doing image processing or just viewing the stream? If the latter, try switching back to the default streaming program; I’m starting to think there may be an issue with pynetworktables.

0 Likes

#10

Thank you everyone for the help, we have tried all of your great suggestions but it still doesn’t work. We are going to spend sometime working on it though.

0 Likes

#11

If you enable logging It would be useful to see the log output of the RPi python script when it fails. Maybe pipe the output to a file?

0 Likes

#12

Run with the network switch on the robot during competition. Connect Rio and RPi into the switch and then the switch to the radio.

We had very similar problems to what you are describing and this fixed it for us.

0 Likes

#13

I see an earlier post that you can’t use the network switch. See if you can borrow one. I think it will solve your problems.

If you have time (but I bet you are in the middle of a competition), we use this switch, and it is only ~2 ounces and uses USB power:


(out of stock at Amazon)

0 Likes