Go to Post Build a student a robot and it will keep him/her busy for a few days in the spring. Teach a student how to build(design, wire, program) a robot and they will stay away from home, use some really strange language and wear funny clothes the whole year long. - Al Skierkiewicz [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

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 08-02-2006, 17:02
railerobotics's Avatar
railerobotics railerobotics is offline
Registered User
FRC #0935
 
Join Date: Jan 2006
Location: Newton, KS
Posts: 190
railerobotics will become famous soon enough
Camera locked on

I have searched forever in the code but I cannot find a variable that says if the camera is or isn't locked on to the target. In atonomous I have trying to make our cannon fire once that the camera is locked on the the target.
  #2   Spotlight this post!  
Unread 08-02-2006, 17:09
kaszeta's Avatar
kaszeta kaszeta is offline
Registered User
FRC #0095 (Grasshoppers)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Lebanon, NH
Posts: 334
kaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of light
Re: Camera locked on

Quote:
Originally Posted by railerobotics
I have searched forever in the code but I cannot find a variable that says if the camera is or isn't locked on to the target. In atonomous I have trying to make our cannon fire once that the camera is locked on the the target.
Look in terminal.c in Kevin's camera code. Basically, you can check the value of T_Packet_Data.my, T_Packet_Data.pixels, or T_Packet_Data.confidence.
  #3   Spotlight this post!  
Unread 08-02-2006, 17:15
railerobotics's Avatar
railerobotics railerobotics is offline
Registered User
FRC #0935
 
Join Date: Jan 2006
Location: Newton, KS
Posts: 190
railerobotics will become famous soon enough
Re: Camera locked on

Thanks
  #4   Spotlight this post!  
Unread 08-02-2006, 17:20
Greg Ross's Avatar
Greg Ross Greg Ross is offline
Grammar Curmudgeon
AKA: gwross
FRC #0330 (Beach 'Bots)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Hermosa Beach, CA
Posts: 2,245
Greg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond repute
Send a message via AIM to Greg Ross Send a message via Yahoo to Greg Ross
Re: Camera locked on

Quote:
Originally Posted by kaszeta
Look in terminal.c in Kevin's camera code. Basically, you can check the value of T_Packet_Data.my, T_Packet_Data.pixels, or T_Packet_Data.confidence.
Be careful about using T_Packet_Data.my. Kevin's code uses it extensively for distinguishing when the target is or is not in its view. Unfortunately, T_Packet_Data.my does not get cleared when the camera loses the target. I found that this would cause the camera to get stuck pointing off into space sometimes, so I changed all those references to use T_Packet_Data.confidence instead.
__________________
Greg Ross (The Grammar Curmudgeon formerly known as gwross)
S/W Engineer, Team 330, the Beach 'Bots
<--The Grammar Curmudgeon loves this cartoon.
“Life should not be a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming "Wow! What a Ride!" Hunter S. Thompson
"Playing a practical joke means doing something mean and calling it funny." Me
  #5   Spotlight this post!  
Unread 08-02-2006, 19:47
Keith Watson Keith Watson is offline
Registered User
FRC #0957 (WATSON)
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2006
Location: Wilsonville, OR
Posts: 112
Keith Watson is just really niceKeith Watson is just really niceKeith Watson is just really niceKeith Watson is just really nice
Re: Camera locked on

Quote:
Originally Posted by kaszeta
Look in terminal.c in Kevin's camera code. Basically, you can check the value of T_Packet_Data.my, T_Packet_Data.pixels, or T_Packet_Data.confidence.
The tracking code also uses PAN_ALLOWABLE_ERROR_DEFAULT and TILT_ALLOWABLE_ERROR_DEFAULT to determine whether the camera is locked or not. Search_Target() already has most (but not all) of the logic. It was simple to modify our code to report the tracking state (searching/tracking/locked) and the target centroid location.
__________________
Keith Watson - Professional Software Engineer
No relation to "Kevin" Watson, who created the camera tracking code.
  #6   Spotlight this post!  
Unread 08-02-2006, 19:50
Keith Watson Keith Watson is offline
Registered User
FRC #0957 (WATSON)
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2006
Location: Wilsonville, OR
Posts: 112
Keith Watson is just really niceKeith Watson is just really niceKeith Watson is just really niceKeith Watson is just really nice
Re: Camera locked on

Quote:
Originally Posted by GW (Greg) Ross
Be careful about using T_Packet_Data.my. Kevin's code uses it extensively for distinguishing when the target is or is not in its view. Unfortunately, T_Packet_Data.my does not get cleared when the camera loses the target. I found that this would cause the camera to get stuck pointing off into space sometimes, so I changed all those references to use T_Packet_Data.confidence instead.
Thanks for pointing this out!
__________________
Keith Watson - Professional Software Engineer
No relation to "Kevin" Watson, who created the camera tracking code.
Closed Thread


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
pic: camera locked on light 143ft away!!! kborer22 Extra Discussion 18 08-07-2006 14:49
CMU Camera kills robot controller if not found. Chris_Elston Programming 21 27-03-2006 14:30
How To Use the Google Camera generalbrando Kit & Additional Hardware 2 07-02-2006 16:00
Camera pointing error? Craig Putnam Programming 14 21-01-2006 02:52
Scripting Setup and the Camera + Serial Port Drivers CJO Programming 22 11-01-2006 17:42


All times are GMT -5. The time now is 21: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