![]() |
getting distance from camera
the title explains it all. how would you use the reflective tape to find the distance from the camera to it
|
Re: getting distance from camera
If you unbundle the target info global variable, you will see that one of the variables calculated is distance
|
Re: getting distance from camera
Hi,
Our team is having trouble integrating the target info into our main teleop.vi. We tried copying the Rectangular Processing example vi into our main project (the vi that only runs on the computer) and then placing it in our main code. However, whenever I try to run the code with this vi placed anywhere in it, the code doesn't work. I tried removing the vi and the code worked normally. Has anybody figured out the best way to actually use the target info? |
Re: getting distance from camera
There is a tutorial, available on the launch screen that walks you through the basics of the Rectangle example.
There are actually two different implementations, one targets the laptop, and one targets the cRIO. The cRIO one already has some amount of Robot Main and a Vision Processing.vi that incorporates the rectangle processing. As the tutorial explains, you open the vision processing and do a Save As and include dependencies to save it to your robot project. This will overwrite the Vision Processing VI and the Robot Globals, which should be what you want, but if you have added your own globals, you need to merge them. Greg McKaskle |
Re: getting distance from camera
Wow, can't believe I didn't see that tutorial a long time ago. Thank you very much! I had copied our current project from another computer, and it turns out I was having some path issues, but once I got those sorted out it worked fine!
Also, I apologize for hi-jacking this thread... |
Re: getting distance from camera
where is target info global?
|
Re: getting distance from camera
the target info global is written to in the Vision Processing VI and defined in the Robot Global VI. By default, no code in your project is reading it. You should copy/paste the global node or drag it from the project and select the right variable.
Greg McKaskle |
Re: getting distance from camera
If you have followed the instructions for integrating the rectangular vision target code into your project, the Target info global variable should be with all the other global variables, in the Robot Global Data vi.
|
Re: getting distance from camera
ummmmm....is the global variable supposed to be there?
|
Re: getting distance from camera
Quote:
|
Re: getting distance from camera
its not there. There is only enable vision, image size, and LED Toggle Rate.
|
Re: getting distance from camera
Did you follow the instructions for adding the rectangular target processing code to your robot project? Doing that properly will replace the robot globals vi file with one that has the target info included.
|
Re: getting distance from camera
can you post a link of where to find that tutorial?
|
Re: getting distance from camera
It's Tutorial 8—Integrating Vision into Robot Code. Find it, and all the other LabVIEW Getting Started Tutorials, on the Tutorials tab in LabVIEW.
|
Re: getting distance from camera
is there anywhere else i can find it, my computer is stupid and won't update the labview home screen with the frc update
|
| All times are GMT -5. The time now is 11:19. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi