Offloading to Raspberry Pi resulting in RIO disabling

My robotics team is experiencing problems with offloading to the raspberryPi. I have made a c-sockets UDP networking program to send data from the raspberryPi to the roboRIO/cRIO. I have tested this program between the rpi and my computer, between an rpi and another rpi, and between PCs. All of these cases have worked. However, when I run the program to send data from the raspberryPi to the roboRIO or cRIO, the roboRIO/cRIO disables. Occasionally, the driverstation says “Emergency Stop.”

Has anybody else experienced problems like this, or know how to fix this?

Is your socket blocking the main thread? You probably have to feed the watchdog.

Our robot code currently does not use a watchdog.
I tried putting in “GetWatchdog()” but eclipse says “function ‘GetWatchdog’ could not be resolved.” Do you know what could be causing this.

Thanks for replying

How are you running the program?

If you’re using the command line, you’re probably typing its name and pressing Enter. Pressing Enter on the computer running the Driver Station disables the robot. Pressing the space bar when the robot is enabled activates the emergency stop function.

The disable and estop only occur when the robot is enabled. So if you get in the habit of disabling the robot before you upload new code, this won’t be an issue. The other solution is to use more than one computer.

Greg McKaskle

Thank you for the help.
It appears that the problem was that when I ran the program from shell (on the driverstation computer), I was pressing ‘Enter’ and the robot would disable.