Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   2007 Default Code? (http://www.chiefdelphi.com/forums/showthread.php?t=51057)

Binome 06-01-2007 12:54

07 RC code
 
Anyone know where it is?

teh_pwnerer795 06-01-2007 13:29

Re: 07 RC code
 
lmao... i guess its in the box with all of software

Davx 06-01-2007 13:32

Re: 07 RC code
 
The 2006 code is availible at IFI Robotics, and although the 2007 RC is likely to come with a different version, the general structure will no doubt be the same. If you're just looking for a platform the start development, the 2006 user code is a good place to start. You should only have to copy over your user-created files and anything you add to User_Routines.c and User_Routines_fast.c.

Kingofl337 06-01-2007 13:43

Re: 07 RC code
 
The 2007 Code for easyC will be posted on: http://www.intelitekdownloads.com/easyCPRO/

Alexa Stott 06-01-2007 14:43

Re: 07 RC code
 
Kevin's code is up on his site. Scroll down a bit to find it.

Ctrl Alt Delete 06-01-2007 14:55

2007 Default Code?
 
Can't seem to find default code for 2007 yet. Anyone know where I can find it or will find it eventually?

Davx 06-01-2007 15:00

Re: 2007 Default Code?
 
The default code is generally found at IFI Robotics. The 2006 code was last updated on 12/28/06, so it's likely that the 2007 code is not very (if at all) different. This is where the code would be most likely to show up if the 2007 is any different. Seeing as the controller has not changed for the 2007 season, I'd guess there is no change in the default code.

paulcd2000 06-01-2007 15:01

Re: 07 RC code
 
where? that's 2006 at the bottom

Ctrl Alt Delete 06-01-2007 15:08

Re: 2007 Default Code?
 
Thanks. I realized that after I thought about it. The controllers changed from 04 and 05 though. We figured that out the hard way last week! :D
I guess I'll be testing it out in FusionEdit.

EDIT: If it came out in December then they made two spelling mistakes on the site. The download file is 2-28 and it says right next to it 21-28.

amateurrobotguy 07-01-2007 01:32

Re: 2007 Default Code?
 
I believe the 2006 code IS the 2007 code. Seeing as MPLAB compiler version and IDE did not change from last year, I would assume that everything works the same. Check Kevin's site. The files were updated last year, but now say "2007 Default".

That is convenient for us proggers as we don't have to port our already running cam routines :) Now...to work with 2 lights at the same time *rubs chin*

Kevin Watson 07-01-2007 02:19

Re: 2007 Default Code?
 
Quote:

Originally Posted by amateurrobotguy (Post 549763)
That is convenient for us proggers as we don't have to port our already running cam routines :)

Yes, exactly. Last year Dave dropped the hint that the CUMcam2 would be back, and I'm hoping teams have spent some time in the off-season working with the camera.

Quote:

Originally Posted by amateurrobotguy (Post 549763)
Now...to work with 2 lights at the same time *rubs chin*

The best thing to do at this point is to spend some time thinking about what the camera will "see" from the starting area. It's important to know a few things:

1) The camera has a very wide field of view of ~60 degrees.
2) The camera will not always "see" two lights. Recent data taken on a regulation field shows that the camera will only detect a single light if it's within about +/- 25 degrees of rotation relative to the camera.
3) If two lights are detected by the camera, the camera will return a single rectangle around both lights.
4) If only one light is detected by the camera, the number of pixels reported by the camera will be small (~10).

-Kevin

chris31 07-01-2007 09:21

Re: 2007 Default Code?
 
Quote:

Originally Posted by Kevin Watson (Post 549795)
The best thing to do at this point is to spend some time thinking about what the camera will "see" from the starting area. It's important to know a few things:

I thought the rule was we are not allowed to reuse code. Ill have to check this years manual though.

Astronouth7303 07-01-2007 12:46

Re: 2007 Default Code?
 
Quote:

Originally Posted by chris31 (Post 549858)
I thought the rule was we are not allowed to reuse code. Ill have to check this years manual though.

This rule has always been vague and debated. Use good judgment (and GP).

My personal policy is that: (1) You should be allowed to use any libraries you (or anyone else) have developed; (2) You can copy/paste trivial snippets that, if developed from scratch, would look nearly identical anyway.

Of course, using previous code as a guide to writing this year's code is perfectly fine, IMHO. (I haven't gotten to that section of the manual yet.)

Also, retyping should be considered the same as copy/pasting. This goes for competitions as well. If you bring print outs of code that you just type into the laptop, why not just bring a flash drive with the files? The manual is pretty clear, though, that writing code during the fix-it windows for your specific robot is off-limits. You may design, structure, outline, etc. code. See the section on the robot for details.

bcieslak 07-01-2007 14:56

CMU CAmera REv A
 
Whats the difference between the new Rev A CMUCam and the one from last year? Anything we should be aware of? Where are the updated docs?

the the kick off video the showed a screen displaying number of targets and some other info. Is that available anywhere? Or is the multiple target comment a red herring?

BrianC

DanDon 07-01-2007 14:59

Re: CMU CAmera REv A
 
Quote:

Originally Posted by bcieslak (Post 550055)
Whats the difference between the new Rev A CMUCam and the one from last year? Anything we should be aware of? Where are the updated docs?

the the kick off video the showed a screen displaying number of targets and some other info. Is that available anywhere? Or is the multiple target comment a red herring?

BrianC

That code is available here.

At least one difference between the camera's is that this year's camera does not have the capability to drive servos.

Astronouth7303 07-01-2007 21:36

Re: CMU CAmera REv A
 
Quote:

Originally Posted by dhoizner (Post 550063)
At least one difference between the camera's is that this year's camera does not have the capability to drive servos.

You're kidding me! You mean at a hardware level it can't drive servos?

I loved that bit. When we have an already overloaded processor (and likely to be more so this year), with poor timing for a "real-time" application, I love being able to offload features for basically free. Less wires to run, less outputs to use, less code to write and tweak, etc.

Kingofl337 07-01-2007 21:42

Re: 2007 Default Code?
 
Sorry, but yes you are correct this years CMU cam has the headers for the servos removed.

Noah Kleinberg 07-01-2007 21:50

Re: 2007 Default Code?
 
Quote:

Originally Posted by Kingofl337 (Post 550548)
Sorry, but yes you are correct this years CMU cam has the headers for the servos removed.

But, as far as my understanding of the rules goes, you can still use last year's CMU cam instead if you want this functionality. Otherwise you could probably offload some of the camera stuff to a second processor if you felt the need to, but I don't think i's necessary unless you're doing a lot of other complicated things.

chris31 07-01-2007 22:18

Re: 2007 Default Code?
 
If they were removed, was anything added? Or just blank board space?

bear24rw 07-01-2007 22:22

Re: 2007 Default Code?
 
http://ifirobotics.com/camera.shtml

look for yourself it just looks... different

chris31 08-01-2007 07:03

Re: 2007 Default Code?
 
Quote:

Originally Posted by bear24rw (Post 550614)
http://ifirobotics.com/camera.shtml

look for yourself it just looks... different

Look at the solder points on the far right. I think those might be it. Ill have to check the PDF for more info. Could be you have to put yout own pins on it.

Kingofl337 08-01-2007 07:28

Re: 2007 Default Code?
 
The boards are the same just the headers are removed. I would ask in the official FIRST forum if you can run the servos from the camera if the 05/06 cameras are used.

Eclipse 08-01-2007 14:57

Re: CMU CAmera REv A
 
Hm. Is there any multiple target code written that's not in easyC? Like, maybe in normal C?

Kingofl337 08-01-2007 15:09

Re: 2007 Default Code?
 
Well the targeting system for the 2007 kickoff is in "C" you would just have to look at the code in easyC and then move it to the Kevin's code.

Brad Miller should have it available for WPILib soon.

Kevin Watson 08-01-2007 16:52

Re: 2007 Default Code?
 
Quote:

Originally Posted by Kingofl337 (Post 551261)
...Of course you would loose the graphics display feature and would have to write your own VT100 calls if you wanted an addressable terminal window.

C'mon, this is pure FUD. The files terminal.c/.h are present in my code just for this reason. I also include this text:

Since the IFI terminal is somewhat restrictive, you might
consider using one of the free high quality terminal emulators
available. TeraTerm Pro (http://www.ayera.com/teraterm) is a
good example. If you dive into the existing code or create
your own custom menus (as I hope you will), you might consider
writing code that will exploit the capabilities of a good
terminal emulator. To get started, do a google search on the
phrase "terminal escape codes".

Building these robots is hard enough already, so If you're going to be supporting teams here, please take the time to make sure you're giving folks accurate information. Thanks.

-Kevin

Kingofl337 08-01-2007 16:58

Re: 2007 Default Code?
 
I stand corrected. Sorry, when I was programming in 05/06 with your code I missed it.

darkmastercrono 09-01-2007 19:28

Re: 2007 Default Code?
 
Has there been any actually default code posted for the FRC 2007? Or is this all conjecture and we are assuming that its the same as the 2006 code (sans cam)

EStokely 10-01-2007 00:17

Re: 2007 Default Code?
 
I keep seeing references to "Check IFI for the 2006 code."
I must be dense I only see a broken link for the 2007 code.

Through a variety of 'incidents' we no longer possess 2006 code and would really like to start working on the code in some form.

So, can anyone show me my error and point at where to find the 2006 code?

Thanks

amateurrobotguy 10-01-2007 01:18

Re: 2007 Default Code?
 
1 Attachment(s)
Sure man, here is the 2006 default code (Please gimme some good rep. points). It may not be the *latest* version, but it worked for me.

Yeah, I don't need any 2007 default code, as we are using the CMUCam, and Kevin kindly already updated that. I am sure 2006 stuff will work though.

I bet if we do see any "2007" code, it will be the latest update of the 2006 stuff. I believe I saw it on Kevin's site as being from December. It is not there now.

The one thing I need to get though is the latest 2006 code available, but it is not on the IFI site anymore. You can use what I uploaded for testing, but don't even try it in mission-critical competition. Does anyone have the December edition of the code?

Lablabla 10-01-2007 12:34

Re: 2007 Default Code?
 
The 2007 Code is available since pretty much now at http://ifirobotics.com/rc.shtml at the bottom

Link to direct file frc-code-2007-8722.zip

amateurrobotguy 10-01-2007 13:16

Re: 2007 Default Code?
 
Whoa, new Master Code :) Even though I don't really need to, as I only use the CMUCam Code, I will run a file difference compare on it to see what changed in the .c and .h files. I'll let y'all know what I find.

Athena 10-01-2007 13:28

Re: 2007 Default Code?
 
The default code for 2007 is now available on ifirobotics. Just look under Robot Controls and FRC Robot Controller. The new code is located at the bottom. I just downloaded it now. One question though. Is the new code for stabilizing the victors in the default code? Or is it somewhere else? I have not been able to find it.

Thanx!
Athena

P.S-I am not using Easy C

Kevin Watson 10-01-2007 13:58

Re: 2007 Default Code?
 
Quote:

Originally Posted by amateurrobotguy (Post 553148)
Whoa, new Master Code :) Even though I don't really need to, as I only use the CMUCam Code, I will run a file difference compare on it to see what changed in the .c and .h files. I'll let y'all know what I find.

Just FYI, according to IFI, there are no changes to the code other than the new master code. Version thirteen of the master code is needed for the new radio modems.

-Kevin

JamesBrown 10-01-2007 14:06

Re: 2007 Default Code?
 
Quote:

Originally Posted by Kevin Watson (Post 553174)
Just FYI, according to IFI, there are no changes to the code other than the new master code. Version thirteen of the master code is needed for the new radio modems.

-Kevin

Last night I put the 2007 controller and radios on the 2005 robot and was not able to download my code, I got a solid orange on the RC mode led even when the bot was not disabled, does any one know if this could be due to the new radio modems and not having the right master code?

dcbrown 10-01-2007 15:40

Re: 2007 Default Code?
 
2005 was different PIC18F processor (8520 if I remember correctly).
2007 controller is PIC18F 8722. If you were downloading 2005 code onto 2007 hardware that may not work correctly unless you recompile with correct settings.

Bud

dcbrown 10-01-2007 16:06

Re: 2007 Default Code?
 
Differences between 2/2006 and 1/2007 code zips

file: 18f8722.lkr not same
grp15 is now protected, wasn't in 2006

file: ifi_library.c in 2007, not in 2006(?)
LibReadMe.txt, change high priority pragma not to use shadow regs

file: README.txt
2006 update comment:
"02/20/2006
- Ifi library update." missing from 2007 file

file: user_routines.c
Default_Routine() has following added lines in 2007 base
" p1_x = 255 - p1_y;
p1_y = 255 - pwm05;"

file: user_SerialDrv.c
"static char rom2ramBufr[12];" added to 2007
Serial_Write() routine added to 2007 code base

file: user_SerialDrv.h
prototype added to 2007 code.

file: Using_a_2005_FRC.txt, file name change - was called
Using_Last_Years_FRC.txt.

file: Util_lib.asm appears to be new for 2007

file: FRC_alltimers_8722.lib now called FRC_alltimers_beta.lib

file: FRC_alltimers.lib new, added 2007.

file: FRC_Default.hex different, time stamp on 2006 is 2/28/2006, the
one for 2007 has an older timestamp of 12/13/2005.

file: FrcCode8722/FRC_default.hex dated 10/10/2005 is new in 2007 zip.

file: FRC_library.lib appears to be new file included in 2007, is
dated 10/10/2005.

file: FRC_MASTER_V12.BIN replaced with FRC_MASTER_V13.BIN

file: FrcCode.hex appears to be new file in 2007.

Astronouth7303 10-01-2007 16:40

Re: 2007 Default Code?
 
Quote:

Originally Posted by dcbrown (Post 553270)
file: user_routines.c
Default_Routine() has following added lines in 2007 base
" p1_x = 255 - p1_y;
p1_y = 255 - pwm05;"

That's strange. Anyone understand why?

amateurrobotguy 10-01-2007 17:00

Re: 2007 Default Code?
 
What was the latest version of the 2006 code? I though there was a December edition, but I only have 2-28-06 stuff. It seems like all the changes that were made were not really important--like it is a "tidy" version. I will port my code to it anyways as it does have newer .lib and .hex files. Cut and Paste --- the only thing Microsoft did right.

From the 2007 readme "This directory contains the default code for the Innovation First 2006 Full-size Robot Controller"

LOL. Maybe they should change the date ;)

amateurrobotguy 10-01-2007 17:02

Re: 2007 Default Code?
 
Quote:

Originally Posted by Astronouth7303 (Post 553299)
That's strange. Anyone understand why?

The second line of code is a joystick inverse code (Up is down, down is up). The first one would re-inverse that on the p1_x variable. I don't see any point of this.

amateurrobotguy 10-01-2007 17:16

Re: 2007 Default Code?
 
Quote:

Originally Posted by dcbrown (Post 553252)
2005 was different PIC18F processor (8520 if I remember correctly).
2007 controller is PIC18F 8722. If you were downloading 2005 code onto 2007 hardware that may not work correctly unless you recompile with correct settings.

Bud

Yes, you have to follow the "Using last year's code.txt" if you want to use 2005 on ur 2006/2007 bot.

Mike Copioli 10-01-2007 17:29

Re: 2007 Default Code?
 
Yes, exactly. Last year Dave dropped the hint that the CUMcam2 would be back, and I'm hoping teams have spent some time in the off-season working with the camera.

Quote:

Originally Posted by Kevin Watson (Post 549795)
The best thing to do at this point is to spend some time thinking about what the camera will "see" from the starting area. It's important to know a few things:

1) The camera has a very wide field of view of ~60 degrees.
2) The camera will not always "see" two lights. Recent data taken on a regulation field shows that the camera will only detect a single light if it's within about +/- 25 degrees of rotation relative to the camera.
3) If two lights are detected by the camera, the camera will return a single rectangle around both lights.
4) If only one light is detected by the camera, the number of pixels reported by the camera will be small (~10).

-Kevin

Kevin, There seems to be some confusion about this years camera code. At the kickoff we were all told that this years camera code could support multiple targets. Is this the case? And if so. How? The code on your repository appears to be no different than last years. Does the new code independantly track multiple centroids? Or does it average the independant targets to produce one centroid? From the above statement it appears that the only way to differentiate between multiple and isolated targets is by the number of pixels. If two targets are "seen" by the camera, how do you direct the camera to select one of the targets?

Joel J 10-01-2007 17:41

Re: 2007 Default Code?
 
It seems to just average the centroids of both targets (so if it finds two lights, then following the centroid sent back would have you heading towards one of the "un lighted" columns). If the pixel count indicates the presence of two targets, you would possibly have to rotate the camera to home in on only one, then track again.

edit: I'm kinda curious how this announced feature works, as well. I shouldn't speculate based only on what I've seen.

Kevin Watson 10-01-2007 18:19

Re: 2007 Default Code?
 
Quote:

Originally Posted by Mike Copioli (Post 553353)
Kevin, There seems to be some confusion about this years camera code. At the kickoff we were all told that this years camera code could support multiple targets. Is this the case? And if so. How?

Dave was referring to code written by FIRST engineering staff and included with EasyC.

Quote:

Originally Posted by Mike Copioli (Post 553353)
The code on your repository appears to be no different than last years.

The existing code already does much of the work for you. A lot of information about the state of the "rack" can be backed out of the dimensions of the blob (x1, y1, x2, y2), the blob's center of mass (mx, my), Number of color-matching pixels (pixels) and the ratio of color-matching pixels to total number of pixels (confidence) returned in the camera's t-packet. Have a look at terminal.c for a way to access the t-packet information when it arrives.

Quote:

Originally Posted by Mike Copioli (Post 553353)
Does the new code independantly track multiple centroids?

The camera cannot track multiple objects that are in view. FIRST's code does not track multiple lights.

Quote:

Originally Posted by Mike Copioli (Post 553353)
Or does it average the independant targets to produce one centroid?

The camera returns a rectangle that includes both lights, one on the left, the other on the right, and the center of mass somewhere in between. This information alone will tell you if one or two lights are visible as a single light will only light-up about ten pixels from the starting area.

Quote:

Originally Posted by Mike Copioli (Post 553353)
From the above statement it appears that the only way to differentiate between multiple and isolated targets is by the number of pixels. If two targets are "seen" by the camera, how do you direct the camera to select one of the targets?

One way is to rotate the camera until only one light is visible.

I have a few algorithms that can be used to derive the information you seek, but I'm not sure how much of the problem I should solve for teams. I've asked for guidance from the GDC on how to proceed. Until then, I'd really like to see some open discussion about this problem because it's a fun problem with a few possible solutions.

-Kevin

Mike Copioli 10-01-2007 18:29

Re: 2007 Default Code?
 
Thanks Kevin. We can figure out the rest. I just wanted to make sure I was not missing something obvious. Now I have to get MPLAB to compilke the camera code. I keep getting this linker error:

MPLINK 4.02, Linker
Copyright (c) 2006 Microchip Technology Inc.
Error - could not find file 'clib.lib'.

When I open the lib, this file is present in the directory???????

Now I use MPLAB almost every day. But I'm not quite sure how to fix this issue. I have tried several lib/linker combinations. Does this have anything to do with the fact that I am using a newer version of MPLAB 7.5?

Mike Copioli 10-01-2007 19:01

Re: 2007 Default Code?
 
MPLINK 4.02, Linker
Copyright (c) 2006 Microchip Technology Inc.
Error - Coff file format for 'C:\First2007\Code\frc_camera_s_2\camera.o' is out of date.
Errors : 1

Now I get his error????

chris31 10-01-2007 19:49

Re: 2007 Default Code?
 
Quote:

Originally Posted by Mike Copioli (Post 553403)
MPLINK 4.02, Linker
Copyright (c) 2006 Microchip Technology Inc.
Error - Coff file format for 'C:\First2007\Code\frc_camera_s_2\camera.o' is out of date.
Errors : 1

Now I get his error????

Our you sure you have the correct version of the compiler? I think that might be your issue.

Mike Copioli 10-01-2007 20:00

Re: 2007 Default Code?
 
I figured it out. I have both the student version and the full version of the compiler. I set the exe to the proper directory but not th lib and linker. Once I set all to the correct directory, the code compiled.

Thanks

nheft 10-01-2007 20:38

Re: 2007 Default Code?
 
It's at http://ifirobotics.com/rc.shtml#Programming. Look towards the bottom of the page.

Japper 11-01-2007 11:40

Re: 2007 Default Code?
 
Thanks for the link!!!

==================================
A few of questions related to the default code….


I just downloaded the IFI site default code.
Is it ok to use this basic code and modify it as we need to?

Also is this code (or any code for that matter) already loaded
into the user and robot controllers?

What all does the default code do?

Does it include any routines for spinning the drive wheel motors when the joystick control is changed?

mgurgol 11-01-2007 13:45

Re: 2007 Default Code?
 
Can anyone tell me what I am supposed to do with the Frc_Master_V13.bin file? I downloaded the 2007 code and I see it there, but it's not in the MPLAB project. I looked at the code that the team was running last year, and it is not even in the project directory.

Any help in this matter would be greatly appreciated.

Mark McLeod 11-01-2007 14:06

Re: 2007 Default Code?
 
1 Attachment(s)
You download the new Master file to the Robot Controller just like you do your program .hex file.

-- Tether the OI and RC and power them up, put the RC into program mode.
-- Click Browse in IFI_Loader, then in the file selection window change the file type to ".bin" and you should see the new Master.bin file in the directory to select and download.
-- You must follow up by downloading your .hex file or the default .hex file.

Here are some detailed instructions from IFI.

Alan Anderson 11-01-2007 14:06

Re: 2007 Default Code?
 
Frc_Master_V13.bin is the code for the Robot Controller's master processor. It gets downloaded it to the RC using the same IFILoader program that puts code in the user processor. The RC should already contain it, but in certain cases you might have a need to reload it.

Any teams planning to use a Robot Controller from a previous year for practice or prototyping will want to put the V13 master code in the system (in order to talk to the new radio modems, I believe).

mgurgol 11-01-2007 14:27

Re: 2007 Default Code?
 
"Excellent" - Montgomery Burns.

Thank you very much for the information, it was very helpful.


All times are GMT -5. The time now is 23:08.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi