Log in

View Full Version : Need help in programing the camera Axis point


Gadeer Zbedat
06-01-2013, 16:24
Hii :))
I'm member of team #1946 From Tamra-ISRAEL
This year we should use the camera !! without the camera it's all full of $@#$@#$@#$@#
So ,I need your help guys in programing the camera in C++ language .
{Last year we don't use the camera}

mprasolov
06-01-2013, 19:13
You can look at our code from last season here (https://bitbucket.org/automatons2823/c-code-2012/commits/all)

All we did was put this code in our initialization class. (Not the constructor)

AxisCamera &camera = AxisCamera::GetInstance();

It will build with a warning, but works anyway. Sends feed to dashboard (not the driver station) if you configured the camera correctly. I recall the IP of the camera should end in .11 or something like that.

Gadeer Zbedat
07-01-2013, 09:11
Should I measur the dimension from the robot to the goal we throw at it the freesbie disc?

Ido_Wolf
07-01-2013, 11:10
I recall the IP of the camera should end in .11 or something like that.
Generally in its stock settings, the camera's IP is 192.168.0.90. When you connect it to your router (as all rookie teams starting 2012 have to as they don't have a 2nd port in the new cRIO), and set it up properly with the "Setup Axis Camera" tool, the IP would be 10.xx.yy.11 (xxyy=your team number).

If you connect it to the 2nd Enet port of your cRIO though, the IP should be set to 192.168.0.90.
Should I measur the dimension from the robot to the goal we throw at it the freesbie disc?
I don't quite understand the question here; you should measure it if you want to use it in your code, obviously. I'm not quite up to task as far as C++ is concerned, but if there's any alternative for WPILib's examples there, you should probably find an example code that shows you how to find the diagonal range from the target. You can use some trigonometry to find out the vertical and horizontal range from the target using the diagonal range and the camera's angle in relation to the target...

(Also, if you want any consultancy in Hebrew, feel free to PM me. Keep in mind that my IDE of choice is LabVIEW though)

Gadeer Zbedat
07-01-2013, 11:40
you can give me the text of programing it ?? in c++ ?? :]
---->you are from Israel??