Go to Post It's not the name "FIRST" that is important but the ideas that go into and come out of it in the long run. - Levin571 [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 31-01-2009, 14:47
Team2883's Avatar
Team2883 Team2883 is offline
Registered User
FRC #2883
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Warroad MN
Posts: 36
Team2883 will become famous soon enoughTeam2883 will become famous soon enough
two color tracking code

I have been trying to program the camera to track the colors since 9 this morning and havent been able to figure it out...i have looked at the sample code but am still having trouble....any help would be appreciated



~Fighting Rednecks~
  #2   Spotlight this post!  
Unread 31-01-2009, 15:08
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: two color tracking code

Have you tried running the sample code?
It assumes a gimbal, but it is a good learning experience even if you won't use it later.

Greg McKaskle
  #3   Spotlight this post!  
Unread 31-01-2009, 15:13
Team2883's Avatar
Team2883 Team2883 is offline
Registered User
FRC #2883
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Warroad MN
Posts: 36
Team2883 will become famous soon enoughTeam2883 will become famous soon enough
Re: two color tracking code

I can't get the sample code to run...I get a failed to connect to real time target error
  #4   Spotlight this post!  
Unread 31-01-2009, 15:17
pheadxdll pheadxdll is offline
Registered User
AKA: Alex
FRC #1225 (Amperage Robotics)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2006
Location: North Carolina
Posts: 168
pheadxdll has much to be proud ofpheadxdll has much to be proud ofpheadxdll has much to be proud ofpheadxdll has much to be proud ofpheadxdll has much to be proud ofpheadxdll has much to be proud ofpheadxdll has much to be proud ofpheadxdll has much to be proud ofpheadxdll has much to be proud of
Re: two color tracking code

Labview or windriver?

The sample code does track so did you not get a successful run? What happened?
__________________
Amperage Robotics Team 1225
Site under-going revamp. :/
  #5   Spotlight this post!  
Unread 31-01-2009, 15:22
Team2883's Avatar
Team2883 Team2883 is offline
Registered User
FRC #2883
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Warroad MN
Posts: 36
Team2883 will become famous soon enoughTeam2883 will become famous soon enough
Re: two color tracking code

Its in labview, the code doesn't even load, need help please thanks.
  #6   Spotlight this post!  
Unread 31-01-2009, 15:46
Team2883's Avatar
Team2883 Team2883 is offline
Registered User
FRC #2883
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Warroad MN
Posts: 36
Team2883 will become famous soon enoughTeam2883 will become famous soon enough
Re: two color tracking code

Does anyone know were i can find the Gimble Control icon in the labview palette
  #7   Spotlight this post!  
Unread 31-01-2009, 17:17
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: two color tracking code

The steps should be open the lvproj file, change the target IP address using the properties dialog to match yours -- I think it defaults to 10.0.0.2.

Then open the top VI and it should download. As a smaller step, you can right click on the target and choose to simply connect. If that doesn't work, start pinging stuff to find which element is unreachable.

Hopefully it loads and runs.

As for a Gimbal control icon in the palette, there is a Gimbal control subVI in that example, but it isn't in the palette. That subVI is built on top of the servo stuff and some math. It is OK as an example, but really difficult to generalize a gimbal control to put into WPI.

Greg McKaskle
  #8   Spotlight this post!  
Unread 31-01-2009, 19:26
Team2883's Avatar
Team2883 Team2883 is offline
Registered User
FRC #2883
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Warroad MN
Posts: 36
Team2883 will become famous soon enoughTeam2883 will become famous soon enough
Re: two color tracking code

we can get the camera to work but it dosent track the colors....can anyone help us
  #9   Spotlight this post!  
Unread 31-01-2009, 19:36
weinbergmath's Avatar
weinbergmath weinbergmath is offline
Mentor to China FTC/FLL, FRC1230
AKA: Evan Weinberg
FRC #1230
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Hangzhou, China
Posts: 22
weinbergmath is a splendid one to beholdweinbergmath is a splendid one to beholdweinbergmath is a splendid one to beholdweinbergmath is a splendid one to beholdweinbergmath is a splendid one to beholdweinbergmath is a splendid one to beholdweinbergmath is a splendid one to beholdweinbergmath is a splendid one to behold
Re: two color tracking code

Hi,

When you say you have gotten the camera to work, to what extent is it working? In the Two Color tracking example, are you able to see the camera view in the Image block on the front panel?

If we know more specifically what you have been able to do, we can recommend the steps that come next to getting the camera tracking part to work.

Good luck!

Evan
  #10   Spotlight this post!  
Unread 31-01-2009, 19:46
Team2883's Avatar
Team2883 Team2883 is offline
Registered User
FRC #2883
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Warroad MN
Posts: 36
Team2883 will become famous soon enoughTeam2883 will become famous soon enough
Re: two color tracking code

Yes..the image comes up in the image block and it locks onto the color but the camera dosent follow it if we move the colors
  #11   Spotlight this post!  
Unread 31-01-2009, 19:53
laultima laultima is offline
Registered User
FRC #1458 (Danvillans)
Team Role: Alumni
 
Join Date: Feb 2007
Rookie Year: 2005
Location: Danville, CA
Posts: 87
laultima is on a distinguished road
Send a message via AIM to laultima
Re: two color tracking code

Are your servos hooked up? Remember, you need to put the jumpers on the two pins next to where you plug the servo PWMs in or they wont get power. You can check if the servos are being powered when the programs running by physically trying to turn them a bit. The servo should resist and correct itself.
__________________
2007 Davis/Sacramento Regional Winner (100, 997, 1458)

2008 Davis/Sacramento Regional Gracious Professionalism Award Winner

  #12   Spotlight this post!  
Unread 31-01-2009, 19:55
Team2883's Avatar
Team2883 Team2883 is offline
Registered User
FRC #2883
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Warroad MN
Posts: 36
Team2883 will become famous soon enoughTeam2883 will become famous soon enough
Re: two color tracking code

we can manually move the servos from the front panel but they wont work when we need them to track
  #13   Spotlight this post!  
Unread 31-01-2009, 23:24
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: two color tracking code

If the know and slider move the servos, the code should move them too. There is a switch on the front panel to change from camera view to servo control.

Do the servos move but aren't moving correctly? If that is the case, you may have built the gimbal different than the one the SW was written for. Disconnect them one at a time and see if the movement makes sense for either dimension. When you find a dimension that is backwards, you can open the Gimbal control and negate the proportion for that dimension.

If you don't get it working, please be more detailed. It shouldn't take this many posts to fix the problem.

Greg McKaskle
  #14   Spotlight this post!  
Unread 03-02-2009, 23:56
Ryan Gordon Ryan Gordon is offline
Registered User
FRC #2854 (EVHS Robotics)
Team Role: Mentor
 
Join Date: Feb 2009
Rookie Year: 2009
Location: San Jose, CA
Posts: 40
Ryan Gordon is an unknown quantity at this point
Re: two color tracking code

This may sound stupid, but have you tried flipping the colors?

I ran the 2-color tracking code and you select your friendly color, and then when you test it at the camera you flip it because it wants to track the "enemy" color.

Yes it is a bit confusing at first to wonder why it didn't track the color we selected because it's not specifically stated that it will only track the "enemy color." Then again maybe I was just having an off day
  #15   Spotlight this post!  
Unread 08-02-2009, 11:27
Phalanx's Avatar
Phalanx Phalanx is offline
Formerly Team 1089 (Mercury)
AKA: Michael Reffler
FRC #5431 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jun 2005
Rookie Year: 1999
Location: Lewisville, TX (previously NJ)
Posts: 384
Phalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond repute
Re: two color tracking code

I've been working with our students on the two color servo tracking example in Labview.

One thing we seem to be stuck on is the "Friend Color" enum on the block diagram and front panel. We can't seem to add more entries to it, or modify it in anyway.

What our goal really is is to replace the "Friend Color" enum with a GetAlliance.VI and based on that send the appropriate "friend color" value on.

This should be really simple, but we can't seem to figure out what data being sent by the enum "friend color" is, so we don't know what to replace it with.

Any help would be greatly appreciated.
Thanks
__________________
Don't just ask the experts, become one!
Leadership is not about ability. It's about responsibility!
Diagonally Parked in a Parallel Universe. It's okay we do Quantum Physics


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
Multiple Targets in "LabVIEW Sample two-color target tracking code" markulrich NI LabVIEW 7 29-01-2009 11:52
Two Color Tracking Demo Bharat Nain Programming 43 25-01-2009 18:58
Two color tracking problem nadavsen2 Programming 3 19-01-2009 14:44
449's code for tracking two colors jacobhurwitz NI LabVIEW 4 15-01-2009 21:19
Tracking Color? haywirerobotics Programming 0 14-01-2006 13:55


All times are GMT -5. The time now is 02:57.

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