![]() |
Camera Code Update
I've made a few changes to the camera code and would like to get some feedback before releasing it. If you can think of something you'd like changed or added, please leave a message here. These are the changes do far:
2/11/07 changes made for version 2.2: Important: after loading the new software, make sure you "Load default values" and then "Save changes" from the tracking menu. terminal.c/.h: -Fixed benign bug where old_camera_t_packets was not getting updated in Tracking_Info_Terminal(). -Altered code to use Tracking_Config_Data values for center tilt and pan values instead of hardwired values in Tracking_Info_Terminal(). -Altered code to use Get_Camera_T_Packets() function instead of directly accessing camera_t_packets variable. camera.c/.h: -Added Poll_Mode() function. -Added Get_Camera_ACKs() function. -Added Get_Camera_NCKs() function. -Added Get_Camera_T_Packets() function. tracking.c/.h: -Altered code to use Get_Camera_T_Packets() function instead of directly accessing camera_t_packets variable. -Changed default CONFIDENCE_THRESHOLD_DEFAULT values to 10 (was 20). -Greatly simplified search code (same functionality with less code). -Changed search parameters so that a fixed tilt angle of about 30 degrees is used. -For finer control, moved camera pan servo to PWM output 15. -For finer control, Moved camera tilt servo to PWM output 16. user_routines_fast.c: -Replaced call to Generate_Pwms() in User_Autonomous_Code() with a call to PWM(). serial_ports_readme.txt: -Corrected installation instruction #4. camera_readme.txt: -Added Virtual_Window() function description. -Added Poll_Mode() function description. -Added Get_Camera_ACKs() function description. -Added Get_Camera_NCKs() function description. -Added Get_Camera_T_Packets() function description. pwm.h: -Using new PWM() software, optimized camera tilt for a range of 0 to 90 degrees. -Kevin |
Re: Camera Code Update
After I just finished porting your tracking software to work with WPILib...!!!!:mad:
;) Can't wait to test the new stuff out. I'm particularly excited about the increased servo resolution. |
Re: Camera Code Update
Quote:
Code:
///////////////////http://www.chiefdelphi.com/forums/sh...ad.php?t=51802 -Kevin |
Re: Camera Code Update
Thanks for this new version!!!
Our team is having some problems with the CMUCam2.1 version, the tilt and pan is not moving and stuff like this!We`ll try to test this one. Probably we`ll need to change the PWM`s to other outputs. Am I correct??(we`re newbies, and we need a lot of help!!!) We hope it works!!!;) Bye! |
Re: Camera Code Update
Quote:
So, you could modify the code to use the PWMs you were before, but I would recommend moving to PWM 15 and 16 as Kevin has done. |
Re: Camera Code Update
Sounds excellent. I think you should release it as soon as possible; time is running short :)
|
Re: Camera Code Update
What you mean when you say better triangulation??
And where do I add this new search code that Kevin has created?? Probably I will do a lot of questions don`t be mad please:rolleyes: Thanks for your help! |
Re: Camera Code Update
Quote:
|
Re: Camera Code Update
Request: Please release the streamlined version of this too.
|
Re: Camera Code Update
Quote:
-Kevin |
Re: Camera Code Update
Kevin, PWM outputs 15 and 16 are used for the (left?) motors. If you take those PWM outputs, we won't be able to use the camera to move the robot to the light. But of course, that's not a real issue, since I can change the Servo PWM outputs. But mabye others don't know how do to it and could freak out a bit because some of thier engines are not working.
I don't mind you have changed it, but just thinking about the weaker ones. :) Our team will check the code tommorow, tweak it as needed. Thanks for the update.;) |
Re: Camera Code Update
Quote:
-Kevin |
Re: Camera Code Update
Quote:
-Kevin |
Re: Camera Code Update
Considering you've got a get, you may very well be including it already, but we would definitely appreciate Reset_Camera_ACKs() and Reset_Camera_NCKs() functions. Not a real big deal, but it would save us a variable.
|
Re: Camera Code Update
I've noticed that when the camera is in a search, if the camera is resetting its pan for a new sweep:
"if(temp_pan_servo >= PAN_MAX_PWM_DEFAULT) { temp_pan_servo = PAN_MIN_PWM_DEFAULT;" and if the camera sees the light during this motion of resetting the pan to its minimum, when it arrives at this new pan position, the camera tilts down. It continues to search at this lower tilt, reaches the maximum pan, tilts back up, sweeps to its minimum pan, sees the light during this trip, and tilts down again. It continues this loop and never tracks the light. We don't usually have this problem, but at certain distances from the light it becomes impossible to track. What can we do to fix this? |
| All times are GMT -5. The time now is 04:50. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi