|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Re: Camera Code
Where is FRC_PARTICLE_TO_IMAGE_PERCENT coming from? I can copy and paste most of your code, figure out the undeclared variables, but not sure how to resolve that one.
Thanks! |
|
#2
|
||||
|
||||
|
Re: Camera Code
Quote:
private static final double FRC_PARTICLE_TO_IMAGE_PERCENT = .0001; Last edited by mwtidd : 25-01-2011 at 21:40. |
|
#3
|
|||
|
|||
|
Re: Camera Code
Quote:
I was kind of hoping to not have to tackle most of the camera code myself, and the CircleTrackerDemo is extremely hard to figure out. Took me three days to work out the Dashboard example ![]() |
|
#4
|
||||
|
||||
|
Re: Camera Code
Quote:
I edited my comment after realizing this, my claim was incorrect. this function is open source. i guess you grabbed it before i removed it... also secrecy is not uncommon among first teams. so teams are not expected to open source. As a mentor programming I feel ethically compelled to do so. If Jimmy is a student he is welcome to keep his code secret . My work is COTS, his isn'tPS. if you want to take a look at my code, it is all open source and comes with video tutorials . (missing good comments though, dont be too harsh dell)just shoot me an email mwtidd@gmail.com Last edited by mwtidd : 25-01-2011 at 21:58. |
|
#5
|
|||
|
|||
|
Re: Camera Code
I kind of think the spirit of FIRST ethically compels me to share my code, if it will help someone else. That being said, I'm a teacher, so if it can help someone learn I'll share it with them.
I use multiple classes to break the code down into reusable pieces, and spin off threads to allow things like the driver station to take care of themselves. I use a separate class to define autonomous routines (go straight, turn left, turn right, back up, etc.), and then call those methods in autonomous() in a script like fashion, i.e. Code:
public void autonomous() {
autodrive.goStraight(8); // go straight ahead for 8 seconds
autodrive.turnRight(90); // turn right 90 degrees
autodrive.backUp(3); // back up for 3 seconds
}
The whole thing is modular that way. I use SimpleRobot instead of Iterative: it allows finer control of a multi-threaded model, without the interference of the automatic looping in Iterative. Iterative would eliminate threads, but would also be more monolithic, and therefore less reusable. Off topic I'm sketching out my camera class, so I'm looking for better (meaning easier to follow) code than the stock examples. Jimmy's looks good, and I can actually read it (well, mostly ) |
|
#6
|
||||
|
||||
|
Re: Camera Code
Quote:
Also thank you for joining the initiative. Autonomous has been lacking in FIRST teams, so I agree it is the responsibility of successful teams to lead the endeavorer and stay open source |
|
#7
|
|||
|
|||
|
Re: Camera Code
647 has essentially had NO autonomous capability in the past, so for now series will work. A decision tree is a great idea though, I'll definitely take a look and see what I can implement in the future.
|
|
#8
|
|||
|
|||
|
Re: Camera Code
I found in the past that the camera processing is unneccessary. A lot of times it is just easier to use delays, especially since the example camera code is so hard to follow, but that is because they added things that were unnecessary. I think if we can get very simple camera code that anyone can follow and modify, more teams will use the camera in auton.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|