Go to Post FIRST is different... we commute, journey, and make pilgramage to attend our events. Something that is expensive and exclusive. - Erin Rapacki [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #16   Spotlight this post!  
Unread 17-04-2016, 18:59
tomy tomy is offline
Registered User
FRC #3038 (I.C.E. Robotics)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Stacy, Minnesota
Posts: 494
tomy has a spectacular aura abouttomy has a spectacular aura about
Re: PID Loop Controller with a Servo

Quote:
Originally Posted by Ether View Post
Is the camera indeed mounted to the servo? Or is the camera mounted to a turret which is to be actuated by the servo?



For testing purposes the camera would be mounted on a turret which is actuated by a servo for both rotating the camera and angling the camera.

The purpose is to test vision tracking without having a robot that tracks the target but a camera that tracks the target. I don't have a robot on hand just a test board with the camera turret mount.
Reply With Quote
  #17   Spotlight this post!  
Unread 17-04-2016, 19:40
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,077
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: PID Loop Controller with a Servo

Quote:
Originally Posted by tomy View Post
For testing purposes the camera would be mounted on a turret which is actuated by a servo
Is the servo you've selected powerful enough to rotate the turret at the desired speed?


Reply With Quote
  #18   Spotlight this post!  
Unread 17-04-2016, 20:46
euhlmann's Avatar
euhlmann euhlmann is offline
CTO, Programmer
AKA: Erik Uhlmann
FRC #2877 (LigerBots)
Team Role: Leadership
 
Join Date: Dec 2015
Rookie Year: 2015
Location: United States
Posts: 349
euhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud of
Re: PID Loop Controller with a Servo

A typical (non-continuous) servo already implements closed-loop control onboard, so a PID loop is unnecessary. Just set it to the angle you want and it will handle going there. Servos are quite effective at moving to positions quickly and without overshoot.

Quote:
Originally Posted by tomy View Post
Sounds good but how do you control that in Java based programming
You can set a servo in wpilib using Servo.setAngle(degrees)
Reply With Quote
  #19   Spotlight this post!  
Unread 17-04-2016, 23:05
tomy tomy is offline
Registered User
FRC #3038 (I.C.E. Robotics)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Stacy, Minnesota
Posts: 494
tomy has a spectacular aura abouttomy has a spectacular aura about
Re: PID Loop Controller with a Servo

Quote:
Originally Posted by euhlmann View Post
A typical (non-continuous) servo already implements closed-loop control onboard, so a PID loop is unnecessary. Just set it to the angle you want and it will handle going there. Servos are quite effective at moving to positions quickly and without overshoot.



You can set a servo in wpilib using Servo.setAngle(degrees)
I know I can do that. I am talking about live tracking a target. If the camera is mounted on a turret and the servo can turn it fast enough there needs to be a ratio between the distance to the center of the target and angle to turn. My question is if this is a good method?
Reply With Quote
  #20   Spotlight this post!  
Unread 18-04-2016, 00:31
billbo911's Avatar
billbo911 billbo911 is offline
I prefer you give a perfect effort.
AKA: That's "Mr. Bill"
FRC #2073 (EagleForce)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Elk Grove, Ca.
Posts: 2,356
billbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond repute
Re: PID Loop Controller with a Servo

Quote:
Originally Posted by tomy View Post
I know I can do that. I am talking about live tracking a target. If the camera is mounted on a turret and the servo can turn it fast enough there needs to be a ratio between the distance to the center of the target and angle to turn. My question is if this is a good method?
If I'm following your question, there is a really nice thread discussing it here.

In very simple terms, divide your camera's field of view in degrees by your horizontal resolution. That will give you degrees per pixel.
Now just multiply the numbers of pixels you are out of alignment by the degrees per pixel and you have your degrees to turn.
__________________
CalGames 2009 Autonomous Champion Award winner
Sacramento 2010 Creativity in Design winner, Sacramento 2010 Quarter finalist
2011 Sacramento Finalist, 2011 Madtown Engineering Inspiration Award.
2012 Sacramento Semi-Finals, 2012 Sacramento Innovation in Control Award, 2012 SVR Judges Award.
2012 CalGames Autonomous Challenge Award winner ($$$).
2014 2X Rockwell Automation: Innovation in Control Award (CVR and SAC). Curie Division Gracious Professionalism Award.
2014 Capital City Classic Winner AND Runner Up. Madtown Throwdown: Runner up.
2015 Innovation in Control Award, Sacramento.
2016 Chezy Champs Finalist, 2016 MTTD Finalist
Reply With Quote
Reply


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:22.

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