Our roborio is being detected, but is only accepting code for a second, after that it switches between no code and teleop disabled. We were able to enable teleop for a fraction of a second, and heard the compressor turn on. We were able to successfully able to reimage the rio, and no dice. Please help!
First, check battery voltage. Use the driver station voltage meter, or if you can’t get that online for whatever reason, use a voltmeter between battery and Voltage Regulator Module. Then, check the roboRIO’s power supply.
Second, check connection - if you can’t do wireless, make sure you have a good ethernet cord attached. Try with several if you have them, or check it with another method.
Third, check all OTHER wiring.
Fourth, ask someone who’s not trying to get answers out of the team electrician and programmer. (I’m the CAD guy/mechanical/safety captain/various others that aren’t electrician or programming) ::safety::
Good luck,
Team 4368 Bullbots
EDIT: Check your roboRIO firmware, you may actually need to update it.
It sounds like your code is dying. Some of our rookie programmers have been having the same problem, and it always turns out they’ve dereferenced a null or uninitialized pointer.
You can check this by ssh’ing into the roboRIO
ssh [email protected].
*You probably have no password set.*
See if your robot code is running (I bet it isn’t):
ps -ef | grep -i frcuserprogram
If it’s not running, all you’ll see in that listing is “grep -i frcuserprogram”. If it IS running, kill that process:
killall FRCUserProgram
Then run it manually
cd /home/lvuser
./FRCUserProgram &
Try driving your robot. When it fails, look in the ssh window and see what error shows up. If you see “Segmentation Fault” or “Bus Error”, you’ve done something wrong with a pointer or a reference. It’s time to get together with your mentor for a code review.
(This is how we all learn. If someone ever claims to be a C or C++ programmer but tells you they’ve never had problems with pointers, they’re a fraud, and you should run away.)
No code means your code is crashing.
Most likely you are getting to a point when your code crashes upon being enabled. This would likely occur in some code within your Teleop Periodic Function.
Not sure what language you are using, but you can view the output of the RoboRio in many ways. RioLog on Eclipse, or use the serial port and enable console output. http://digital.ni.com/public.nsf/allkb/A72F9B40D34E940286257E46005366AE
In your code, Look for a place where you are trying to access a null pointer, most likely in the Telep function, since you are able to turn it on for a split second. The problem is very likely within your own code, and not with the Roborio firmware or image.
hope this helps,
Kevin