Go to Post You mean how many Edible Data Analysis Metrics and Aggregated Measurable Entities (EDAMAME)? - Andrew Schreiber [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 31-01-2017, 09:15
ebernerrd ebernerrd is offline
Registered User
FRC #3236
 
Join Date: Jan 2017
Location: Franklin, MA
Posts: 8
ebernerrd is an unknown quantity at this point
Robot deletes robot code after disabling it

Hey there again!
I am running a command based robot. When I enable it for teleop mode, everything works perfectly. If I disable the robot, and then attempt to re-enable it, the roborio stops comms with the driver station and deletes the code off the roborio. i have to either reset the robot code from the DS every time I disable it before re-enabling it, or let it crash and reboot the roborio and reupload the code.

Any reason for this?
Thanks!
-Eric
Reply With Quote
  #2   Spotlight this post!  
Unread 31-01-2017, 10:26
Bkeeneykid's Avatar
Bkeeneykid Bkeeneykid is offline
#wheatcoastneatcoast
AKA: Devin Keeney
FRC #1982 (Cougar Robotics); Season Long Fantasy FIRST (F3)
Team Role: Leadership
 
Join Date: Feb 2015
Rookie Year: 2015
Location: Lenexa, Kansas
Posts: 368
Bkeeneykid has much to be proud ofBkeeneykid has much to be proud ofBkeeneykid has much to be proud ofBkeeneykid has much to be proud ofBkeeneykid has much to be proud ofBkeeneykid has much to be proud ofBkeeneykid has much to be proud ofBkeeneykid has much to be proud ofBkeeneykid has much to be proud of
Re: Robot deletes robot code after disabling it

Are you sure it's actually deleting the code, or rather crashing? If the code crashes fatally, the "robot code" status light on the DS will be red. For example, if you have a method that causes your code to not boot up again afterwards, it would appear that the code has deleted itself. We've had some issues where the console in the DS doesn't actually show the crash errors, so try going into the RIO log through eclipse and seeing if they have any error messages, or SSHing into the RIO to see if the executable is located there as well.
__________________

F4 Network Website Designer

2010-2012: A Whole Buncha FLL Teams; Team Spirit, Gracious Professionalism Award winner
2015-Current: FRC 1982, Captain, Electrical Lead
Beginning FIRST Volunteer

Moderator on the FIRSTwiki
Reply With Quote
  #3   Spotlight this post!  
Unread 04-02-2017, 11:50
ebernerrd ebernerrd is offline
Registered User
FRC #3236
 
Join Date: Jan 2017
Location: Franklin, MA
Posts: 8
ebernerrd is an unknown quantity at this point
Re: Robot deletes robot code after disabling it

Quote:
Originally Posted by Bkeeneykid View Post
Are you sure it's actually deleting the code, or rather crashing? If the code crashes fatally, the "robot code" status light on the DS will be red. For example, if you have a method that causes your code to not boot up again afterwards, it would appear that the code has deleted itself. We've had some issues where the console in the DS doesn't actually show the crash errors, so try going into the RIO log through eclipse and seeing if they have any error messages, or SSHing into the RIO to see if the executable is located there as well.
I have SSHed into the roborio, and looked at all the logs I could find. I could not see anything out of the ordinary and I certainly have not found the root cause of my problem. I've got a hunch it's got to do with the frc::Scheduler, but I can't put my finger on it. If anyone has had the same problem and resolved it, any help is appreciated.

*PS: I've noticed that it's only when re-enabling a mode that has already started. If I start teleop, then disable it, then run autonomous, it will not crash until I enable either one again.
Reply With Quote
  #4   Spotlight this post!  
Unread 04-02-2017, 20:15
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,602
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Robot deletes robot code after disabling it

This would be easier to debug if you posted your code. I suspect you are initializing hardware in telopInit and autonomousInit or in a default command for a subsystem, which would cause it to be overallocated the second time you enter that mode and crash.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 22:48.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi