Go to Post The only competition we have here, folks, is the one that's in March and April. - Amanda Morrison [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 05-03-2006, 13:54
kaszeta's Avatar
kaszeta kaszeta is offline
Registered User
FRC #0095 (Grasshoppers)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Lebanon, NH
Posts: 334
kaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of light
Bot repeated dying at Regionals. Can someone review the code?

Team 95's robot repeated would die during autonomous mode. The bot would stop, the color LED would go out, and the radio would go offline until the RC was power-cycled (not even a reset).

We were not able to recreate this in the pit (even after getting permission to test with the radio), and replacing radio and cable didn't help.

During the Friday matches, an IFI representative first thought that it had to be a code error and helped us review our wiring (as did a few people from other teams). On Saturday, after being dead in the middle of autonomous, he followed up saying that it looked more like a problem with the master controller, and suggested an RC swap. However, of three different RCs loaned to us, the first two had issues (the first wouldn't accept code uploads and appeared to be an un-upgraded 2004 RC, the second showed the 8.2 Volt problem (with the default code!) mentioned in another thread, and the third finally worked properly, although our last match had passed by then).

I'm going to call IFI tomorrow, but I thought it might be good if I got another set of eyes to look at our code, since I can't see any issues there. The current code we're running is Kevin's frc_gyro code (compiled to use an ADXSR300 instead of the the kit gyro), a PID controller to control rotation (so that the bot drives straight and controllably), and some basic mapping of inputs from controllers to pwms. No real rocket science here, and since the first tme our bot errored out, we don't even have any camera code, shaft encoders, or anything complicated like that.

However, since most teams haven't competed yet, I don't want to openly release the code (although most anything interesting has already been posted). But if your team has already competed, or you're willing to have some discretion with the code, and you're willing to look over the code to see if there is anything wrong, could you PM me or email me at rich@kaszeta.org? We're playing again at Palmetto, and would like our bot to actually function instead of sitting there motionless.

As I said, both our programmers and the IFI rep think it was a problem with our RC, but I'd like to make sure it's *not* a code error causing this.

Edit: By the way, we saw this problem with both the original FRC_library.lib *and* the updated version released the other day on the IFI site.

Last edited by kaszeta : 05-03-2006 at 14:13.
  #2   Spotlight this post!  
Unread 05-03-2006, 14:18
Tom Bottiglieri Tom Bottiglieri is offline
Registered User
FRC #0254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Jan 2004
Rookie Year: 2003
Location: San Francisco, CA
Posts: 3,186
Tom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond repute
Re: Bot repeated dying at Regionals. Can someone review the code?

We were having this problem in testing. The bot would die, and could not be fixed until a full power down occured. It took a bit to fix, but I can take a look to see if anything is wrong.
  #3   Spotlight this post!  
Unread 05-03-2006, 16:31
chris31 chris31 is offline
Team 2021 Captain
AKA: Chris Davidson
FRC #2021 (FA Robotics)
Team Role: Mentor
 
Join Date: Nov 2005
Rookie Year: 2006
Location: Atlanta, GA/ Fredericksburg,VA
Posts: 949
chris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond repute
Send a message via AIM to chris31
Re: Bot repeated dying at Regionals. Can someone review the code?

It looks like alot fo people are having this problem.
  #4   Spotlight this post!  
Unread 05-03-2006, 19:19
X-Istence X-Istence is offline
Melt the RC controller!
AKA: Bert JW Regeer
no team
Team Role: Alumni
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Montville
Posts: 151
X-Istence will become famous soon enoughX-Istence will become famous soon enough
Send a message via AIM to X-Istence Send a message via MSN to X-Istence
Re: Bot repeated dying at Regionals. Can someone review the code?

It is a problem with the CPU that is on the boards, as in it is an error in the silicone. IFI knows about the problem, as several others and myself have emailed them about this problem. The new libraries are supposed to fix this, but yet we got the same problem at the NJ regionals. Since we did not have a joystick on port 4, I added the following code to Process_Data_From_Master_uP, and to User_Autonomous:

Code:
if (p4_y != 127 || p4_x != 127 || p4_sw_top || p4_sw_trig) {
    while (1) { ; }
}
What this will do is cause a code error if there is any data on Joystick 4, as that means the data is all wrong. This helped us catch it one time when it happened again, before the match started
__________________
My Blog!
  #5   Spotlight this post!  
Unread 05-03-2006, 20:40
gnirts gnirts is offline
Suspicious pointer conversion
AKA: Robinson Levin
FRC #1648 (The Gearbox Gangstaz)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2005
Location: ATL
Posts: 116
gnirts will become famous soon enough
Re: Bot repeated dying at Regionals. Can someone review the code?

Quote:
Originally Posted by Tom Bottiglieri
It took a bit to fix, but I can take a look to see if anything is wrong.
How did you finally fix it?

Quote:
Originally Posted by X-Istence
What this will do is cause a code error if there is any data on Joystick 4, as that means the data is all wrong. This helped us catch it one time when it happened again, before the match started
How are we supposed to use this? What's the point of causing a code error? (obviously I am missing something...)

Thanks in advance,
Robinson
__________________
'... who are you, then?'
'I am part of that power which eternally
wills evil and eternally works good.'
Goethe, Faust
  #6   Spotlight this post!  
Unread 06-03-2006, 02:06
Eldarion's Avatar
Eldarion Eldarion is offline
Electrical Engineer / Computer Geek
AKA: Eldarion Telcontar
no team (Teamless Orphan)
Team Role: Alumni
 
Join Date: Nov 2005
Rookie Year: 2005
Location: Númenor
Posts: 558
Eldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond repute
Send a message via AIM to Eldarion Send a message via Yahoo to Eldarion
Re: Bot repeated dying at Regionals. Can someone review the code?

While ours did not die completely, every now and then (actually about 50% of the time ), the autonomous_mode flag will be cleared for an instant and then reset, forcing the auto mode code to restart from the beginning. We are using the dongle, and the error does not appear to be in our (custom, not Kevin's) code. Has anyone else seen this?

We have not been able to test the new libraries, as we do not have another 2006 controller.
__________________
CMUCam not working? Tracks sporadically? Try this instead: http://www.falconir.com!
PM me for more information if you are interested (it's open source!).

Want the FIRST Email blasts? See here: http://www.chiefdelphi.com/forums/sh...ad.php?t=50809

"The harder the conflict, the more glorious the triumph. What we obtain too cheaply, we esteem too lightly; it is dearness only that gives everything its value."
-- Thomas Paine

If it's falling apart it's a mechanical problem. If it's spewing smoke it's a electrical problem.
If it's rampaging around destroying things it's a programming problem.

"All technology is run on 'Magic Smoke' contained within the device. As everyone knows, whenever the magic smoke is released, the device ceases to function."
-- Anonymous

I currently speak: English, some German, Verilog, x86 and 8051 Assembler, C, C++, VB, VB.NET, ASP, PHP, HTML, UNIX and SQL
  #7   Spotlight this post!  
Unread 06-03-2006, 15:55
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 590
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: Bot repeated dying at Regionals. Can someone review the code?

Quote:
Originally Posted by Eldarion
While ours did not die completely, every now and then (actually about 50% of the time ), the autonomous_mode flag will be cleared for an instant and then reset, forcing the auto mode code to restart from the beginning. We are using the dongle, and the error does not appear to be in our (custom, not Kevin's) code. Has anyone else seen this?
There was another team at BAE that had similar symptoms to yours - where they had different behavior off then field then on the field.

There was a "feature" in last years field controls that put the robots into Operator Control mode for a short time before starting Autonomous. I don't know for sure, but have heard that the problem is still there this year. There was some work put into WPILib and EasyC to try to make them work in this environment since they actually yank the program out of the Autonomous or OperatorControl functions when the field state changes.

I helped a team track down a problem that they believe was caused by this. They had a motor that would start moving to some position in Operator control mode. After the motor was started, the program then started running the autonomous code that wasn't checking for the motor position. So it ended up "running away" since there was no reason to check it - it wasn't supposed to be moving.

They ended up making a bunch of changes at the same time, but they thought this was happening to them.

You might want to verify that this isn't happening to you - if there are some variables that are being modified in operator control that your autonomous code is depending on not being changed, it could cause all kinds of problems that you would only see when on the actual field.

You could simulate this by starting your robot disabled & operator, then enable for a second, then change to autonomous. This can be done in the pits teathered.
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
Closed Thread


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
porting camera code to 2005 bot controller dwc309 Programming 6 28-02-2006 19:16
Updated: Serial Port Driver Code Kevin Watson Programming 4 05-02-2005 18:39
Coding / Style Standards for sharing C code Joe Johnson Programming 33 01-05-2004 15:15
heres the code. y this not working omega Programming 16 31-03-2004 15:18
Hey FIRST - We're going to need a lot more regionals! Raul Regional Competitions 41 08-11-2003 18:10


All times are GMT -5. The time now is 03:17.

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