Go to Post Glad to see the CIMulators aren't vaporware after all. - thefro526 [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 13-02-2006, 20:32
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: What is T_Packet_Data.my ??

Quote:
Originally Posted by Mike
If there is no blob, it is zero.
That's what I thought too, but in debugging, it looked to me like mx and my DO NOT get cleared when the target is lost. As I noted in another thread, I changed the if(T_Packet_Data.my == 0) tests in tracking.c to if(T_Packet_Data.confidence <= 1) to make the tracking more reliable.
__________________
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
  #2   Spotlight this post!  
Unread 13-02-2006, 20:44
354.FIRST 354.FIRST is offline
Registered User
FRC #0354
 
Join Date: Jan 2006
Location: Brooklyn, NY
Posts: 26
354.FIRST is an unknown quantity at this point
Re: What is T_Packet_Data.my ??

thanks for all the help y'all.
Totally saving my butt.
Can you point me to that other thread you mention? I am not finding it.
-354

Quote:
Originally Posted by GW (Greg) Ross
That's what I thought too, but in debugging, it looked to me like mx and my DO NOT get cleared when the target is lost. As I noted in another thread, I changed the if(T_Packet_Data.my == 0) tests in tracking.c to if(T_Packet_Data.confidence <= 1) to make the tracking more reliable.
  #3   Spotlight this post!  
Unread 13-02-2006, 21:01
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: What is T_Packet_Data.my ??

Quote:
Originally Posted by 354.FIRST
thanks for all the help y'all.
Totally saving my butt.
Can you point me to that other thread you mention? I am not finding it.
-354
http://www.chiefdelphi.com/forums/sh...897#post448897
__________________
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
  #4   Spotlight this post!  
Unread 13-02-2006, 21:30
X-Istence X-Istence is offline
Melt the RC controller!
AKA: Bert JW Regeer
no team
Team Role: Alumni
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Montville
Posts: 151
X-Istence will become famous soon enoughX-Istence will become famous soon enough
Send a message via AIM to X-Istence Send a message via MSN to X-Istence
Re: What is T_Packet_Data.my ??

Quote:
Originally Posted by GW (Greg) Ross
That's what I thought too, but in debugging, it looked to me like mx and my DO NOT get cleared when the target is lost. As I noted in another thread, I changed the if(T_Packet_Data.my == 0) tests in tracking.c to if(T_Packet_Data.confidence <= 1) to make the tracking more reliable.

Ehm, where did you get that from? They get cleared when there is new data from the camera, and if the data from the camera contains a y that does not exist, it will be set to 0, as in it can not find it.

That is at least what I got from the code, and the fact that each time the slow loop is run data is retrieved from the camera.
__________________
My Blog!
  #5   Spotlight this post!  
Unread 13-02-2006, 21:44
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Cañada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Cañada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: What is T_Packet_Data.my ??

Quote:
Originally Posted by GW (Greg) Ross
That's what I thought too, but in debugging, it looked to me like mx and my DO NOT get cleared when the target is lost. As I noted in another thread, I changed the if(T_Packet_Data.my == 0) tests in tracking.c to if(T_Packet_Data.confidence <= 1) to make the tracking more reliable.
Seriously? I've never seen it do that, but I'll look into it. I'm working on an updated tracking.c and I'll incorporate the fix(s) when I understand the problem better. BTW, did Rob Steele know about this?

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #6   Spotlight this post!  
Unread 13-02-2006, 22:33
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Cañada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Cañada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: What is T_Packet_Data.my ??

Quote:
Originally Posted by GW (Greg) Ross
That's what I thought too, but in debugging, it looked to me like mx and my DO NOT get cleared when the target is lost. As I noted in another thread, I changed the if(T_Packet_Data.my == 0) tests in tracking.c to if(T_Packet_Data.confidence <= 1) to make the tracking more reliable.
Greg, are you saying that the CMUcam2 will occasionally send a t-packet with a non-zero value for .my when it does *not* have a tracking solution?

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org

Last edited by Kevin Watson : 13-02-2006 at 22:36.
  #7   Spotlight this post!  
Unread 13-02-2006, 23:25
Mike's Avatar
Mike Mike is offline
has common ground with Matt Krass
AKA: Mike Sorrenti
FRC #0237 (Sie-H2O-Bots (See-Hoe-Bots) [T.R.I.B.E.])
Team Role: Programmer
 
Join Date: Dec 2004
Rookie Year: 2004
Location: Watertown, CT
Posts: 1,003
Mike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond repute
Re: What is T_Packet_Data.my ??

Quote:
Originally Posted by Kevin Watson
Greg, are you saying that the CMUcam2 will occasionally send a t-packet with a non-zero value for .my when it does *not* have a tracking solution?

-Kevin
I don't think he is saying that it sends a t-packet with a non-zero value for .my/.mx but rather that the .my/.mx that is already stored does not change it's value when the image of a blob is lost.
__________________
http://www.mikesorrenti.com/
  #8   Spotlight this post!  
Unread 13-02-2006, 23:26
X-Istence X-Istence is offline
Melt the RC controller!
AKA: Bert JW Regeer
no team
Team Role: Alumni
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Montville
Posts: 151
X-Istence will become famous soon enoughX-Istence will become famous soon enough
Send a message via AIM to X-Istence Send a message via MSN to X-Istence
Re: What is T_Packet_Data.my ??

Quote:
Originally Posted by Mike
I don't think he is saying that it sends a t-packet with a non-zero value for .my/.mx but rather that the .my/.mx that is already stored does not change it's value when the image of a blob is lost.

It however does when it gets new information from the camera, so that would make no sense.
__________________
My Blog!
  #9   Spotlight this post!  
Unread 14-02-2006, 00:14
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Cañada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Cañada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: What is T_Packet_Data.my ??

Quote:
Originally Posted by Mike
I don't think he is saying that it sends a t-packet with a non-zero value for .my/.mx but rather that the .my/.mx that is already stored does not change it's value when the image of a blob is lost.
This isn't possible. The .mx value is only tested when the camera has sent a new t-packet. From what Greg and Keith are saying, it seems as though the camera does spit-out funky t-packets under weird lighting conditions.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #10   Spotlight this post!  
Unread 14-02-2006, 14:45
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: What is T_Packet_Data.my ??

Quote:
Originally Posted by Kevin Watson
Greg, are you saying that the CMUcam2 will occasionally send a t-packet with a non-zero value for .my when it does *not* have a tracking solution?
Correct. I believe I saw non-zero "my"s with very low confidence (possibly as low as 0.)


Quote:
Originally Posted by Kevin Watson
BTW, did Rob Steele know about this?
I'm not sure if Rob was around when I made the discovery.


What Keith reported corresponds very closely to my experience, although I didn't attempt controlled experiments. I just noticed that sometimes the camera locked on to a spot well away from the target, and noted that the confidence was zero (or so.)
__________________
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
  #11   Spotlight this post!  
Unread 14-02-2006, 14:58
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Cañada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Cañada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: What is T_Packet_Data.my ??

Quote:
Originally Posted by GW (Greg) Ross
Correct. I believe I saw non-zero "my"s with very low confidence (possibly as low as 0.)

What Keith reported corresponds very closely to my experience, although I didn't attempt controlled experiments. I just noticed that sometimes the camera locked on to a spot well away from the target, and noted that the confidence was zero (or so.)
Okay, I'll update the code to use the .confidence value as a discriminator instead of .my. Thanks for the information.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #12   Spotlight this post!  
Unread 13-02-2006, 23:30
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: What is T_Packet_Data.my ??

Quote:
Originally Posted by GW (Greg) Ross
That's what I thought too, but in debugging, it looked to me like mx and my DO NOT get cleared when the target is lost. As I noted in another thread, I changed the if(T_Packet_Data.my == 0) tests in tracking.c to if(T_Packet_Data.confidence <= 1) to make the tracking more reliable.
After reading what Greg found in the other thread, Saturday our programmer changed the terminal routine to dump out mx, my, and confidence and we ran tests. We saw non-zero mx, my values with confidence up to 6 or so with the target outside the camera's field of view. When the target is in the field of view the confidence was as low as 140 but was mostly well over 200.

The room the tests were run in had the camera on a 3' table, rows of white flourescent lights were 8'-9' up, and the target was at 3'. We determined the camera was picking up the white lights and putting those in the mx, my values. When we put the target on the floor and limited the tilt up angle the camera no longer picked up the white lights.

Our programmer changed the code to use confidence and it worked perfectly even with white lights in the field of view.
__________________
Keith Watson - Professional Software Engineer
No relation to "Kevin" Watson, who created the camera tracking code.
  #13   Spotlight this post!  
Unread 15-02-2006, 23:11
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Cañada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Cañada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: What is T_Packet_Data.my ??

Quote:
Originally Posted by Keith Watson
After reading what Greg found in the other thread, Saturday our programmer changed the terminal routine to dump out mx, my, and confidence and we ran tests. We saw non-zero mx, my values with confidence up to 6 or so with the target outside the camera's field of view. When the target is in the field of view the confidence was as low as 140 but was mostly well over 200.
I'm altering the tracking code to use the t-packet confidence value as a discriminator. Do you have a better idea of what the default value should be for the code?

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #14   Spotlight this post!  
Unread 16-02-2006, 00:42
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: What is T_Packet_Data.my ??

Quote:
Originally Posted by Kevin Watson
I'm altering the tracking code to use the t-packet confidence value as a discriminator. Do you have a better idea of what the default value should be for the code?

-Kevin
When we saw values down to 140 with the green light that was with the target light tilted more than 45 degrees away and objects possibly partially blocking the light. But I consider 140 valid. With white lights we saw a maximum of 6. I would consider up to 10 invalid. That leaves a pretty large unknown range. Our programmer chose a level of 100. I think it was Greg who mentioned using 80 or 90.
__________________
Keith Watson - Professional Software Engineer
No relation to "Kevin" Watson, who created the camera tracking code.
  #15   Spotlight this post!  
Unread 16-02-2006, 01:25
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Cañada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Cañada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: What is T_Packet_Data.my ??

Quote:
Originally Posted by Keith Watson
When we saw values down to 140 with the green light that was with the target light tilted more than 45 degrees away and objects possibly partially blocking the light. But I consider 140 valid. With white lights we saw a maximum of 6. I would consider up to 10 invalid. That leaves a pretty large unknown range. Our programmer chose a level of 100. I think it was Greg who mentioned using 80 or 90.
Keith,

Can you do me a favor? Can you grab this code and test it under the conditions that caused the camera to send the low confidence t-packets? These are the changes I've made so far:

1) All changes to servo position are now done through two functions, which will make it easier for teams to use the CMUcam2 servo outputs if they desire.

2) Fixed bug in search initialization code where temp_pan_servo was initialized to zero instead of Tracking_Config_Data.Pan_Min_PWM.

3) Altered tracking algorithm to use the t-packet confidence value to determine whether the code should track or search. This value can also the changed on-the-fly from the tracking menu.

4) Added Get_Tracking_State() function, which can be used to determine if the camera is on target. New code in Process_Data_From_Master_uP( ) uses this function to turn on the switch3 LED on the operator interface when the camera is on target.


-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
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


All times are GMT -5. The time now is 12:46.

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