Go to Post Speaking about healthier, the Texas air was sooooooooo much cleaner than NJ air, I felt my life expectancy being extended another 5 years. - The Chinese Guy [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
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
  #4   Spotlight this post!  
Unread 07-01-2013, 15:25
DjScribbles DjScribbles is offline
Programming Mentor
AKA: Joe S
FRC #2474 (Team Excel)
Team Role: Mentor
 
Join Date: Oct 2011
Rookie Year: 2012
Location: Niles MI
Posts: 284
DjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to behold
Re: Aiming using reflective tape

As a disclaimer, our drive team was better at dead-reckoning our catapult last year than our code was at aiming during autonomous. If you don't have to move (don't intend to pick up frisbees) during autonomous, you could simply determine what image parameters would indicate a hit, and output text to the dashboard ("On Target", "Too far left/right/back/forward").
(They were also better at aiming during the match with a tape-cross-hair on the screen, so we removed the whole function.)

Given the above, you weren't very clear how far into the image processing you've gotten. Here is my code from last year, it's not broken into modules very well so I'll give you some line numbers:
https://github.com/TeamExcel/Project.../Robot2012.cpp
1313: A function to init the camera
795: A function that takes a camera image and does image processing, and sets up variables for the pid.
753: Has teleop glue logic.
451: Has logic in disabled to report on/off targeting

My strategy last year was to capture an image every second, and use each image to feed parameters to the PID loops. The actual PID loop was driven by a gyroscope (for rotation) and accelerometer (a not so great way of tracking distance). I never got far enough to check whether or not taking a picture in motion (every image after the first) was an accurate way to feed the PIDs, I'm guessing that time delay which likely exists was causing a long settling time (since each updated target after the first would not capture the motion that had taken place between taking the image and setting the new target).

I thought it would work well, and hope to be able to develop it further this year. It certainly reduced the processing power needed for image processing, and it did work sorta (I hadn't done PIDs before, so that was the primary issue, ran out of time on build season for tuning/guessing).
Reply With Quote
 


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


All times are GMT -5. The time now is 03:30.

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