axis camera crash course

I am the only programmer two years running now with no mentor to help me out. Last year I managed to scrap together enough code to get a robot to drive, but this year our team wants a camera on it. I have spent hours sifting through information from chief delphi and the documents provided in windriver, but still I cannot get coding to simply get a feed of video from the camera working. I am asking for a very basic, but complete list of all the code that I need to get a camera to send images to the dashboard. If anyone can help me and my team would be greatly appreciative.

Just an opinion from a mentor here… if you’re looking to simply get the camera to send images back to the dashboard during teleop, this is likely ok. If, on the other hand, you’re looking to do vision tracking of the targets, that’s a LOT more involved for a 2nd year programmer with no mentor.

What is the goal outside of the statement that the team wants the camera onboard? :slight_smile:

bob

yes. the team wants a camera onboard. not the vision tracking yet. It would be the ultimate goal, but they understand that that wont happen this year.

Meant to ask earlier…

Which language?

C++
Java
LabView

bob

Language doesn’t matter. No robot code is required to send camera images to the Dashboard. Follow the instructions for setting up the camera in the Getting Started with the 2012 Control System Guide, plug the camera into your D-Link radio with a patch (not crossover) cable and you should be all set.

C++:


AxisCamera &camera = AxisCamera::GetInstance();

-Eagle Engineering 1138

That’s to get the image on the cRIO and is not needed to get the image on the Dashboard.

So in order to get footage to the dashboard all I had to do was plug it in and leave it? Then what is the point of that line of code AxisCamera::AxisCamera.GetImage(); ? I thought that you needed all of that code to get the crio to send images to the dashboard.

I am doing all this code in c++

That code gets the image on your cRIO, for if you want to use the cRIO to process the image. An example of why you would want to do that would be to look for the targets.

I did not know that. hours of staring at code was really for nothing then huh? if all I had to do was simply plug it in. Thanks for your help and at our meeting today I should hopefully have some good news. :slight_smile:

I went to the meeting and tried to run the camera through the 8 slot crio with no coding for it at all. we dont have the router hooked up to the robot so we were just using a standard line right to the notebook. I couldnt get an image at all. What am I doing wrong?

What are you doing wrong? You don’t have the router connected, that’s what you’re doing wrong.

In order for the Dashboard to display images from the camera, it needs to be able to receive images from the camera. That means the computer running the Dashboard program (your Driver Station notebook) needs a network connection to the camera. If you don’t have the camera plugged into the router, you don’t have a network connection to it.

It is possible to connect the camera to the 8-slot cRIO’s second Ethernet port, but you have to run special code on the robot to read the camera and forward the images to the Dashboard, and you have to modify the Dashboard program to read the images from the cRIO instead of directly from the camera.

I’ll add that in order to NOT plug the camera into port-2 of the 8-slot cRio, the camera must be reconfigured. The Axis Config program is intended to do this, but it seems it may be a bit buggy. Sigh. (That’s what I’m reading on the boards here and seems to be what I’m seeing as well). So, the camera will need to have it’s IP address changed to the form 10.xx.yy.11 where xxyy is your team number. I think there needs to be a username of “FRC” with a password of “FRC” as well but don’t hold me to that one. :wink:

Once this is done, the camera will be able to sit plugged into the wireless router on the robot and you should be able to “ping 10.xx.yy.11” from the PC. If all this checks out…then you should be good on the reconfig of the camera.

bob

thanks for your help. I will definitely get to doing that today.