Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   CMU Cam not Tracking Properly on Robot (http://www.chiefdelphi.com/forums/showthread.php?t=41829)

coastertux 14-01-2006 10:54

CMU Cam not Tracking Properly on Robot
 
When the camera is on the bench, it tracks perfectly in LabView (after putting a jumper on the pins to flip the Pan). When we hook it into the robot via TTL and PWM 1 (Pan Servo) and 2 (Tilt Servo) it does not track properly. Once it locks on to the target, the camera pans/tilts the target out of the field of view of the camera (the Pan and Tilt Errors increase when they should be decreasing). :ahh:

Anyone else have this same problem?

coastertux 14-01-2006 11:10

Re: CMU Cam not Tracking Properly on Robot
 
We found the problem! In tracking.h we redefined PAN_ROTATION_SIGN_DEFAULT and TILT_ROTATION_SIGN_DEFAULT to the opposite values. Now it is tracking perfectly!

billbo911 14-01-2006 12:10

Re: CMU Cam not Tracking Properly on Robot
 
Quote:

Originally Posted by coastertux
We found the problem! In tracking.h we redefined PAN_ROTATION_SIGN_DEFAULT and TILT_ROTATION_SIGN_DEFAULT to the opposite values. Now it is tracking perfectly!

Yep, that'll do it.
OBTW, that situation is covered in the Tracking.h file included in the code from Kevin Watson. It is well worth the time to walk through ALL of his code. He documents it very well.

Terry Sherman 14-01-2006 12:27

Re: CMU Cam not Tracking Properly on Robot
 
Another thing to note is if you are using the 'Bells & Whistles' version of Kevin's code that this parameter is also stored in EEPROM. What this means is if you change the #defines in the code, recompile, and download you will not actually see a change in the behavior. This is because the code is loading the last used values (previous defaults) from EEPROM. You have to use Kevin's menu system to modify the value or alternatively (since you changed the default values) reset the configuration to default.

-Terry

Kevin Watson 14-01-2006 13:19

Re: CMU Cam not Tracking Properly on Robot
 
Quote:

Originally Posted by Terry Sherman
Another thing to note is if you are using the 'Bells & Whistles' version of Kevin's code that this parameter is also stored in EEPROM. What this means is if you change the #defines in the code, recompile, and download you will not actually see a change in the behavior. This is because the code is loading the last used values (previous defaults) from EEPROM. You have to use Kevin's menu system to modify the value or alternatively (since you changed the default values) reset the configuration to default.

Yep. If the software finds a valid camera and/or tracking configuration in EEPROM it will use that information for configuration. To save values from the header file into EEPROM select load default values from the menu and then hit the save changes key. You can see where the software gets the configuration data by enabling debug messages in camera.h.

-Kevin

aaronm_k 28-01-2006 23:21

Re: CMU Cam not Tracking Properly on Robot
 
Quote:

Originally Posted by coastertux
We found the problem! In tracking.h we redefined PAN_ROTATION_SIGN_DEFAULT and TILT_ROTATION_SIGN_DEFAULT to the opposite values. Now it is tracking perfectly!

Yes, if you have any tracking problems, be sure to check these settings first! Kevin's default values are wrong when used with the assembly instructions in the CMUcam workbook, and I spent 3 days changing every other setting before I finally found this post!

Kevin Watson 29-01-2006 00:02

Re: CMU Cam not Tracking Properly on Robot
 
Quote:

Originally Posted by aaronm_k
Yes, if you have any tracking problems, be sure to check these settings first! Kevin's default values are wrong when used with the assembly instructions in the CMUcam workbook, and I spent 3 days changing every other setting before I finally found this post!

Sorry about the documentation problems. As I suspect you'll get better tracking performance, you might consider rotating your camera 180 degrees because the best way to mount the camera is with the tilt axis extending through the camera module.

-Kevin


All times are GMT -5. The time now is 04:33.

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