Go to Post I am the Evil Empire of FIRST!!! - Andy Grady [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 16-02-2004, 16:39
Venkatesh Venkatesh is offline
Registered User
FRC #0030
 
Join Date: Jan 2003
Rookie Year: 2002
Location: USA
Posts: 260
Venkatesh is a splendid one to beholdVenkatesh is a splendid one to beholdVenkatesh is a splendid one to beholdVenkatesh is a splendid one to beholdVenkatesh is a splendid one to beholdVenkatesh is a splendid one to beholdVenkatesh is a splendid one to beholdVenkatesh is a splendid one to behold
Talking Autonomous Program Names

What follows is a rather amusing idea from Joe Hall, one of our teams seniors. You guys will probably be amused:

________________________________________
I say we name our autonomous programs after soviet dictators..

Lenin: Bravely ventures forth to crush the capitalist ball trigger and return the people's balls to their rightful status, then trips the main circuit breaker...

Stalin: In a series of coordinated five second plans, proceeds to pop the bonus ball, flip over the goal, and then works on shoving the other robots off of the field, even the friendly ones...

Malenkov: Forcefully protests the entire robotics competition, works for three seconds, then mysteriously shuts down the robot and disappears...

Kruschchev: Ignores any attempt at line following and simply rushes headlong into the opponent's zone, only to crash into the wall and tip the bot over..

Brezhnev: Goes over and knocks the ball off quickly and effectively, spends time gathering balls, then proceeds to flip the teammate's robot over for subversive behavior...

Andropov: Wanders around the playing field boldly and stridently, albeit without purpose. Gradually slows in speed until the robot is no longer capable of motion by the end of autonomous...

Chernenko: Drives back to the pit, searches for a keg...

Gorbachev: Continuously drives into wall, while encouraging teammates to do whatever they wish...
________________________________________

This sounds quite offbeat, but we had very unique names for our autonomous programs last year as well. Some examples were "Operation Free Iraq" and "Electronic Couch Potato".

How do you guys name your autonomous programs?

__________________
-- vs, me@acm.jhu.edu
Mentor, Team 1719, 2007
Team 30, 2002-2005
  #2   Spotlight this post!  
Unread 16-02-2004, 19:41
TheShadow's Avatar
TheShadow TheShadow is offline
Former Resident Rebel of 66
AKA: Alex '2.0' Uhlmann
no team
Team Role: Alumni
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Ypsilanti, Michigan
Posts: 108
TheShadow is on a distinguished road
Send a message via AIM to TheShadow
Re: Autonomous Program Names

One prog name we're gonna have(and code before the comp) is "boogie down"
  #3   Spotlight this post!  
Unread 16-02-2004, 19:50
Venkatesh Venkatesh is offline
Registered User
FRC #0030
 
Join Date: Jan 2003
Rookie Year: 2002
Location: USA
Posts: 260
Venkatesh is a splendid one to beholdVenkatesh is a splendid one to beholdVenkatesh is a splendid one to beholdVenkatesh is a splendid one to beholdVenkatesh is a splendid one to beholdVenkatesh is a splendid one to beholdVenkatesh is a splendid one to beholdVenkatesh is a splendid one to behold
Re: Autonomous Program Names

#define GREAT mao

mao()
{

LEAP_FORWARD(GREAT);
}

____________________________________________

The above segment is definately going to be in our code. I think we might have the LEAP_FORWARD function contain all the critical code for driving, and have main() call mao(). Something like that.

Another segment from our code so far:

#define ONE 2
#define TWO 3

IF (ONE != TWO) { /* Main loop goes here */ }

And a freshman on our team has written these lines:

RETURN_OF_THE_EVIL_MENTALLY_DISTURBED_TAX_COLLECTI NG_POTATO_CARROT_HYBRID = 0;

and

#define OUCH pain
#define unneeded_variable NULL /* This should upset the compiler*/
#define GEORGE BUSH
#define AL GORE
#define BILL CLINTON
#define LYNDON LAROUCHE
#define I_AM NOT_DRINKING_SODA
#define YOU_WILL DELETE_MOST_OF_THESE_VARIABLES
#define DEAN HOWARD


___________________

If the code has personality, all is well.

Seriously, all our code is well commented and human readable, except the code in our interrupts. That code is as fast as possible (to the point where it requires at least 2 people working at it to understand it, but it is three lines long)

And our line-tracking code is exactly 2 lines long. =)
__________________
-- vs, me@acm.jhu.edu
Mentor, Team 1719, 2007
Team 30, 2002-2005
  #4   Spotlight this post!  
Unread 16-02-2004, 20:24
mtrawls's Avatar
mtrawls mtrawls is offline
I am JVN! (John von Neumann)
#0122 (NASA Knights)
Team Role: Programmer
 
Join Date: Mar 2003
Location: Hampton, VA
Posts: 295
mtrawls is a splendid one to beholdmtrawls is a splendid one to beholdmtrawls is a splendid one to beholdmtrawls is a splendid one to beholdmtrawls is a splendid one to beholdmtrawls is a splendid one to beholdmtrawls is a splendid one to behold
Send a message via AIM to mtrawls
Re: Autonomous Program Names

Quote:
Originally Posted by Venkatesh
Seriously, all our code is well commented and human readable, except the code in our interrupts
Our code is well commented to. People have complained in the past that I don't explain my code well enough (non-programming types, so what can you do?), so I've decided to let the Bard do it for me ...

Here are some wonderful (and iambic pentameteric) samples:

Timer interrupt, anyone?
/* When I do count the clock that tells the time */

Auton mode; first drive full speed forward!
/*
O! what excuse will my poor beast then find,
When swift extremity can seem but slow?
*/

Encoders and PID control make for some nice driving:
/*
Be where you list, your charter is so strong
That you yourself may privilege your time
To what you will; to you it doth belong
Yourself to pardon of self-doing crime.
*/

For static or global variables:
/*
Your name from hence immortal life shall have,
Though I, once gone, to all the world must die:
*/

And, in honor of the BASIC stamp of years past, here's the last sample I'll give (afterall, you might reverse engineer my code if I offer too much )
/*
Thou art as fair in knowledge as in hue,
Finding thy worth a limit past my praise;
And therefore art enforced to seek anew
Some fresher stamp of the time-bettering days.
*/

See, I'm not obsessed with programming. I do have a literary side! (And with 154 sonnets, and other poems to boot, you can imagine that this is but a small sample. W00t!)
  #5   Spotlight this post!  
Unread 16-02-2004, 21:09
Ryan Cumings's Avatar
Ryan Cumings Ryan Cumings is offline
Programmer and University Rejected
#0134 (Team Discovery)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2000
Location: Pembroke, NH
Posts: 65
Ryan Cumings is an unknown quantity at this point
Send a message via AIM to Ryan Cumings
Re: Autonomous Program Names

I decided to let a crazy German run amok in my code this year.. It beats the mute from last year that didn't explain anything at all
Code:
void normalize_motors(unsigned char left, unsigned char right) {
		// Vait!! Dat's der vrong direction
		// -- Inverse the polarity if required
	left = (INVERT_LEFT ? 255 - left : left);
	right = (INVERT_RIGHT ? 255 - right : right);

		// Vut da hell ist up wiv dat der blinkin lighten
		// -- Keep the controller from resting by stopping the magic word
	left = (left == 255 ? 254 : left);
	right = (right == 255 ? 254 : right);

		// Vee vill tell das utters vhere vee vent
		// -- Keep this information, it may be useful
	left_reverse = (left < 127 ? -1 : 1);
	right_reverse = (right < 127 ? -1 : 1);

		// Und zee motors spin vround und vround
		// -- Final output goes to motors
	Generate_Pwms( 127, 127, left, right);
	LEFT_MOTOR = right;
	RIGHT_MOTOR = right;
}
__________________
Suddenly being rejected from college feels right during the build season. Now I am a mentor.
  #6   Spotlight this post!  
Unread 16-02-2004, 21:38
deltacoder1020's Avatar
deltacoder1020 deltacoder1020 is offline
Computer Guy
AKA: Dav
#1020 (The Indiana Prank Monkeys)
Team Role: Programmer
 
Join Date: Jan 2004
Location: Muncie, Indiana
Posts: 340
deltacoder1020 has a spectacular aura aboutdeltacoder1020 has a spectacular aura about
Send a message via AIM to deltacoder1020
Re: Autonomous Program Names

ha! i like both the german and the poet
__________________
Team 1020, the Indiana Prank Monkeys (www.team1020.org)
  #7   Spotlight this post!  
Unread 16-02-2004, 22:40
Michael Auchter Michael Auchter is offline
Registered User
#0068 (Truck Town Thunder)
 
Join Date: Jan 2004
Location: Clarkston, MI
Posts: 15
Michael Auchter is on a distinguished road
Re: Autonomous Program Names

for some odd reason, i decided to use wierd variable names in our filtering code.
the variable to refer to the pwm is "watermelon", and the one to refer to the joystick is "napalm"... kind of funny seeing things like:

if ( (watermelon - napalm) > (p2_wheel / 10) )
...
  #8   Spotlight this post!  
Unread 16-02-2004, 23:00
velocipenguin velocipenguin is offline
Registered User
#0246 (Overclocked)
Team Role: Programmer
 
Join Date: Feb 2004
Location: Boston, MA
Posts: 77
velocipenguin is on a distinguished road
Send a message via AIM to velocipenguin
Re: Autonomous Program Names

This thread is hilarious.

I would participate in similar obfuscatory antics, but I'm the only person on my team who can do the programming, and I'm hoping to keep my code fairly self-explanatory and well-commented so that my freshman apprentice can carry on in my stead after I graduate. It's really a shame - properly obfuscating code is an underappreciated art.
  #9   Spotlight this post!  
Unread 16-02-2004, 23:15
WillyC's Avatar
WillyC WillyC is offline
"handy"
#1347
Team Role: Engineer
 
Join Date: Jan 2004
Location: Ottawa, Canada
Posts: 29
WillyC is on a distinguished road
Re: Autonomous Program Names

You guys are hysterical! Thanks again for a great laugh. Wow, best thread I've seen yet. Maybe I'll start naming all of my variables after Toronto Maple Leafs players now. The really slow motor speed will be JYRKE_LUMME. The super-fast speed will be MATS_SUNDIN and the game-saving kick-$@#$@#$@# strategy mode will be a call to Ed_Belfour(). And whenever we get in a pushing match with another bot we'll just call in Tie_Domi() to sort things out...

  #10   Spotlight this post!  
Unread 17-02-2004, 00:18
Avarik Avarik is offline
Registered User
#0022
 
Join Date: Jan 2004
Location: Chatsworth, CA
Posts: 75
Avarik is an unknown quantity at this point
Re: Autonomous Program Names

Last year we named our left and right programs NOOPS and KROF...now start figuring out which was which!

Also, I too cannot make strange names. However, the sonnet thing sounds like a fun idea. Then when I am gone, the others can learn through sonnets. Its shakespear and robotics...come together!
  #11   Spotlight this post!  
Unread 17-02-2004, 00:30
The Lucas's Avatar
The Lucas The Lucas is offline
CaMOElot, it is a silly place
AKA: My First Name is really "The" (or Brian)
FRC #0365 (The Miracle Workerz); FRC#1495 (AGR); FRC#4342 (Demon)
Team Role: Mentor
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Dela-Where?
Posts: 1,564
The Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond repute
Send a message via AIM to The Lucas
Re: Autonomous Program Names

I wrote this compressor control code after playing a few too many Zelda games. My students found it very amusing and it is actually in the robot (and works quite well, debounce helps).

Code:
/*******************************************************************************
* FUNCTION NAME: Magic_Wind
* PURPOSE: Creates magic wind (air pressure) to blow into (confidential info  edited out) of the robot.  
*			Minimizes rapid wind changes (debounces).
* CALLED FROM: Process_Data_From_Master_uP 
* PARAMETERS: none  
* RETURNS: void 
*******************************************************************************/
//constants
#define Change_in_Wind	15
//aliases
#define Rumble_Pak	relay1_fwd //compressor (until fuse blows)
#define Rumble_Gnd	relay1_rev //compressor (always 0, unless 
			               //I choose to decompress the bot)
#define Wind_Waker	rc_dig_in18 //pressure switch
//global var
unsigned char Old_Wind_Waker = 1;
unsigned char Wind_Timer = Change_in_Wind;

void Magic_Wind()
{
	if (Wind_Timer == Change_in_Wind)
		Rumble_Pak = !Wind_Waker;
	else if (Wind_Timer < Change_in_Wind)
		Wind_Timer++;

	if (Wind_Waker != Old_Wind_Waker)
		Wind_Timer = 0;
	Rumble_Gnd = 0;
	Old_Wind_Waker = Wind_Waker; 
}
__________________
Electrical & Programming Mentor ---Team #365 "The Miracle Workerz"
Programming Mentor ---Team #4342 "Demon Robotics"
Founding Mentor --- Team #1495 Avon Grove High School
2007 CMP Chairman's Award - Thanks to all MOE members (and others) past and present who made it a reality.
Robot Inspector
"I don't think I'm ever more ''aware'' than I am right after I burn my thumb with a soldering iron"

Last edited by The Lucas : 17-02-2004 at 00:34.
  #12   Spotlight this post!  
Unread 17-02-2004, 00:31
deltacoder1020's Avatar
deltacoder1020 deltacoder1020 is offline
Computer Guy
AKA: Dav
#1020 (The Indiana Prank Monkeys)
Team Role: Programmer
 
Join Date: Jan 2004
Location: Muncie, Indiana
Posts: 340
deltacoder1020 has a spectacular aura aboutdeltacoder1020 has a spectacular aura about
Send a message via AIM to deltacoder1020
Re: Autonomous Program Names

I point you all to http://www.ioccc.org/ - particularly, to:

http://www0.us.ioccc.org/2000/anderson.c
(http://www0.us.ioccc.org/2000/anderson.hint)

http://www0.us.ioccc.org/1996/gandalf.c
(http://www0.us.ioccc.org/1996/gandalf.hint)

http://www0.us.ioccc.org/1994/smr.c - you have to read the hint file for this one...
(http://www0.us.ioccc.org/1994/smr.hint)

http://www0.us.ioccc.org/1984/mullender.c - this one is insane, read the hint file to find out what the heck it is
(http://www0.us.ioccc.org/1984/mullender.hint)
__________________
Team 1020, the Indiana Prank Monkeys (www.team1020.org)
  #13   Spotlight this post!  
Unread 17-02-2004, 10:25
mtrawls's Avatar
mtrawls mtrawls is offline
I am JVN! (John von Neumann)
#0122 (NASA Knights)
Team Role: Programmer
 
Join Date: Mar 2003
Location: Hampton, VA
Posts: 295
mtrawls is a splendid one to beholdmtrawls is a splendid one to beholdmtrawls is a splendid one to beholdmtrawls is a splendid one to beholdmtrawls is a splendid one to beholdmtrawls is a splendid one to beholdmtrawls is a splendid one to behold
Send a message via AIM to mtrawls
Re: Autonomous Program Names

I don't think all this obsfucation is too good for actual robot code (in good fun, perhaps, but not for production code). I try to keep my creativity confined to the blissful realm of comments (non-compiled) -- err.. mostly, anyway. If something goes wrong (when doesn't it), staring at watermelons and other fruit all day might not help too much in troubleshooting ... variable names should be descriptive -- e.g., our drive motors last year had the variable name '[lr]chalupa' (for the harder to spell chipahuah ... well, yeah, hence the easier to spell consistently variable name).

With my comments, if you understand why they are there, it is a sure sign you understand the code (well, almost). I was thinking about writing the code in iambic pentameter (or at least composed of iambs more likely) -- but having to end most lines with semi-colon, or the frequent open parentheses, close square bracket, tilde carret, combinations made it difficult. Plus, my comments were added so that non-programming types can enjoy the code and perhaps understand it -- something obsfucation tends to decrease the odds of.

But it does make one ponder. What if shakespeare were a programmer? (Much apologies to my english teacher; I can only imagine how her face must be writhing now, considering such heresy as this.)

(Oh, and to the humour impaired, strict style programmer out there, my tongue is thoroughly lodged in my cheek as I write this.)
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
A better autonomous method.. randomperson Programming 4 24-02-2004 18:02
how to add steps in the provided encoder program for the edu Zaramel2002 Programming 3 11-02-2004 08:35
What type of autonomous mode program are you using? SilverStar Programming 1 21-01-2004 18:48
autonomous mode problem on field Chris_C Programming 17 26-03-2003 19:11
Fried program slots? Jeff Waegelin Programming 18 19-03-2003 18:08


All times are GMT -5. The time now is 18:47.

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