Go to Post You are certainly welcome to demonstrate your geekiness on a regular basis! :) - Cynette [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 25-01-2005, 18:46
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: reprogram during a competition

Quote:
Originally Posted by Mike Betts
At the risk of sounding condescending, I can't believe that anyone is running out of space. If so, take a good hard look at what you are doing.
I ran out of space with just the default code with the scripting and camera code early in the season. There were virtually no modifications to the code except to put the 2 together, which was extremely little.

The way I solved this was to just enable more obtimizations. If you do advanced debuging, read the compiler manual first. A few of them change break points, which I presume apply to the simulator, too.
  #2   Spotlight this post!  
Unread 25-01-2005, 08:33
Ryan Foley Ryan Foley is offline
Registered User
FRC #5687 (The Outliers)
Team Role: Mentor
 
Join Date: Jun 2002
Rookie Year: 2001
Location: ME
Posts: 447
Ryan Foley has a reputation beyond reputeRyan Foley has a reputation beyond reputeRyan Foley has a reputation beyond reputeRyan Foley has a reputation beyond reputeRyan Foley has a reputation beyond reputeRyan Foley has a reputation beyond reputeRyan Foley has a reputation beyond reputeRyan Foley has a reputation beyond reputeRyan Foley has a reputation beyond reputeRyan Foley has a reputation beyond reputeRyan Foley has a reputation beyond repute
Re: reprogram during a competition

Quote:
Originally Posted by russell
I might be totally missing something, but like jgannon says it takes (me at least) way more than 1.5 seconds to download a program to the RC. More like 1.5 minutes. And why dont you simply do the processing on something else (how much does a 386 cost?) and just use the RC for I/O?
He brings up a very good point. I believe that in 2003 the Wildstang 111 robot had a Motorola processor on it to do all of the calculations and processing, and the RC itself would be used for only a little bit of the program and the I/O. Go to the Wildstang website and click on "Stang PS" for a bit more information.
__________________
Ryan

FRC #5687: The Outliers [2015-?]
FRC #1995: Fatal Error [2007-2009]
FRC #350: Timberlane Robotics [2001-2004]

FRC/FLL volunteer since 2005
  #3   Spotlight this post!  
Unread 25-01-2005, 10:22
jgannon's Avatar
jgannon jgannon is offline
I ᐸ3 Robots
AKA: Joey Gannon
no team
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Pittsburgh, PA
Posts: 1,467
jgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond repute
Re: reprogram during a competition

Quote:
Originally Posted by RbtGal1351
Ok now please bear with me, im a rookie programmer, but why would the above example save any memory space on the actual robot controller? when you build it, it just makes it assembly language (the .hex file), and both those (above) are the same. thats the whole goal.
There are only about 1300 bytes (1200? I forget the exact number.) of variable space available to the user. My first example requires three ints, for a total of six bytes. The second example requires two ints, for a total of four bytes. I understand that variable allocation is not the only concern with respect to memory, but teams will discover that if they start wildly instantiating global variables, they'll start getting a lot of weird compiler errors, indicating that they've run out of space.
Quote:
Originally Posted by RbtGal1351
look up tables are faster and smaller than calculating something
Faster, maybe, but definitely not smaller. I've been seeing all of these lookup tables that teams are using for desensitizing their joysticks, when all they really need is a simple quadratic equation, which I'm certain will take up significantly less space on the bot.
Quote:
Originally Posted by Mark McLeod
have you tried using the built-in compiler optimization to reduce your program bulk?
Hm... no I haven't. I didn't even know that existed. That may very well come in handy for all of us. Thanks.
__________________
Team 1743 - The Short Circuits
2010 Pittsburgh Excellence in Design & Team Spirit Awards
2009 Pittsburgh Regional Champions (thanks to 222 and 1218)
2007 Pittsburgh Website Award
2006 Pittsburgh Regional Champions (thanks to 395 and 1038)
2006 Pittsburgh Rookie Inspiration & Highest Rookie Seed

Team 1388 - Eagle Robotics
2005 Sacramento Engineering Inspiration
2004 Curie Division Champions (thanks to 1038 and 175)
2004 Sacramento Rookie All-Star

_
  #4   Spotlight this post!  
Unread 25-01-2005, 10:57
jacob_dilles's Avatar
jacob_dilles jacob_dilles is offline
Registered User
AKA: theshadow
FRC #0620 (WarBots)
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2003
Location: Vienna, VA
Posts: 245
jacob_dilles will become famous soon enough
Send a message via AIM to jacob_dilles
Re: reprogram during a competition

im sorry if you misunderstood my question. i was wondering if reprograming the robot was legal durring the compitition.
Quote:
Originally Posted by Mike Betts
Programming an embedded system is absolutely nothing like programming a PC.
again, thanks -- ive been programming MCUs since i was 9 and got my first BOE-BOT kit... 7 years later i think i can tell the difference between a IBM platform PC and a PIC microprocessor
Quote:
Originally Posted by Mike Betts
First rule: Never, never, ever use floating point arithmetic.
i don’t like the thought of using chars, ints are pushing it...
Quote:
Originally Posted by Mike Betts
Second rule: Never, ever use dynamic allocation of memory.
external EEPROM is better then internal memory if you want to map data, but i generally use algorithms anyway (DMA isnt my cup of tea)
Quote:
Originally Posted by Mike Betts
Third: Avoid pointer manipulations unless you understand what it does in the machine (some dereferencing manipulations are murder).
this i most hardly agree with
Quote:
Originally Posted by Mike Betts
Look at the assembly code being generated by the compiler. You can see it in the .lst file that is generated when you build your project.
I used to write assembly for fun, thank you very much - thus my habits of not using as few IFs as possible; i much prefer boolean algebra.

Im not a "newbie" programmer, ive have been the head of our programming team since my freshman year. I have taken collage level CS in JAVA and C, as well as many, many courses on programming in just about every other modern high level language.

However, i have been doing this for a relatively short period of time -- there are people that are much better at this then i will ever be, and many of them participate in FIRST. i never pretend to know everything, so i respect everyone on the forums, and assume they know more then me, and in turn I hope they respect me

also i try very hard to keep delphi threads to the point... but stuff like
Quote:
Originally Posted by Mike Betts
At the risk of sounding condescending, I can't believe that anyone is running out of space.
is unnecessary. i am sorry that you dont believe me , i never thought that i would have to take a screnie for something like that.



external processing is what our team has planned thus far. and i will be sure to try Marks optimization process... i wasnt looking for a lecture on how to optimize code (read the thread title!) i was looking for the legal implications of reprogramming the robot during a match. Thanks anyway – jsd
__________________
--------------------------
"You're not a real programmer until all your sentences end with semicolons;"
  #5   Spotlight this post!  
Unread 25-01-2005, 15:48
Vashts6583's Avatar
Vashts6583 Vashts6583 is offline
The sleepless
AKA: Rob Metzger
FRC #0007 (Team 007)
Team Role: Leadership
 
Join Date: Dec 2004
Rookie Year: 2005
Location: Parkville
Posts: 79
Vashts6583 is a name known to allVashts6583 is a name known to allVashts6583 is a name known to allVashts6583 is a name known to allVashts6583 is a name known to allVashts6583 is a name known to all
Send a message via ICQ to Vashts6583 Send a message via AIM to Vashts6583 Send a message via MSN to Vashts6583 Send a message via Yahoo to Vashts6583
Re: reprogram during a competition

"<R14> Prior to the competitions: After the close of the "FIX-IT WINDOW"and prior to the competition, the team must put down their tools, cease fabrication of robot parts, and cease all software development. Take this opportunity to rest, recover from the build season, and relax. Teams may scout other teams, gather and exchage information, develop game-playing strategies, collect raw materials, prepare tool kits, plan how to make repairs, etc. in preparation for the upcoming competitions. But no construction or fabrication is allowed."

I take this to mean that you cannot create unexisting code, but you can tweak existing code to make it function properly.

Also, <R16> states: "The purpose of this Rule is to allow teams to make critical repairs to existing parts to enable them to compete in following events." Also, the total weight of Repair parts cannot excede 25lbs.

First of all, critical repairs can mean non-wroking coding that you did not have the time to fix. Second, existing parts includes the code since the code is a part of the robot, else it would not work. Third, total weight<25lbs. A floppy disc with the correct code weighs alot less than 1 lb., and the code can be uploaded easily, as long as someone brings along a laptop or some other method of moving code onto the robot.

All in all, I believe that tweaking code after the "FIX-IT WINDOW" is allowed, just as long as it tweaks already existing code on the robot. However, this is not an official ruling, just a rookie's opinion.
__________________
/*********************
2005: Software Assistant
2006: Software Head
2007: President/Driver/Software Head/Temporary Safety Captain
*********************/

//2005: Chesapeake Regional - Finalist


Life is what you do outside of FIRST. No wonder it's so short.
  #6   Spotlight this post!  
Unread 24-01-2005, 22:16
jacob_dilles's Avatar
jacob_dilles jacob_dilles is offline
Registered User
AKA: theshadow
FRC #0620 (WarBots)
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2003
Location: Vienna, VA
Posts: 245
jacob_dilles will become famous soon enough
Send a message via AIM to jacob_dilles
Re: reprogram during a competition

Quote:
Originally Posted by Kyle
I am not a programmer but could you explain why you would need to do that after Auto mode is over the robot is in driver mode and the only programing that you would need is what is need to run from the controller to the robot, right?


Just remember that i am not a programmer, I would just like to know why that would be needed. so please be nice if I sound really dumb.
I think what you’re trying to say that the driver code is not complex, or long, because it just takes the values from the joystick and sends them to the Victors.

Our driver code is both complex and long, and we go over it hours at a time trying to make it shorter, and it’s still huge. We use sensors to measure rotation and two direction acceleration, and make changes to the motor outputs based on where the robot is and where the operator wants the robot to be. And all of the arm controls, limits, etc take up space too.

The memory on the RC is limited to start with (a couple of KB). It doesn’t help that the chip was designed to run assembly and we compile C++ to it… C is a complicated high level language that uses lots of libraries that take space. Then IFs “default” code is a beast (its got to be compatible with every team), but you cant ditch it because they wont give you total control over the RC (it’s a boot loader, ugg). And some of our programming team members write crummy code. All and all, memory is precious, and the more the better.

I hope this answers your question, jsd

Quote:
Originally Posted by jgannon
I would suggest a much simpler way of achieving the same results: optimize your code. It's free, and much less likely to malfunction. I truely doubt that you actually are going to run out of memory.
We work only on code every day for 6 weeks… we can do 80% of stuff with out a second program
Quote:
Originally Posted by jgannon
I truely doubt that you actually are going to run out of memory.
I’m sorry if you doubt it, but I have run out of memory, and its not fun. Actually the first time it happened was in the pits, but I was writing sloppy code, so it is expected.
Quote:
Originally Posted by jgannon
The first law of programming is that there are always ways of doing things quicker and in less space than you already are
Incase it wasn’t clear -- This was a theoretical question; the probability that I would implement it is very low. But when my team comes up with another page of stuff the robot is suppose to do by itself; I at least need a worst case scenario


Thanks though – jsd
__________________
--------------------------
"You're not a real programmer until all your sentences end with semicolons;"

Last edited by jacob_dilles : 24-01-2005 at 22:25.
  #7   Spotlight this post!  
Unread 24-01-2005, 22:31
jgannon's Avatar
jgannon jgannon is offline
I ᐸ3 Robots
AKA: Joey Gannon
no team
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Pittsburgh, PA
Posts: 1,467
jgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond repute
Re: reprogram during a competition

Quote:
Originally Posted by jacob_dilles
This was a theoretical question
Bah, and here I tried to provide a practical answer.

Look at the Additional Parts flowchart in section 5 of the manual to determine if this device is legal or not. If you don't get a satisfactory answer, try the FIRST Q&A.

One more note on the practicality of this: maybe our programming computer is different from yours (1.8GHz seems like enough), but it takes a bit longer than 1.5 seconds for me to send code to the RC with IFI Loader.
__________________
Team 1743 - The Short Circuits
2010 Pittsburgh Excellence in Design & Team Spirit Awards
2009 Pittsburgh Regional Champions (thanks to 222 and 1218)
2007 Pittsburgh Website Award
2006 Pittsburgh Regional Champions (thanks to 395 and 1038)
2006 Pittsburgh Rookie Inspiration & Highest Rookie Seed

Team 1388 - Eagle Robotics
2005 Sacramento Engineering Inspiration
2004 Curie Division Champions (thanks to 1038 and 175)
2004 Sacramento Rookie All-Star

_
  #8   Spotlight this post!  
Unread 24-01-2005, 22:20
Max Lobovsky's Avatar
Max Lobovsky Max Lobovsky is offline
Fold em oval!
FRC #1257 (Parallel Universe)
Team Role: College Student
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Scotch Plains, NJ
Posts: 1,026
Max Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant future
Send a message via AIM to Max Lobovsky
Re: reprogram during a competition

I believe your effort would be much better spent optimizing your code to make it smaller as others suggested. There is a lot you can legally and safely strip out of the default code. Additionally, once you have your code debugged and in a stable stage, you can start rewriting stuff to sacrifice manageability and "good" programming practice for smaller size.

BTW, we are programming in C, not C++ and every robots code that I have seen uses very few extra libraries.
__________________
Learn, edit, inspire: The FIRSTwiki.
Team 1257


2005 NYC Regional - 2nd seed, Xerox Creativity Award, Autodesk Visualization Award
2005 Chesapeake Regional - Engineering Inspiration Award
2004 Chesapeake Regional - Rookie Inspiration award
2004 NJ Regional - Team Spirit Award
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
CMUcam II and competition lighting environments dlavery Programming 5 16-02-2005 02:07
2004 WPI EBOT Competition (using Robovation robots) ahecht Off-Season Events 3 04-11-2004 21:25
FANATIC - Offseason Animation Competition opnickc 3D Animation and Competition 15 10-06-2004 20:54
New Competition in MI, Mailing List Allison K Off-Season Events 0 29-03-2004 19:53
Robots prepped for competition Brandon Martus FIRST In the News... 0 24-03-2004 17:06


All times are GMT -5. The time now is 14:09.

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