Go to Post Take care of what's there and you never need a replacement. - Rich Kressly [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 21-01-2009, 10:23
whswrestler189 whswrestler189 is offline
Registered User
FRC #1742
 
Join Date: Dec 2008
Location: Oklahoma City
Posts: 4
whswrestler189 is an unknown quantity at this point
Trouble With Autonomous Camera Tracking

For the past few days our programming team has tried to have the robot follow a target. We took the two color servo example from NI.com and instead of using the Panning servo we use that value output to run our Drive motors. We succeeded in having the robot turn left and right but it did not stop when the VT was in the center of vision again. It continues to turn left until it breaches the threshold set to turn right. In other words it keeps turning until it goes too far then turns the opposite direction until it goes too far. We are trying to set a "zero point" were if the values given are between 70-100 both drive motors are stopped. Unfortunately no attempts have been successful. Any ideas or help would be greatly appreciated.

Programming of Team 1742 - Shockwave
Reply With Quote
  #2   Spotlight this post!  
Unread 21-01-2009, 10:28
Tom Line's Avatar
Tom Line Tom Line is offline
Raptors can't turn doorknobs.
FRC #1718 (The Fighting Pi)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1999
Location: Armada, Michigan
Posts: 2,513
Tom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond repute
Re: Trouble With Autonomous Camera Tracking

You need to use a PID loop. What you are seeing is the classic under-damped system that starts to oscillate when it tries to hold a setpoint.

In other words, you're turning TOO FAST toward the target, and the robot slides by it. Then it tries to turn back, and it turns TOO FAST. So it slides by it again.

You need to program a PID loop and use a low enough proportional gain so you don't blow right by. Then use a small integral gain that will just "get you there".

There is a PID white paper in chiefdelphi media that is excellent, and Labview provides a ready-made PID loop VI for you to use.
Reply With Quote
  #3   Spotlight this post!  
Unread 21-01-2009, 17:37
whswrestler189 whswrestler189 is offline
Registered User
FRC #1742
 
Join Date: Dec 2008
Location: Oklahoma City
Posts: 4
whswrestler189 is an unknown quantity at this point
Re: Trouble With Autonomous Camera Tracking

When we have it set on blocks so we control the position of the target it doesn't stop turning left or right. The motor that was running continues to run unless we move the target to the other side of the vision field. Team 330 has an example of their code as well as a video that demonstrates it functioning but when we open it and look at it it just looks like a mess of everything. they said that they changed it from the base "Two Color Example" but we are having trouble following it.
Reply With Quote
  #4   Spotlight this post!  
Unread 21-01-2009, 17:41
Pico2009 Pico2009 is offline
Registered User
FRC #1769
 
Join Date: Jan 2009
Location: Kansas City, Kansas
Posts: 3
Pico2009 is an unknown quantity at this point
Re: Trouble With Autonomous Camera Tracking

i don't even know how to connect the motors to the robot
if anyone can tell me please let me know
Reply With Quote
  #5   Spotlight this post!  
Unread 21-01-2009, 18:01
whswrestler189 whswrestler189 is offline
Registered User
FRC #1742
 
Join Date: Dec 2008
Location: Oklahoma City
Posts: 4
whswrestler189 is an unknown quantity at this point
Re: Trouble With Autonomous Camera Tracking

You want to wire your motors to your speed controls (we are using victors) those are connected to your digital sidecar through a PWM cable. that runs through a serial cable into the module in Slot 4 on your cRio. Everything as far as electronics and wiring i believe is located in the manual.
Reply With Quote
  #6   Spotlight this post!  
Unread 21-01-2009, 19:20
Sean Raia's Avatar
Sean Raia Sean Raia is offline
Curious spectator & alumn
no team
 
Join Date: Oct 2008
Rookie Year: 2008
Location: PA
Posts: 431
Sean Raia has a reputation beyond reputeSean Raia has a reputation beyond reputeSean Raia has a reputation beyond reputeSean Raia has a reputation beyond reputeSean Raia has a reputation beyond reputeSean Raia has a reputation beyond reputeSean Raia has a reputation beyond reputeSean Raia has a reputation beyond reputeSean Raia has a reputation beyond reputeSean Raia has a reputation beyond reputeSean Raia has a reputation beyond repute
Re: Trouble With Autonomous Camera Tracking

Our software team successfully finished that code yesterday. The way we did it involved panning the pan servo slowly across until it found the pink and green target (the color finder was some homemade code we found off the internet that works perfect). Then when it saw the pink and green target we would use an algorithm to find the middle of the target and pan the camera to move to it.

don't know if this helped you at all but i am just reporting
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Trouble with Autonomous popnbrown Programming 15 27-02-2007 20:48
How should we call camera tracking functions during autonomous mode? SHerpich Programming 1 15-02-2006 18:33
Moving robot while tracking with camera questions... Steve Orr Programming 6 02-02-2006 22:24
Having trouble with your camera mount? Chriszuma Programming 7 01-02-2005 22:12
trouble with beacon tracking code [53] opticruzer Programming 9 27-01-2004 12:19


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

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