Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Axis Camera Help!!! (http://www.chiefdelphi.com/forums/showthread.php?t=74566)

furiousgeorge 15-02-2009 14:32

Axis Camera Help!!!
 
i know it's kinda last minute and all, but we still want to attempt to use the axis camera for our robot, even though it runs fine without it. the only problem is i'm just not sure where to begin. i'm using labview and i can see that in the basic robot main there is a while loop already set up for the camera, but i'm just not sure what to do with it. could someone please help me?

Chris1228 15-02-2009 14:54

Re: Axis Camera Help!!!
 
wat does it need to do?

furiousgeorge 15-02-2009 15:09

Re: Axis Camera Help!!!
 
it needs to follow the green and pink fabric that we were given as a sample in the kit of parts, and then if i am able to get that working i would like to use it in autonomous mode of the robot, so that while autonomous mode is running the robot will track/follow the pink and green fabric and use this information/signal from the camera to initiate the motors to drive in that direction

Chris1228 15-02-2009 15:11

Re: Axis Camera Help!!!
 
that is the same thing i am trying to get accomplished. i'm type lost on the subject as well. i can get servos to follow the fabric just not motors

furiousgeorge 15-02-2009 15:15

Re: Axis Camera Help!!!
 
yeah, i'm kinda new to the whole programming thing, so i'm just not even sure where to begin.

Greg McKaskle 15-02-2009 15:29

Re: Axis Camera Help!!!
 
If you camera will be mounted on the servo gimbal, then you probably want to start with the sample code for two color tracking. Try the sample exactly as it is at first, just setup your IP address, hook up the PWMs, and see if it works.

Once that works, look at the diagram of the Robot Main, see where it Gets the image and does nothing with it? Then in the example where it gets the image and calls the Find Two Color and then the State Based Servo Tracking?

Go ahead and copy the stuff from the example into the vision loop. If you use the servos, copy that loop too and place it nearby somewhere.

If you are using servos, the servo X value tells you when the robot may need to turn to face the target.

If you are not using the servos and want to control a motor, the camera is telling you how far to turn. You need to figure out how to do that with a motor, and probably a pot.

Greg McKskle

furiousgeorge 15-02-2009 15:53

Re: Axis Camera Help!!!
 
where did you find this example that you're talking about and i'm not using servos, just motors controlled by jaguars.

Greg McKaskle 15-02-2009 16:21

Re: Axis Camera Help!!!
 
I think this example is in the examples/FRC/vision folder if you've installed update three. And it is also discussed at length including a demo program that incorporated it on the earliest post here

http://forums.usfirst.org/showthread.php?t=11298&page=2

Greg McKaskle

furiousgeorge 15-02-2009 17:36

Re: Axis Camera Help!!!
 
i'm sorry, but when i read that thread, i couldn't make sense of any of it. i don't know what to do with the labview programming part of the camera as well as the physical aspect of where things should be hooked up (besides the eithernet cable to the second port on the cRIO) so, lots of detailed help would be appretiated.

furiousgeorge 15-02-2009 17:39

Re: Axis Camera Help!!!
 
where did you get the third update from?

Greg McKaskle 15-02-2009 17:42

Re: Axis Camera Help!!!
 
Fist download the two color code being provided to you.
Second open the lvproj and follow the directions on the panel to test it out.
Third reread the thread and search for similar threads where others describe and even give out code that integrates this example with the template code.
Fourth start coding.

If you have more specific questions or problems, ask away.

Greg McKaskle

furiousgeorge 15-02-2009 17:44

Re: Axis Camera Help!!!
 
sorry about all this, i'm still learning, but how do you get the two colored code? where is it?

Greg McKaskle 15-02-2009 18:00

Re: Axis Camera Help!!!
 
http://joule.ni.com/nidu/cds/view/p/lang/en/id/1215

Greg McKaskle

furiousgeorge 15-02-2009 18:01

Re: Axis Camera Help!!!
 
and i'm using labview, the while loop and everything that we were given as a default is still here, i havent changed anything on that part of the loop, but how do i get it to communicate with the camera and recieve signals, and then how do i get those signals to seek out the two colors, and then how do i get the motors in auto mode to react to the camera and follow the two colors when it senses them?

Greg McKaskle 15-02-2009 19:55

Re: Axis Camera Help!!!
 
Have you opened and run just the camera example yet?

Not to be a pain, but if you try to do too much at once, you will run into way more issues.

After you run the VI and get it to work, then look at the example and note that both pieces of code have a camera get. That should help you get your bearings.

Greg McKaskle


All times are GMT -5. The time now is 10:41.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi