![]() |
roboRIO Command Based Problems
Has anyone else had problems with the roboRIO deleting Command Based code as soon as teleop is enabled? It's probably the worst problem we've had so far.
|
Re: roboRIO Command Based Problems
What do you mean by deleting it?
If the robot code light is turning off then most likely you are not initializing something properly and are getting null pointer exception and crashing your program on the RoboRio. You can check the driver station log area for errors or you can do "Debug As" instead of "Run As" in eclipse. When your code crashes while debugging it will drop you in to the debugger with a stack trace showing you where the problem is. If you are still having problems after that then post your code and we can take a look at it. |
Re: roboRIO Command Based Problems
Quote:
|
Re: roboRIO Command Based Problems
What are the steps you are using to deploy your code to the RoboRio?
It is also possible that you are not initializing something properly in robotinit which runs before the robot is enabled. It is entirely possible that the code is getting deleted as you have suggested but the Robot Code light is indicative of whether or not your program is running oppose to if your program actually exists on the RoboRio. |
Re: roboRIO Command Based Problems
Quote:
|
Re: roboRIO Command Based Problems
Are you sure your code is not crashing? When your code crashes, the robot code light will turn off and a stack trace should be printed to the log window in the DS. I doubt it is actually being deleted.
|
Re: roboRIO Command Based Problems
Quote:
Long story short the lesson here is when in doubt reformat until it works! |
Re: roboRIO Command Based Problems
Quote:
Instead of going for the reimaging/reformatting voodoo, you should troubleshoot your original problem using the tools suggested here by the people trying to help you. |
Re: roboRIO Command Based Problems
Quote:
|
Re: roboRIO Command Based Problems
Could it be that you are taking too long in a command's execute() function?
|
Re: roboRIO Command Based Problems
Quote:
|
Re: roboRIO Command Based Problems
Quote:
|
Re: roboRIO Command Based Problems
Quote:
|
Re: roboRIO Command Based Problems
Quote:
Post your code, as Kyle suggested in his first response. |
Re: roboRIO Command Based Problems
5 Attachment(s)
Quote:
|
Re: roboRIO Command Based Problems
Code:
48void DriveBase::AutoDriveTurn(float speed, float angle){The better way to do this that won't cause you problems is to use a command. Code:
32 class AutoDriveTurnCommand() { |
Re: roboRIO Command Based Problems
Quote:
|
Re: roboRIO Command Based Problems
I know this is an old thread, and I'm replying to myself, but yesterday we figured out the problem. In the Robot.cpp we were calling auto_command->End(); in the TeleOpInit Phase, but we had not given a specific command to auto_command, so when TeleOp was enabled it couldn't end the command and just died... At least that's how I believe we fixed it. Commenting out the auto_command->End() got rid of this problem, so we believe that's what it was.
Hope this helps! Isaac |
| All times are GMT -5. The time now is 14:05. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi