|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||||
|
|||||
|
Two Color Tracking Demo
Here is a version that tracks the gimbal type setup provided by FIRST. It works in autonomous mode. WPI has finally released it.
http://first.wpi.edu/FRC/frcupdates.html |
|
#2
|
|||
|
|||
|
Re: Two Color Tracking Demo
Anyone find the labview version yet?
EDIT: usfirst has(will have) a link to it on their 2009 control system page. I guess I'll just wait for that to be up. Last edited by Booksy : 13-01-2009 at 22:13. |
|
#3
|
|||||
|
|||||
|
Re: Two Color Tracking Demo
Thanks for the post and letting us know.
|
|
#4
|
|||
|
|||
|
Re: Two Color Tracking Demo
|
|
#5
|
|||
|
|||
|
Re: Two Color Tracking Demo
I can't compile this code. The module Target.cpp calls a function "InArea" that is defined in the WPILib module TrackAPI.cpp. TrackAPI.h, however, does not declare this function. I could easily add this declaration to Target.cpp but I wonder if this was written for a WPILib that hasn't been released yet. Some other posts have indicated that there are bugs in the vision system and this example may not address them. Has there been any WPILib update since 1/1/09 that I don't have?
|
|
#6
|
||||
|
||||
|
Re: Two Color Tracking Demo
the function "InArea" can be found in the source code for build 1562 found here. The source has changed since the kickoff because the code I have from just before the kickoff doesn't contain the InArea function either.
Try re-installing the Workbench update. It looks like they may have added it to this install. Otherwise you'll have to re-build the source and link in the WPIlib.a file generated in the make process. The default location for the WPILib source tree ended up in C:\WinDriver\vxworks-6.3\WPILib. Quote:
|
|
#7
|
|||
|
|||
|
Re: Two Color Tracking Demo
I just downloaed the build 1562 from the WPI site and it is identical to the one that I downloaded on jan 2. My issue isn't that the function InArea is missing from the library but that the declaration of it is missing from the header TrackAPI.h. The latest version does not fix this. If I put the declaration for InArea in target.cpp than the demo compiles and links.
I suspect that they have added the declaration of InArea to their version of the library but have not yet released it. The demo, however, seems to have been built with a newer library than the one we have. Quote:
|
|
#8
|
||||
|
||||
|
Re: Two Color Tracking Demo
Thanks for the LV link.
|
|
#9
|
|||||
|
|||||
|
Re: Two Color Tracking Demo
FYI.
It's possible to build the Camera Gimbal slightly back the front. Looking at the gimbal from the front of the robot, the servo needs to be on the left hand side. It will go together just fine with the servo on the right, but the net effect is that up and down will be reversed on the Y servo. It's easy to spot this (as in my case) because when the camera sees the target, it sweeps up or down away from it. I tried fixing it in software but I couldn't quite get it working, so I opted for fixing the camera.... It just meant detaching the servo horn from the tilt servo, and flipping the camera plate by 180 degrees. (Of course you have to invert the camera and rotate the base by 180 on the robot as well). It's a great example VI (for LabVIEW), able to be almost dropped right into either of the robot templates. |
|
#10
|
|||
|
|||
|
Re: Two Color Tracking Demo
Is there anything special that needs to be done to use the LabVIEW version of this code? We tried running the code on the cRIO using the run button, and it refused to communicate. It was communicating just fine with other code we'd been working with (using the Basic Robot Main VI), so I'm inclined to think that it's some sort of missing software update, but I'm not sure what that could be. Our team has update 2.0 of the FIRST robotics update (found using the about menu item).
We have gotten the camera to work before, connected to the cRIO and directly to our programming laptop. Please help! |
|
#11
|
|||||
|
|||||
|
Re: Two Color Tracking Demo
Hi
Yes..... Most "sample" programs come configured with a generic tean number (read IP address) or none at all. Once you open the project, you will see the IP address as part of the realtime program node name (cRIO Controller 10.0.0.2). Right Click on the Realtime node and select Properties. From there you will see a place to change the program's name and IP address. Set it based on your team # 10.xx.yy.2 Now you sould be able to connect using the run button. Make sure you RUN the main vi (eg: Two Color Servo Camera Example.vi) Have Fun. |
|
#12
|
|||
|
|||
|
Re: Two Color Tracking Demo
Yes, that was the problem. Thank you, PhilBot.
|
|
#13
|
|||
|
|||
|
Re: Two Color Tracking Demo
oh someone stated that the code must be run in autonomous mode...
is this true? that might be why iv had such a hard time all along. |
|
#14
|
|||
|
|||
|
Re: Two Color Tracking Demo
@dani - The tracking is only active in autonomous mode, the tele-op is just the standard SimpleRobot tele-op.
Does anyone know if there are step by step instructions for asembling the camera gimbal assembly? I found the drawing on the FIRST site but the only part I can't figure out is how to attach the "Axis Case" part to the camera? Other than that I could probably figure the rest out by looking at the drawings. |
|
#15
|
|||
|
|||
|
Re: Two Color Tracking Demo
anyone have pictures of how they set up thier camera?
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Camera tracking between two lights | Ankush Dhar | Programming | 2 | 12-02-2007 23:44 |
| Tracking two lights | Render | Programming | 5 | 29-01-2007 18:14 |
| Camera tracking demo in easyC or WPILib | BradAMiller | Programming | 0 | 25-01-2007 14:01 |
| Tracking Color? | haywirerobotics | Programming | 0 | 14-01-2006 13:55 |
| tracking two tetras? | Anton | Programming | 5 | 09-02-2005 15:02 |