Go to Post 254 isn't just good at building their robot. They're also good at taking pictures of it. - Chickenonastick [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 31-01-2005, 21:26
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: 747
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
 


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 11-01-2006 17:42
Camera Code Fishdude404 Programming 1 25-01-2005 18:59
Kevin Watson's Kick-off Demo Code! Mr. Lim Programming 27 22-01-2005 03:38
camera code or yaniv Programming 1 21-01-2005 07:32
CMUCam2 Camera Code - Are important parts commented out? Mr. Lim Programming 4 14-01-2005 12:11


All times are GMT -5. The time now is 05:20.

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