Hi all,
So Team 1257 has been trying to run code on the 2016 roborio image. We get a consistent “no robot code” no matter how we connect (sometimes it flashes “disabled” first). The RSL is illuminated solid and the comms light is red. Additionally, we have been periodically experiencing errors when pushing code. We are under the assumption that the code is insta-crashing, though we’re not sure why. We have confirmed the existance of FRC_UserProgram on the roborio over FTP. Needless to say it was working on the 2015 image. So what could be wrong? Thanks in advance for your help.
Can you start with a clean default project and confirm that works okay? Then move your code over piece-by-piece to find the culprit?
We’ve actually been trying the default project so it’s probably not the code itself. We have also tried switching from c++ code to Java and got an error consistent with the wpilib.screenstepslive.com description of a corrupted image. The thing is, we’ve tried reimaging from multiple laptops.
What error would that be?
Sysprops.xml not found
EDIT: ok, we tried using SSH to go into the roborio and manually start the code, and it says, “FATAL ERROR: HAL could not be initialized”.
We are having similar problems. Seems like these are all the same thing as this:
http://www.chiefdelphi.com/forums/showthread.php?t=141678&highlight=no+robot+code
http://www.chiefdelphi.com/forums/showthread.php?t=141579&highlight=no+robot+code
http://www.chiefdelphi.com/forums/showthread.php?t=141568&highlight=no+robot+code
The first deploy attempts behaved a little differently and I can’t reproduce the strange errors. This is what the system has settled into:
Open NetConsole or RLog or both.
Open driver station.
Close Smart dashboard that had opened automatically with driver station.
Open Eclipse and deploy - successful.
See that our looping printf’s in RobotInit are printing continuously as they should be (waiting for Preferences from Smart Dashboard, actually, is our code) although driver station says no robot code.
Open Smart Dashboard manually and notice that the communications status indicator remains green at all times.
Notice that the printing from RobotInit stops at the instant smart dashboard (c++ or the default dashboard) starts.
It is frustrating that driver station says no robot code and doesn’t allow changing to enable/disable although the code is running at the time!
For other experiments, depending on the timing of starting the deploy and starting driver station you can observe the the driver station communications green “light” goes on at exactly the same time that the roboRIO comm LED goes red.
The very first attempts were confusing with the smart dashboard widgets being updated with the fields Put by RobotInit but that couldn’t be reproduced even after reimaging the roboRIO.
Sorry this is not much help except to encourage FIRST to take a close look and fix this ASAP. We are dead!
If you’re looping in RobotInit, this is the issue. See “RobotBase changes”: For the 2020 season software documentation has been moved to https://docs.wpilib.org. Documentation for KOP items can still be found here. | FRC KOP Documentation
SIMPLIFIED ERROR DEMO:
Here’s the simplest program I find works or doesn’t work. Offending statement commented or not.
It doesn’t seem to matter if Smart Dashboard is open or not. What is critical is the roboRIO COMM LED is red thus causing the driver station to think there is No Robot Code if there is no SendableChooser object.
This works:
#include “WPILib.h”
class Robot: public SampleRobot
{
SendableChooser *chooser;
public:
Robot()
:chooser()
{
}
void RobotInit()
{
chooser = new SendableChooser();
}
};
START_ROBOT_CLASS(Robot)
This does not work:
#include “WPILib.h”
class Robot: public SampleRobot
{
SendableChooser *chooser;
public:
Robot()
:chooser()
{
}
void RobotInit()
{
//chooser = new SendableChooser(); Need this statement to keep Comm LED Green. If new chooser missing, then LED is Red.
}
};
START_ROBOT_CLASS(Robot)
===============
This doesn’t work either lest you think there is some sort of dangling object:
#include “WPILib.h”
class Robot: public SampleRobot
{
//SendableChooser *chooser;
public:
Robot()
//:chooser()
{
}
void RobotInit()
{
//chooser = new SendableChooser();
}
};
START_ROBOT_CLASS(Robot)
Side note for person concerned about looping in RobotInit. It’s okay - it’s just to enter Preferences and we don’t drive in RobotInit. Thanks for taking the time to think about us.
I hope this example gets FIRST to an early resolution. Maybe we have a circumvention for now - add a SendableChooser to our programs? I’ll be trying that soon.
I verified that adding the minimal 3 lines of code for SendableChooser object does make a complex 2015 Robot code work on 2016.
I am also getting the same error. I loaded the sample robot project, built it successfully and then uploaded it. However, it always says “No Robot Code”. I even re-flashed the roboRIO and tried to upload code to it, however, no dice.
I have narrowed this issue down. We have been trying to install OpenCV on the roboRIO. We have done this successfully, however, when we try and add the OpenCV library’s and includes to the project and upload the code, it instantly crashes.
This is probably a linker error because our vision code is not being called anywhere. When it crashes is when we add our vision paths into eclipse.
Here is our github repoif anyone wants to take a look. You might have to import the project into eclipse to see the projects and paths correctly.
- Drew
Team 2053
Can you try the following…
[1] Make sure a gamepad is connected and wired to slot 5 (the last spot) in the driver station. Change your source to use that slot, or just use an extra joystick/gamepad to ensure that slot is not empty. Either is fine.
[2] Then restart your project using the restart-robot-code, or redeploying.
Does that remove the crash symptom?
Why does that work! Thank you so much! This issue has been frustrating me for hours and a simple fix like this makes me a bit more frustrated because it is so obscure, but thanks! Is this a bug in the driver station code?
It would appear that there is a subtle issue going on underneath. Not having a gamepad present at slot5 can cause a memory over-write that causes the crash. Control system team is working the problem now, thanks for the feedback - it helps. Stay tuned for an update.
Team 3617 is now having this issue, but moving gamepads doesn’t seem to work. We have tried multiple RoboRIOs to no avail. Changed IP settings to static (10.36.17.2), no luck. It worked this morning when we practiced driving first thing, but sometime throughout the day it stopped working.