Go to Post When FIRST teams are as numerous and as well supported as basketball teams, we will know that our culture is preparing young people to compete in the 21 st century and we are spending our 2 million minutes wisely. - N7UJJ [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
  #46   Spotlight this post!  
Unread 23-03-2011, 19:34
flippy147852's Avatar
flippy147852 flippy147852 is offline
respect the hat
AKA: Felipe Agurto
FRC #1918 (NC GEARS)
Team Role: Alumni
 
Join Date: Feb 2009
Rookie Year: 2009
Location: Robolab (Fremont, MI)
Posts: 166
flippy147852 is an unknown quantity at this point
Re: Programming goofs!

Here's a recently posted one:
http://www.chiefdelphi.com/forums/sh...threadid=93952
__________________
NC GEARS = Newaygo County Geeks Engineering Awesome Robotics Solutions

2009: 5 Events, 60-25-2. 1 District Win, 3 Finalists
2010: 4 Events, 51-13-6. 1 District Win, 1 Regional Win, 1 Finalist
2011: 4 Events, 58-18-4. 2 District Wins
2012: 4 Events, 46-25-0. 1 District Win, 1 Finalist
Total: 17 Events, 215-81-12. 308 matches in 4 years

Scouting it all: Priceless
  #47   Spotlight this post!  
Unread 24-03-2011, 10:19
Geek 2.0 Geek 2.0 is offline
Registered User
FRC #0107
Team Role: Programmer
 
Join Date: Sep 2009
Rookie Year: 2008
Location: Holland, MI
Posts: 120
Geek 2.0 will become famous soon enough
Re: Programming goofs!

Quote:
Originally Posted by lon.bushweiler View Post
Wow, reading these posts really makes me feel conservative. If an autonomous mode has not been tested (in some form), we won't run it.
I wish I could do that, but then we wouldn't have an autonomous. I'm not going into another "Why blame the programmers?" thread, but we don't ever get much time for autonomous, if any at all.
  #48   Spotlight this post!  
Unread 25-03-2011, 22:40
kws4000's Avatar
kws4000 kws4000 is offline
Team Mentor - Programming
AKA: Krazy Karl
FRC #2405 (Divided by Zero)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Fruitport, MI
Posts: 164
kws4000 is a jewel in the roughkws4000 is a jewel in the roughkws4000 is a jewel in the roughkws4000 is a jewel in the rough
Re: Programming goofs!

Trying to run the gripper, and forgot to include "== 1" on C++: it don't work!

Motors run best when plugged into output #7 AND program set for #7 instead of #9.

Copying everything you think you might need for the Cypress unit straight from Chief Delphi.
  #49   Spotlight this post!  
Unread 26-03-2011, 00:48
davidthefat davidthefat is offline
Alumni
AKA: David Yoon
FRC #0589 (Falkons)
Team Role: Alumni
 
Join Date: Jan 2011
Rookie Year: 2010
Location: California
Posts: 792
davidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud of
Re: Programming goofs!

A major goof for us was my ego.
__________________
Do not say what can or cannot be done, but, instead, say what must be done for the task at hand must be accomplished.
  #50   Spotlight this post!  
Unread 26-03-2011, 01:00
dtengineering's Avatar
dtengineering dtengineering is offline
Teaching Teachers to Teach Tech
AKA: Jason Brett
no team (British Columbia FRC teams)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Vancouver, BC
Posts: 1,833
dtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond repute
Re: Programming goofs!

My favorite was when our team almost... almost... became the first team to score autonomously at the Portland regional playing Rack'n'Roll. A bit of a malfunction in our ultrasonic rangefinders, combined with a bit of over confidence in our mecanum drive code... and if only we'd let go of the tube. It was match #2, in front of the entire stadium in Portland, on the first weekend of competition.

Start the match... burn three doughnuts, then score a tube right in front of all the judges. If only we'd let go, it would have been so, so sweet.

http://www.thebluealliance.com/match/2007or_qm2

Jason
  #51   Spotlight this post!  
Unread 26-03-2011, 07:30
Eric222 Eric222 is offline
Registered User
FRC #0222 (Tigertrons)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2009
Location: Tunkhannock
Posts: 21
Eric222 is an unknown quantity at this point
Re: Programming goofs!

My biggest programming blunder so far has to be in 2010. I was adjusting some of the numbers in our autonomous program to make sure that the robot would reach all of the soccer balls. After I finished and had left, the rest of the team replaced the battery and ran the autonomous mode. The robot plowed through all of the soccer balls and drove over the bump and into the middle of the field. So, I learned that it can be pretty important to check your battery voltage even while testing! Luckily, none of this happened during any actual matches; I had time to fix all of my mistakes the next day.
  #52   Spotlight this post!  
Unread 05-04-2011, 16:13
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: Programming goofs!

At Knoxville, when deploying, we would suddenly back away from the tower when on the field, but we were fine in the pit and on the cart. The motors were not moving, so we were bafffled. During Purdue, we originally had it so it would automatically drive forward when we deployed our minibot, since newtons law does not exclude us, but our driver decided that he wanted to drive himself, so we removed it. Or so we thought. While inspecting the issue late Friday, we watched the jaguars, drove forward into a pole, and hit the deploy button. The jaguars turned off while we deployed, the compressed bumpers expanded, pushing us backwards, then matched the joystick after we finished deploying. As it turns out, originally, we added a check, are we deploying? to our drive code. If we were, ignore the joystick. That code was never removed after we removed the drive code, so it was "DriveSafety-ing" and killing our motors. It cost us quite a bit, we were not able to deploy successfully during Knoxville and the end of Purdue.

Lesson: remove ALL code related to something
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
  #53   Spotlight this post!  
Unread 05-04-2011, 19:05
legogeek24's Avatar
legogeek24 legogeek24 is offline
Registered User
AKA: Dirk
FRC #3562 (LiveWire)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Pocatello, ID
Posts: 94
legogeek24 has a spectacular aura aboutlegogeek24 has a spectacular aura aboutlegogeek24 has a spectacular aura about
Re: Programming goofs!

The year before I was on the team (2008), 1569 had a pretty major blunder in atutonomous. With four mech wheels, with a cim on each, that robot really earned it's name of Mach 5. The programmers cut the power to half for teleop for the drive train, but forgot to do so in autonomous. It slammed full speed into the opposing alliance's wall, apparently knocking their control boards onto the ground! Luckily no real damage was done, and we learned to limit the code everywhere from then on.
  #54   Spotlight this post!  
Unread 29-04-2011, 00:57
LukeS LukeS is offline
4272 mentor, 1024 alumnus
AKA: Luke Shumaker
FRC #4272
Team Role: Mentor
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Indianapolis, IN
Posts: 60
LukeS is an unknown quantity at this point
Re: Programming goofs!

In 2009 we never figured out the relationship between the code we wrote and what it did during autonomous. (LabVIEW)

In 2010 we had numerous cases where there was a one-line case statement, someone (Andrew, Jackson, me) would comment out the end, wipe out the "break;", and make it cascade through. (Java)

This year (Java) I've:
1) had a function that can be summarized as:
public double functionName(double in) {
double out = in
/* a lot of calculations altering out */
return in; // here lies the mistake
}
2) disabled the arm for writing autonomous driving on the practice bot, which lacked an arm by adding "if (true) return true;"* to the beginning of a method. Fine, until we got to competition and forgot to remove it.

BTW, when the announcer today said, "Looks like 1024's still having some programming problems.", we weren't; it was a hardware issue (an encoder wire had been mangled). (Not an excuse, still my problem, but it wasn't a programming mistake)

* the "if (true)" is necessary, because otherwise javac complains about unreachable code. I didn't want to comment it out, because then refactors of other things wouldn't change in it, and because that means 2 lines to edit.
  #55   Spotlight this post!  
Unread 08-05-2011, 00:50
Jeremy Germita's Avatar
Jeremy Germita Jeremy Germita is online now
Co-Advisor/Lead Engineering Mentor
AKA: wood is good. plastic is fantastic.
FRC #5012 (Gryffingear) / (Antelope Valley FIRST Teams)
Team Role: Coach
 
Join Date: Jan 2010
Rookie Year: 2007
Location: Lancaster, CA
Posts: 289
Jeremy Germita has a reputation beyond reputeJeremy Germita has a reputation beyond reputeJeremy Germita has a reputation beyond reputeJeremy Germita has a reputation beyond reputeJeremy Germita has a reputation beyond reputeJeremy Germita has a reputation beyond reputeJeremy Germita has a reputation beyond reputeJeremy Germita has a reputation beyond reputeJeremy Germita has a reputation beyond reputeJeremy Germita has a reputation beyond reputeJeremy Germita has a reputation beyond repute
Re: Programming goofs!

Most recent goof:
Our first match on Galileo this year, during autonomous, our robot turned to the left and attempted to score the ubertube on the tower. Turns out that during my rewrite of the driveStraight code, I accidentally did this:
Code:
void driveStraight(double angle)
double error = angle - gyro.getAngle();
double pidOut = /*do PID calculations*/;
tankDrive(angle, -angle);
I accidentally wrote the raw angle to the drive as opposed to the pidOut calculation.

Also a comment to myself consisted of this:
Code:
/*
  TODO:
  -Clean up comments, spacing
  -Test new operator controls
  -Other stuff
*/
That was after a late night of coding sans Coca Cola

So nothing too drastic, just some silly stuff that I should have noticed at the time I typed it!
__________________
Drive Coach Team 5012 Gryffingear / Antelope Valley FIRST teams / EWCP - (2013 - Current)
Student / Driver / Programmer / CAD - FRC Team 399: Eagle Robotics / FTC Team 72: GarageBots - (2009 - 2013)
Los Angeles Region FTC FTA/CSA/Head Ref
[FF] FIRST Pick
2014 FTC Los Angeles Regional Compass Award Winner.

2017 - San Diego Regional / Sacramento Regional / Las Vegas Regional
2016 - Los Angeles Regional Creativity + Winners (1197, 987, 5012) / Las Vegas Regional Team Spirit + SF (5012, 5851, 5049) / Galileo Subdivision
2015 - Inland Empire QF (597, 5012, 4413) / Las Vegas Imagery + Winners (148, 987, 5012) / Newton Subdivision and World Champions (118, 1678, 1671, 5012)
2014 - Inland Empire Rookie All Star + Highest Rookie Seed + SF (2339, 1967, 5012) / Las Vegas Rookie All Star / Galileo Division Imagery
  #56   Spotlight this post!  
Unread 08-05-2011, 03:25
Kevin Wang's Avatar
Kevin Wang Kevin Wang is offline
Software Engineer, Webmaster
FRC #0694 (StuyPulse)
Team Role: Alumni
 
Join Date: Jun 2010
Rookie Year: 2010
Location: New York
Posts: 28
Kevin Wang is an unknown quantity at this point
Re: Programming goofs!

Oh, my team had a terrible goof this year. Our autonomous is based off of distance data from four encoders, one on each wheel. Our robot uses mecanum wheels, so we needed to write our own method for calculating the distance traveled based on each of the individual wheels. We also run a PID loop on each of our wheels to control the RPM at which each wheel turns. We often had to switch between speed control mode using PID loops and pure voltage mode, so one of our programmers decided to modify the code to allow easy switching from speed control mode and voltage mode using a boolean. However this code was written between bag and tag day and our first regional (NYC regional), so the code was untested.

When we got to the NYC regional, we found that that code was bad, so we removed it hastily. We were being stupid and decided to revert the changes manually rather than just reverting automatically using our version control system. So we missed a couple lines. First, we forgot to remove the declaration of the boolean, but deleted its assignment to a value. So now we had an uninitialized variable in our code. But then it turned out that other critical methods checked that boolean (including the method that gets the distance the robot has traveled). Those conditionals should have been removed, but since we were at competition and were time-constrained, we left those in. So that function would check an uninitialized variable, and therefore always return zero as the distance. Which means that while we thought that the robot was driving a defined number of inches, it would always drive forward until our timeout time of 6 or so seconds.

In short, what we thought was distance-based auton turned out to be time-based auton. We started out telling the robot to drive 192 inches. This wasn't enough, so we lowered it a bit. And a bit more. However that number actually didn't do anything; the robot would always just drive for 6 seconds and stop. By the time we were down to 175 inches at the end of our second regional (Hartford), we knew that something was up. We found out that that method always returned zero. By checking the code history, we discovered that distance-based auton didn't work at all in NYC either. The ironic thing was that our dead-reckoning 6 seconds forward auton worked well enough in Hartford that we didn't even notice something was up until the end. After the regional we reviewed the code, and came to the terrible realization that such a stupid error in our code led to us having a time-based auton for both of our regionals, and that all that shouting of "lower it by 3 inches!" on the practice field didn't mean anything. We fixed it after the Hartford regional, and we then had one of the most stable autonomous routines at Championships (when other robots weren't driving into us and jamming us up, which happened like 3 times in a row).
__________________
  #57   Spotlight this post!  
Unread 09-05-2011, 18:12
TofuRama TofuRama is offline
01000110 01010010 01000011
AKA: Matt
FRC #2484 (Team Implosion)
Team Role: Programmer
 
Join Date: Apr 2011
Rookie Year: 2009
Location: Woods Cross Utah
Posts: 17
TofuRama is an unknown quantity at this point
Re: Programming goofs!

One of my favorite goofs was in 2010. I was in charge of autonomous and was trying to get the robot to go forward and kick. During the build our soccer balls were to close, so when we got to competition our robot didn't go the distance it needed to (barely). To try to fix it I had it wait an additional two seconds before it kicked. The result was that it kicked the alliance station wall. No driver stations were damaged, but I could hear the result from the back of the stadium. I now increment values by very small amounts when needed.
  #58   Spotlight this post!  
Unread 09-05-2011, 18:47
FRC4ME FRC4ME is offline
Registered User
FRC #0339
 
Join Date: Feb 2008
Rookie Year: 2007
Location: Fredericksburg, VA
Posts: 324
FRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant future
Re: Programming goofs!

In 2008 (Overdrive), I was a programmer for 339. Our autonomous had been working well for most of the regional, often crossing four lines. But during this match, things were different; the robot ran full speed into the opposing alliance's wall and rammed into their driver station, knocking one team's controls off the shelf. The refs warned us to either fix our autonomous or disable next time.

When we got back to the pit we quickly discovered we had lost the entire 5 V bus on our IFI controller. This bus provided power to the encoders, without which we had no idea how far we had driven. Unable to fix the problem immediately, we flipped our "disable autonomous" switch on and prepared for the next match.

Literally about two seconds before the match started, we realized something: the disable autonomous switch also requires the 5 V bus. Oops. We watched helplessly as our robot slammed into the opposing wall yet again...a rather embarrassing moment.


In 2009 (Lunacy), we had just finished a match and I asked the driver, did you notice any problems with the robot? He replied, "the drive system was acting weird, and the shooter wouldn't pivot." I initially didn't think these two problems could be related, but a quick look at the code proved otherwise. I had left the drive system in tuning mode, which reused the pivot control to change one of the PID constants. Hence, the more the driver tried to use the pivoter, the more out-of-whack the drive system became.
__________________
Go directly to queue. Do not pass pit.
  #59   Spotlight this post!  
Unread 10-05-2011, 08:20
MaxMax161's Avatar
MaxMax161 MaxMax161 is offline
Allegedly Useful
AKA: Max Llewellyn
FRC #2791 (Shaker Robotics), FRC #1676 (Pascack π-oneers)
Team Role: Mentor
 
Join Date: Nov 2009
Rookie Year: 2008
Location: Montvale NJ\Troy NY
Posts: 174
MaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond repute
Re: Programming goofs!

This year one of out auton modes was go straight, hang tube, back up, 180º turn. Sounds simple right? Well I forgot that there is a 50/50 chance that that 180º turn will slam your arm in to a minibot tower. Luckily due to a misplaced alliance partner we didn't hit the pole and smash our arm but boy was that code changed fast.
__________________
2791 Shaker Robotics (2013-present)
--Control Systems Mentor 2013-present
--Drive coach 2015-present

1676 The Pascack π-oneers (2010-2013)
--Drive coach 2011-2013
--Lead Programmer 2011-2013
  #60   Spotlight this post!  
Unread 10-05-2011, 11:27
Captain Slacker's Avatar
Captain Slacker Captain Slacker is offline
Registered User
FRC #0571 (Team Paragon)
Team Role: Alumni
 
Join Date: Feb 2010
Rookie Year: 2008
Location: Windsor
Posts: 53
Captain Slacker will become famous soon enough
Re: Programming goofs!

2008, at an offseason event, Team Paragon didn't have any programmers available to attend, so we chose a random code (we have a dial with a few different options for the drive team to choose on the field). When the match started, our robot went straight and we were all estatic that it was doing something that we thought would be productive. That is, until it kept going straight, knocking into the alliance station and knocking out all communication. That was a nice little delay....
__________________
Who Rocks This House?!

PARAGON!!!
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


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

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