Go to Post DONT USE ROBOTS FOR EVIL!!! - Cooley744 [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
  #5   Spotlight this post!  
Unread 10-02-2013, 18:31
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: PID Simple Question

If the camera moves with the turret, and the turret rotation is controlled by a single motor, the situation is pretty straightforward. The x value from the vision control tells you the horizontal distance and direction to where you want the turret to point. Use it as the feedback or "process variable" input to the PID. The setpoint would just be 0, as that represents the center of the video image. Given appropriate PID gains, the output will drive the motor until the target is centered.

Watch out for the amount of time it takes the vision processing to do its job, though. If your turret moves too quickly, it will overshoot the target before you find out that it was correctly pointed a half second ago. If you have some sort of physical feedback on the turret position itself, it can be a lot more effective to use the vision x value to decide how far to move the turret then compute a specific setpoint as a delta from its current location, and use PID to drive the turret so the feedback gets to that setpoint.
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 13:57.

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