Go to Post We have not always been a winning team but we have always tried to be a quality team. - WynS [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
  #16   Spotlight this post!  
Unread 17-01-2007, 08:41
Kingofl337's Avatar
Kingofl337 Kingofl337 is offline
You didn't see anything....
AKA: Adam
FRC #0501 (Power Knights)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 1998
Location: Manchester, NH
Posts: 861
Kingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond repute
Send a message via Yahoo to Kingofl337
Re: CMUCam, Easy C, and Labview

easyC doesn't use the camera servo ports it uses PWM ports 10 & 11 in the 2007 kickoff code which are defines so you can easily change the port number. We are getting ready to release an update for PRO that fixes a few issues and we will probably remove the servo block from the camera stuff.
I'm also working to add searching to my drive code and dual light targeting. But, Team 40 took apart my kitbot so I'm currently without a test bed.
Hopefully we will have a new chassis ready to test on today.

Quote:
Originally Posted by MattD View Post
Right, as far as I can tell the easyC code depends on having the servos controlled via the camera board and not the RC. However, the 2007 kickoff demo could be a good starting point, as it does have tracking code that controls the servos via the RC.

Since my team has opted to use easyC, we ended up porting Kevin's streamlined tracking code rather than basing from the aforementioned demo code, however. It still needs to be tweaked a bit, but it seems to work fine.
__________________
FIRST Team 501 PowerKnights - Mentor
FIRST Team 40 Checkmate - Mentor Alum
FIRST Team 146 Blue Lightning - Alumni
  #17   Spotlight this post!  
Unread 17-01-2007, 09:33
MattD's Avatar
MattD MattD is offline
Registered User
AKA: Matthew Douglas
FRC #0228 (GUS Robotics)
Team Role: Alumni
 
Join Date: Feb 2006
Rookie Year: 2005
Location: Indianapolis, IN
Posts: 185
MattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to behold
Send a message via AIM to MattD
Re: CMUCam, Easy C, and Labview

Quote:
Originally Posted by Kingofl337 View Post
easyC doesn't use the camera servo ports it uses PWM ports 10 & 11 in the 2007 kickoff code which are defines so you can easily change the port number. We are getting ready to release an update for PRO that fixes a few issues and we will probably remove the servo block from the camera stuff.
I'm also working to add searching to my drive code and dual light targeting. But, Team 40 took apart my kitbot so I'm currently without a test bed.
Hopefully we will have a new chassis ready to test on today.
Yes, I know that the 2007 kickoff code uses PWM outputs 10 and 11 on the RC to control the servos by default, but I'm talking about the functions built into easyC, like SetServoTracking(). Does that one control the servos via the RC also? If so, how do you set which PWM outputs to use? It seems to me like that was intended for use with the servos connected to the camera.
__________________
GUS Robotics Team 228

2010 WPI Engineering Inspiration Award
2010 WPI Regional Champions (Thanks 230 & 20!)
2010 CT VEX Champions
2010 CT VEX Innovate Award
2009 QCC VEX Champions
2009 CT Motorola Quality Award
2007 CT J&J Sportsmanship Award
2006 CT Best Website Award
  #18   Spotlight this post!  
Unread 17-01-2007, 10:25
Kingofl337's Avatar
Kingofl337 Kingofl337 is offline
You didn't see anything....
AKA: Adam
FRC #0501 (Power Knights)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 1998
Location: Manchester, NH
Posts: 861
Kingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond repute
Send a message via Yahoo to Kingofl337
Re: CMUCam, Easy C, and Labview

The SetServoTracking command is the same as SetPWM but for the camera servos. If you want to have the camera auto target like it would if the servos were plugged into the camera then do this.

Code:
void Initialize ( void )
{
     InitCamera ( 1 ) ;   //Initialize camera for target color
     SetServoTracking ( 1 , 1 ) ; // Sets camera servos to autotrack target
     StartCamera ( ) ; // You need to restart the camera if you change camera servo settings
}



void OperatorControl ( void )
{
      unsigned char ServoPan; 
      unsigned char ServoTilt; 

      SetServoTracking ( 1 , 1 ) ; // Sets camera servos to autotrack target
      StartCamera ( ) ; // You need to restart the camera if you change camera servo settings
       
      while ( 1 )
      {
            // Checks the where the camera wants the servos to be pointed.
            CaptureTrackingData ( 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , &ServoPan , &ServoTilt ) ;
            SetPWM ( 1 , ServoPan ) ; // Moves the servo for Pan
            SetPWM ( 2 , ServoTilt ) ; // Moves the servo for Tilt
      }
}
__________________
FIRST Team 501 PowerKnights - Mentor
FIRST Team 40 Checkmate - Mentor Alum
FIRST Team 146 Blue Lightning - Alumni
  #19   Spotlight this post!  
Unread 24-01-2007, 14:55
sniggel sniggel is offline
Registered User
FRC #2051
 
Join Date: Jan 2007
Location: A.W. Beattie
Posts: 28
sniggel is an unknown quantity at this point
Re: CMUCam, Easy C, and Labview

our easy c demo 2007 code does not work. are there steps we are missing? Kevin's code works fine. I saw a post about setting the robot to autonomous, but we are using a testbed, not a robot. We do have the servos connedted to pwm 10, 11 so this is not it. Any thing else we need to do?
  #20   Spotlight this post!  
Unread 24-01-2007, 15:56
Kingofl337's Avatar
Kingofl337 Kingofl337 is offline
You didn't see anything....
AKA: Adam
FRC #0501 (Power Knights)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 1998
Location: Manchester, NH
Posts: 861
Kingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond repute
Send a message via Yahoo to Kingofl337
Re: CMUCam, Easy C, and Labview

Do you have the OI in Autonomous mode?
__________________
FIRST Team 501 PowerKnights - Mentor
FIRST Team 40 Checkmate - Mentor Alum
FIRST Team 146 Blue Lightning - Alumni
  #21   Spotlight this post!  
Unread 24-01-2007, 16:10
sniggel sniggel is offline
Registered User
FRC #2051
 
Join Date: Jan 2007
Location: A.W. Beattie
Posts: 28
sniggel is an unknown quantity at this point
Re: CMUCam, Easy C, and Labview

If i read correctly we set the team number to zeros and that would set the oi to autonomous, is there something else we missed. The team number was the only jumpers we changed
  #22   Spotlight this post!  
Unread 24-01-2007, 16:14
Kingofl337's Avatar
Kingofl337 Kingofl337 is offline
You didn't see anything....
AKA: Adam
FRC #0501 (Power Knights)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 1998
Location: Manchester, NH
Posts: 861
Kingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond repute
Send a message via Yahoo to Kingofl337
Re: CMUCam, Easy C, and Labview

Yes, your team should have a dongle. It plugs into the competiton port and selects between autonomous and operator control. It also allows you to disable the robot.

Here is the unit AndyMark Makes: http://www.andymark.biz/am-0016.html

Setting the team number to zero may work as well, but I've never tested that.
__________________
FIRST Team 501 PowerKnights - Mentor
FIRST Team 40 Checkmate - Mentor Alum
FIRST Team 146 Blue Lightning - Alumni
  #23   Spotlight this post!  
Unread 24-01-2007, 22:50
sniggel sniggel is offline
Registered User
FRC #2051
 
Join Date: Jan 2007
Location: A.W. Beattie
Posts: 28
sniggel is an unknown quantity at this point
Re: CMUCam, Easy C, and Labview

is the dongle the only way to get the code working? It looks like it could take some time to get that in, and I saw the alternative is to make one, which I will have our electronics team look at. I thoght I saw somewhere a mention about manually changing jumpers on the Interface unit to get the autonomous to work. Can it be done without the dongle?
thank-you
  #24   Spotlight this post!  
Unread 25-01-2007, 10:11
Kingofl337's Avatar
Kingofl337 Kingofl337 is offline
You didn't see anything....
AKA: Adam
FRC #0501 (Power Knights)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 1998
Location: Manchester, NH
Posts: 861
Kingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond repute
Send a message via Yahoo to Kingofl337
Re: CMUCam, Easy C, and Labview

They are pretty easy to make the hardest thing to find is a DB15 connector because Radio Shack doesn't normally stock them anymore.

Well you could just copy the block from autonomous to operator control.
__________________
FIRST Team 501 PowerKnights - Mentor
FIRST Team 40 Checkmate - Mentor Alum
FIRST Team 146 Blue Lightning - Alumni
  #25   Spotlight this post!  
Unread 25-01-2007, 22:52
sniggel sniggel is offline
Registered User
FRC #2051
 
Join Date: Jan 2007
Location: A.W. Beattie
Posts: 28
sniggel is an unknown quantity at this point
Re: CMUCam, Easy C, and Labview

thankyou were were able to get the autonomous connection up and running
The autonomous code is being called, but since we dont have our motors hooked up nothing is happening. The camera stays at red, which I figure means it finds the light but cant do anything till we get our motors hooked back up. I do have a question, I thought I saw something about needing a graphics emulator for the code to work, now I cant find where I saw that. Do we need to download and emulator somewhere to get the graphics display running correctly?
  #26   Spotlight this post!  
Unread 25-01-2007, 22:55
Kingofl337's Avatar
Kingofl337 Kingofl337 is offline
You didn't see anything....
AKA: Adam
FRC #0501 (Power Knights)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 1998
Location: Manchester, NH
Posts: 861
Kingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond repute
Send a message via Yahoo to Kingofl337
Re: CMUCam, Easy C, and Labview

No, if you downloaded the code from Http://www.intelitekdownloads.com/easyCPRO

You use the graphics display. Just open the terminal window and check off "Graphics Display"

Also in Sample Programs we have a neat camera test program. That shows you the box of what the camera sees.
__________________
FIRST Team 501 PowerKnights - Mentor
FIRST Team 40 Checkmate - Mentor Alum
FIRST Team 146 Blue Lightning - Alumni
  #27   Spotlight this post!  
Unread 07-02-2007, 15:03
K.Porter's Avatar
K.Porter K.Porter is offline
Not So Random!
FRC #0172 (FALGOR)
Team Role: Electrical
 
Join Date: Jan 2007
Rookie Year: 2004
Location: Gorham, Maine
Posts: 68
K.Porter will become famous soon enough
Send a message via AIM to K.Porter Send a message via MSN to K.Porter
Re: CMUCam, Easy C, and Labview

When porting Kevin Watson's streamlined code... did you import every file, or only the ones pertaining to the camera?
  #28   Spotlight this post!  
Unread 07-02-2007, 15:55
hal hal is offline
Registered User
FRC #2212
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Israel
Posts: 3
hal is an unknown quantity at this point
Re: CMUCam, Easy C, and Labview

I've come back to this thread after about 3 weeks, and I think I see something here that I didn't realize before. Are you saying that SetServoTracking can control the camera servos connected to PWM1 and PWM2 and thereby cause the camera to track the green light, just like Kevin's MPLAB code does? If that is do, and I convert the values returned by CaptureTrackingData to degrees, I should be able to control the robot drive motors. Is that correct?

Quote:
Originally Posted by Kingofl337 View Post
The SetServoTracking command is the same as SetPWM but for the camera servos. If you want to have the camera auto target like it would if the servos were plugged into the camera then do this.

Code:
void Initialize ( void )
{
     InitCamera ( 1 ) ;   //Initialize camera for target color
     SetServoTracking ( 1 , 1 ) ; // Sets camera servos to autotrack target
     StartCamera ( ) ; // You need to restart the camera if you change camera servo settings
}



void OperatorControl ( void )
{
      unsigned char ServoPan; 
      unsigned char ServoTilt; 

      SetServoTracking ( 1 , 1 ) ; // Sets camera servos to autotrack target
      StartCamera ( ) ; // You need to restart the camera if you change camera servo settings
       
      while ( 1 )
      {
            // Checks the where the camera wants the servos to be pointed.
            CaptureTrackingData ( 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , &ServoPan , &ServoTilt ) ;
            SetPWM ( 1 , ServoPan ) ; // Moves the servo for Pan
            SetPWM ( 2 , ServoTilt ) ; // Moves the servo for Tilt
      }
}
  #29   Spotlight this post!  
Unread 07-02-2007, 22:20
Kingofl337's Avatar
Kingofl337 Kingofl337 is offline
You didn't see anything....
AKA: Adam
FRC #0501 (Power Knights)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 1998
Location: Manchester, NH
Posts: 861
Kingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond repute
Send a message via Yahoo to Kingofl337
Re: CMUCam, Easy C, and Labview

The servos just center the camera on the object its tracking they don't drive the robot. So, you can use the servo's to figure out distance and turn angle they don't drive the robot directly.

And yes this will have the servo's autotrack for the camera. You can also look at the code used at kickoff at www.intelitekdownloads.com/easyCPRO
__________________
FIRST Team 501 PowerKnights - Mentor
FIRST Team 40 Checkmate - Mentor Alum
FIRST Team 146 Blue Lightning - Alumni
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
Labview CMUcam demo problem Windward LabView and Data Acquisition 19 11-08-2007 02:33
Problems with CMUcam & LABView Daniel_H LabView and Data Acquisition 1 30-01-2006 12:07
Major CMUcam issues - LabView app won't work, very low-quality picture scottmso Programming 5 19-01-2006 17:51
National Instruments LabVIEW and Data Acquisition Forum Danny Diaz National Instruments LabVIEW and Data Acquisition 1 16-01-2006 13:20
COM port settings for CMUcam labview testing and programming pwilczynski Programming 1 15-01-2006 15:09


All times are GMT -5. The time now is 03:37.

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