No Robot Code on power cycle


#1

When testing the robot today I noticed some very weird behavior. The robot was working fine before, and the code ran smoothly. However, every time we switched batteries and turned the rio back on, the DS said No Robot Code, and I have to do a redeploy (even though it’s the exact same code). How can I fix this annoying behavior?


#2

Which programming language are you using?


#3

One thing to check is the startup settings for the rio. In the roboRio imaging tool, there’s a box for “Disable RT Startup App”, which I believe would prevent your code from running at power on if checked.
https://wpilib.screenstepslive.com/s/currentCS/m/getting_started/l/1009233-imaging-your-roborio


#4

We’re using java. That reminds me - in robotInit(), the robot is supposed to wait for a maximum of 1 minute for the vision subsystem to start up (as we’re using a Jetson). Could that be causing the issues?


#5

Yes, your robot code will not report to the DS as ready until robotInit finishes.


#6

A good practice in a case like this is to print a message to console every few seconds to indicate the system is still waiting. That way you can differentiate between frozen or crashed execution, and code that is legitimately waiting for some new input.