Go to Post Facebook for FIRST already exists. It's called Facebook :) - dcarr [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 10-02-2007, 13:58
mjveld1018 mjveld1018 is offline
Registered User
AKA: Matt
FRC #0292 (PantherTech)
Team Role: Mentor
 
Join Date: Dec 2006
Rookie Year: 2006
Location: Indiana
Posts: 10
mjveld1018 is an unknown quantity at this point
Problem with easy C CameraTracking function

I calibrated the camera using Labview and then import the parameters into the easyC Camera Tracking Code supplied by First. However, the camera doesn't do anything once I build and upload the program. Using Print to Screen, I find out that CaptureTracking function returns all value as zero--including confidence, which explains why the servos don't move. The red light on the camera is also on, but everything was connected properly.

In short, I can't figure out why the CaptureTracking is returning everything as 0.

Last edited by mjveld1018 : 10-02-2007 at 14:09.
  #2   Spotlight this post!  
Unread 10-02-2007, 17:54
TubaMorg TubaMorg is offline
Programmermechanicalelect ricalcoach
AKA: Dan
FRC #1480 (Robatos Locos)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Houston
Posts: 450
TubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond repute
Re: Problem with easy C CameraTracking function

Check to see if your TTL chip is connected properly AND plugged into the RC.
  #3   Spotlight this post!  
Unread 11-02-2007, 13:59
mjveld1018 mjveld1018 is offline
Registered User
AKA: Matt
FRC #0292 (PantherTech)
Team Role: Mentor
 
Join Date: Dec 2006
Rookie Year: 2006
Location: Indiana
Posts: 10
mjveld1018 is an unknown quantity at this point
Re: Problem with easy C CameraTracking function

We ran the IFI Dynamic Debugging tool. The TTL chip passed that, and it is plugged into the RC correctly. Any other ideas?
  #4   Spotlight this post!  
Unread 11-02-2007, 21:39
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: Problem with easy C CameraTracking function

How are you powering the camera? We've seen symptoms that sound like what you describe when the backup battery gets low.
  #5   Spotlight this post!  
Unread 11-02-2007, 22:18
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 592
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: Problem with easy C CameraTracking function

Quote:
Originally Posted by mjveld1018 View Post
In short, I can't figure out why the CaptureTracking is returning everything as 0.
It's possible that the camea is not being initialized properly. You can test this by turning on debugging output for the camera. To do this, call the function:
Code:
SetCameraDebugMode(1);
just before the camera initialize block.

What you should see in the terminal window is a bunch of somewhat cryptic lines where easyC tries to send commands to the camera. For each command it sends you'll see a "->" at the front of the line indicating that it's going to the camera. You should see responses from the camera (mostly ACKs - acknowledge) with a "<-" in the front of the line. If you don't see that sequence then it means that the camera never received the initialization commands correctly.

I would also try to use the default camera parameters built into easyC just as a baseline. Those should work out of the box. After you see it working, then go back to LabView to tweak the setup.
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
  #6   Spotlight this post!  
Unread 12-02-2007, 20:15
mjveld1018 mjveld1018 is offline
Registered User
AKA: Matt
FRC #0292 (PantherTech)
Team Role: Mentor
 
Join Date: Dec 2006
Rookie Year: 2006
Location: Indiana
Posts: 10
mjveld1018 is an unknown quantity at this point
Re: Problem with easy C CameraTracking function

Yes, the camera is initilized (the terminal shows "->" and "<-"). We are still getting 0 for all values though. We're powering it off of the RC with a fully charged backup battery.
  #7   Spotlight this post!  
Unread 12-02-2007, 20:33
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 592
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: Problem with easy C CameraTracking function

Quote:
Originally Posted by mjveld1018 View Post
Yes, the camera is initilized (the terminal shows "->" and "<-"). We are still getting 0 for all values though. We're powering it off of the RC with a fully charged backup battery.
Were there ACKs going by with a number of different commands being sent to the robot? Sometimes if the robot controller can't connect to the camera, you see a bunch of "->" and "<-" without and commands being sent. This is because the robot controller is waiting for the camera to reply and timing out.

If it is working it will finish the entire initialization sequence in less than a second.
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
  #8   Spotlight this post!  
Unread 12-02-2007, 22:12
ebmonon36's Avatar
ebmonon36 ebmonon36 is offline
Registered User
AKA: Eric Bredehoeft
FRC #1018 (Robodevils)
Team Role: Mentor
 
Join Date: Dec 2002
Rookie Year: 2003
Location: Indianapolis, IN
Posts: 428
ebmonon36 has much to be proud ofebmonon36 has much to be proud ofebmonon36 has much to be proud ofebmonon36 has much to be proud ofebmonon36 has much to be proud ofebmonon36 has much to be proud ofebmonon36 has much to be proud ofebmonon36 has much to be proud ofebmonon36 has much to be proud of
Send a message via AIM to ebmonon36
Re: Problem with easy C CameraTracking function

We got something that looked like this (I don't remember the directions of the ACKs):

Code:
<-
<-
->
<-
<-
<-
(then it started the printf statements we told it to make, returning zeroes for all functions)
Thanks for the advise so far!

Eric
  #9   Spotlight this post!  
Unread 12-02-2007, 22:32
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 592
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: Problem with easy C CameraTracking function

Quote:
Originally Posted by ebmonon36 View Post
We got something that looked like this (I don't remember the directions of the ACKs):

Code:
<-
<-
->
<-
<-
<-
(then it started the printf statements we told it to make, returning zeroes for all functions)
Eric

If you are only seeing the arrows, then it means that the robot is not getting any data from the robot controller. When it works you should see a series of commands along with the arrows.

So, I would try one of the easyC camera demo programs that work for sure just to make sure that you are not having a software problem. If that doesn't work, then you might have some issue with the camera itself or the connections to it.
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
  #10   Spotlight this post!  
Unread 16-02-2007, 19:36
mjveld1018 mjveld1018 is offline
Registered User
AKA: Matt
FRC #0292 (PantherTech)
Team Role: Mentor
 
Join Date: Dec 2006
Rookie Year: 2006
Location: Indiana
Posts: 10
mjveld1018 is an unknown quantity at this point
Re: Problem with easy C CameraTracking function

Quote:
->
<-TTTTTT
->
<-ACK
->RM 1
<-ACK
->DM 20
<-ACK
->CR 41 128
<-ACK
->CR 19 32
<-ACK
->CR 42 128
<-ACK
->CR 43 32
<-ACK
->CR 45 128
<-ACK
->CR 18 32
<-ACK
->CR 0 0
<-ACK
->CR 1 128
<-ACK
->CR 2 128
<-ACK
->CR 3 128
<-ACK
->CR 6 1
<-ACK
->CR 16 1
<-ACK
->ST 85 115 15 17 100 145
<-ACK
->NF1
<-ACK
->SM 12
<-ACK
->SP 16 8 5 30 15 5
<-ACK
->TC
<-ACK
Confidence 0
The Confidence value was from our Print to Screen 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
Problem with easy c pro and mechanum wheels pbrules15 Programming 9 03-02-2007 20:38
sin() function problem nirhaim1942 Programming 2 22-01-2007 11:43
Easy C programming Problem fredliu168 FIRST Tech Challenge 6 19-11-2006 22:44
Easy C, loader problem gabrielse Programming 13 02-02-2006 07:44
FRC easy-c vex encoder function? Gdeaver Programming 2 23-01-2006 08:03


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

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