OCCRA
Go to Post Dear Mr. Lavery, Congratulations. For the fourth year running, you have successfully ruined my Christmas holiday with your untimely release of a most obfuscating, but no less tantalizing, hint. - dubious elise [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 01-31-2005, 09:26 PM
Chris_Elston's Avatar
Chris_Elston Chris_Elston is offline
Controls Engineer
AKA: chakorules
FRC #1501 (Team THRUST)
Team Role: Engineer
 
Join Date: Feb 2004
Rookie Year: 2001
Location: Huntington, Indiana
Posts: 767
Chris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond repute
Team THRUST - Kevin's Code and Camera Code Combine

Ok before you guys beat us up...please read the following:

thrust_1.0 version

Here is Kevin's Navigation Script and the Default Camera Code from IFI in one program.

PS: Thank you Kevin for your responses and e-mail answers! Also thank you IFI for providing some default code to get started...

Before you get too excited, know this...

Just as the program sits now, it compiles to 30K of user memory. And we haven't even begun to write any automous mode scripting.

Also, to even get it to compiled...we had to comment out sections of the code...

Basically look for this in user_routines.c
line 318 or so...in MPLAB IDE.

Code:
robot_control();

#if _USE_CMU_CAMERA
		//auto_drive();

#else
  		//man_drive();
#endif
You'll want to place robot_control(); function in drive.c
void auto_drive (void) section...

Also you'll need to uncomment all the vision controls in drive.c
void auto_drive (void) section...

If you have enough space left, it might let you compile the code. Version 1.1 below will compile barely with enough space left. The changes we have described above are included in version 1.1. Basically start with version 1.1 below and you should be able to see the camera code and navigation code work independently of each other just as if you were downloading them separately.

thrust_1.1 version has all of the above ready to go.

We've tested this and each part works correctly, we've decided that we are not going to use both types of code because compiled as is, the program is 30K....good luck writting your automous mode with 2k left.

Kevin's code complies to 20K and the camera code complies to 19K.
Together they are 30K.

Basically press the button PORT 1 to select a color, and you can still wait for the bump switch too from Kevin's code. (If your not Camera code Enabled) We are using PWM 11 and PWM 12 with this code.

Anyway like we said, good luck if you plan on taking this approach. We pretty much have canned the idea after seeing the memory usage tonight so not much more time was spent on cleaning up this code to perfection. We hope there is enough code here for someone to pick it up and use it if you wish.

Team THRUST programmers can answer any questions you'd like to ask.
However you'll have to come up with your own memory saving games.

Also when using the code, don't forget to:

1. TUNE your PID
2. Set your encoder direction in encoder
3. Set your drive motor direction in pid
4. Set your wheelbase and encoder resolution
5. Change your PWM values to your setting.
6. Set your own color settings, (lighting varibles)

If you’re like us, you know what we are talking about if you've played with Kevin's Navigation Script and the Camera code script independently.

We hope this helps someone...
__________________
Team T.H.R.U.S.T. 1501
Download all of our past robot's source code here:Repository

Favorite CD quote:
"That can't be their 'bot. not nearly enough (if any) rivets to be a 1501 machine." ~RogerR: Team #1369
  #2   Spotlight this post!  
Unread 01-31-2005, 10:14 PM
the_undefined's Avatar
the_undefined the_undefined is offline
German FES
AKA: Felix Geisendörfer
#1648 (Gearbox Gangstas)
Team Role: Programmer
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Germany
Posts: 77
the_undefined has a spectacular aura aboutthe_undefined has a spectacular aura about
Re: Team THRUST - Kevin's Code and Camera Code Combine

Hey thanks for the work you guys put into that, I'll probably directly try the code out tomorrow and see how well it is doing.
The Memory Problem sounds bad so. Is you .hex file 30 kb or the File that is really saved on your RC Controler, so is there maybe some more space than you guys think?
  #3   Spotlight this post!  
Unread 01-31-2005, 10:17 PM
roboticsguy1988's Avatar
roboticsguy1988 roboticsguy1988 is offline
Larry Johnston
AKA: Larry Boy
FRC #1501 (Team THRUST)
Team Role: Electrical
 
Join Date: Jan 2004
Rookie Year: 2001
Location: Huntington, IN
Posts: 290
roboticsguy1988 has much to be proud ofroboticsguy1988 has much to be proud ofroboticsguy1988 has much to be proud ofroboticsguy1988 has much to be proud ofroboticsguy1988 has much to be proud ofroboticsguy1988 has much to be proud ofroboticsguy1988 has much to be proud ofroboticsguy1988 has much to be proud ofroboticsguy1988 has much to be proud of
Send a message via ICQ to roboticsguy1988 Send a message via AIM to roboticsguy1988 Send a message via MSN to roboticsguy1988 Send a message via Yahoo to roboticsguy1988
Re: Team THRUST - Kevin's Code and Camera Code Combine

Quote:
Originally Posted by the_undefined
Hey thanks for the work you guys put into that, I'll probably directly try the code out tomorrow and see how well it is doing.
The Memory Problem sounds bad so. Is you .hex file 30 kb or the File that is really saved on your RC Controler, so is there maybe some more space than you guys think?
The way we checked it was by looking at the last hex decimal number in the .lst file after building the code. I know there are other ways.......but i couldn't remember them at the time.

EDIT//
This link may help: Reading how much memory is used.
//EDIT
__________________
Larry Johnston, Team THRUST, Team #1501, Team THRUST webpage

2005 IRI - Imagery and Design Award
2005 - 2006 BMR - Professional Grade Award
2006 BMR - Delphi Driving Tomorrow's Technology Award

"That can't be their 'bot. not nearly enough (if any) rivets to be a 1501 machine." ~ RogerR
~Da team that uses all tha rivets, Team #1501~


The FIRST Software Repository ~ Chief Admin
openFIRST ~ Project Supporter (Former editor)
DMOZ.org - FIRST - US Teams Section ~ Chief Editor

Last edited by roboticsguy1988 : 01-31-2005 at 10:25 PM.
  #4   Spotlight this post!  
Unread 01-31-2005, 10:28 PM
Chris_Elston's Avatar
Chris_Elston Chris_Elston is offline
Controls Engineer
AKA: chakorules
FRC #1501 (Team THRUST)
Team Role: Engineer
 
Join Date: Feb 2004
Rookie Year: 2001
Location: Huntington, Indiana
Posts: 767
Chris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond repute
Re: Team THRUST - Kevin's Code and Camera Code Combine

Quote:
Originally Posted by the_undefined
so is there maybe some more space than you guys think?
There could be. I am not an expert PIC programmer nor an expert C programmer...(I am an expert PLC programmer), so there could be places that I don't know that you could conserve memory.

I do know if you remove stdio and all the printf functions, this will save you another 4K of memory...but how in the world are you gonna debug your code without those tools.....eh...?
__________________
Team T.H.R.U.S.T. 1501
Download all of our past robot's source code here:Repository

Favorite CD quote:
"That can't be their 'bot. not nearly enough (if any) rivets to be a 1501 machine." ~RogerR: Team #1369
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
Scripting Setup and the Camera + Serial Port Drivers CJO Programming 22 01-11-2006 05:42 PM
Camera Code Fishdude404 Programming 1 01-25-2005 06:59 PM
Kevin Watson's Kick-off Demo Code! Mr. Lim Programming 27 01-22-2005 03:38 AM
camera code or yaniv Programming 1 01-21-2005 07:32 AM
CMUCam2 Camera Code - Are important parts commented out? Mr. Lim Programming 4 01-14-2005 12:11 PM


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

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