Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Camera not responding (http://www.chiefdelphi.com/forums/showthread.php?t=100576)

nickpeq 18-01-2012 17:19

Camera not responding
 
Our team is attempting to use the Axis 206 camera, hopefully for tracking targets this year. We had issues last year with the camera repeatedly causing the robot to freeze up after a few seconds. At competition, the camera suddenly started working, so long as we called getInstance() ONCE only. We did not have time for vision tracking but were able to view the dashboard image. This year, even with the same code, the camera does not respond whatsoever. The robot overloads with error messages such as the following:
Code:

[cRIO] >>>>ERROR: S_errno_EHOSTDOWN (0x00000043): Failed to connect to the camera ...in CreateCameraSocket() in C:/WindRiver/workspace/WPILib/Vision/AxisCameraParams.cpp at line 457
The error code is sometimes 0x00000044.
We are using 2012 utilities, 2012 cRIO firmware, the camera was configured with the 2012 utility to connect through cRIO port 2 (on the 8-slot cRIO), the camera is receiving appropriate voltage, and the camera works just fine when connected directly to the Classmate.
Using example code from 2010 for tracking, the program supposedly gets "100 images in x seconds", without errors until running for a few seconds. Nothing ever appears on the dashboard.
Google found one or two teams that had similar errors (difference being "EHOSTDOWN"/error-code), but no solutions.
Any ideas?

Mr. Lim 18-01-2012 17:21

Re: Camera not responding
 
Camera should not be connected to cRIO port 2.

Connect it directly to your router instead.

You should be able to ping it from your driverstation using ping 10.xx.yy.11

nickpeq 18-01-2012 17:23

Re: Camera not responding
 
Quote:

Originally Posted by Mr. Lim (Post 1108562)
Camera should not be connected to cRIO port 2.

Connect it directly to your router instead.

You should be able to ping it from your driverstation using ping 10.xx.yy.11

It will need to be connected to the cRIO to use tracking code on the robot. And it worked last year connected through the cRIO, as well as there being an option in the Axis camera utility specifically for connected through the cRIO.
Also, we have had the same error when connected through the router, however I haven't tested this as extensively.

If you have advice on using the router (should it start working on router only) for vision tracking, preferably without the involvement of LabView, I would still be grateful for that as well.

neal 18-01-2012 17:24

Re: Camera not responding
 
We had the same error after updating everything last week. But I commented out camera for the time being since we were working on something else at that time. But since this is the same problem as far as I remember, just wanted to let you know that you're not alone. Hopefully someone knows how to fix it - that will save us some time tomorrow since we plan on working on target tracking tomorrow.

nickpeq 18-01-2012 17:28

Re: Camera not responding
 
For the record, we don't seem to have a C:/WindRiver directory.
This could be a "doh" moment, but hopefully(?) it's just a generic error message.

Mr. Lim 18-01-2012 17:37

Re: Camera not responding
 
Quote:

Originally Posted by nickpeq (Post 1108564)
It will need to be connected to the cRIO to use tracking code on the robot. And it worked last year connected through the cRIO, as well as there being an option in the Axis camera utility specifically for connected through the cRIO.
Also, we have had the same error when connected through the router, however I haven't tested this as extensively.

If you have advice on using the router (should it start working on router only) for vision tracking, preferably without the involvement of LabView, I would still be grateful for that as well.

This is a change that has been made from last year. Our robot last year was plugged into port 2 of the cRIO. This year, the new 4-slot cRIO only HAS one ethernet port. The camera implementation has changed, and routing your camera through port 2 does not appear to be supported anymore.

Last year, the camera was also kept on the 192.168.x.x domain, which has also changed. The 2012 setup utility will change the IP address to 10.xx.yy.11.

Even though the camera is connected through the router, the cRIO will still be able to capture images from it using the same WPILib functions as last year. We are running vision code on our 2012 cRIO in this manner.

Hooking it up this way will also improve your driverstation video feed, and reduce load on your cRIO. The cRIO is no longer running a video server that relays the images from the camera to the driver station. Your driverstation can now retrieve video directly from the camera.

jimBatch201 18-01-2012 17:43

Re: Camera not responding
 
Were having this problem too. The WinRiver directory is created when you install WindRiver. Though when i tried to set Wind River up WPILib was not there. Has anyone set it up that could point us in the right direction as to how to get the library?

neal 18-01-2012 17:45

Re: Camera not responding
 
Quote:

Originally Posted by Mr. Lim (Post 1108573)
This is a change that has been made from last year. Our robot last year was plugged into port 2 of the cRIO. This year, the new 4-slot cRIO only HAS one ethernet port. The camera implementation has changed, and routing your camera through port 2 does not appear to be supported anymore.

Last year, the camera was also kept on the 192.168.x.x domain, which has also changed. The 2012 setup utility will change the IP address to 10.xx.yy.11.

Even though the camera is connected through the router, the cRIO will still be able to capture images from it using the same WPILib functions as last year. We are running vision code on our 2012 cRIO in this manner.

Hooking it up this way will also improve your driverstation video feed, and reduce load on your cRIO. The cRIO is no longer running a video server that relays the images from the camera to the driver station. Your driverstation can now retrieve video directly from the camera.

Makes sense. Thank you!

Will try this tomorrow :)

nickpeq 18-01-2012 19:51

Re: Camera not responding
 
Quote:

Originally Posted by neal (Post 1108580)
Makes sense. Thank you!

Will try this tomorrow :)

Same.
Thank you very much Mr Lim!

Doc543 19-01-2012 00:12

Re: Camera not responding
 
We had the same error also when we plugged it into the 2nd port on our C-RIO. On the documentation on the Axis Camera code it says I should work if you plug it in that slot, we are using the old bridge connection for our prototype, is there a way to fix that error?

Mr. Lim 19-01-2012 05:32

Re: Camera not responding
 
Quote:

Originally Posted by Doc543 (Post 1108833)
We had the same error also when we plugged it into the 2nd port on our C-RIO. On the documentation on the Axis Camera code it says I should work if you plug it in that slot, we are using the old bridge connection for our prototype, is there a way to fix that error?

Check what year the sample code is from. It is likely not from this year.

In posts mentioned above, I believe support for the camera on port 2 has changed this year. There are also reasons as to why the other approach will likely work better for you.

I strongly recommend you move the camera off port 2, run the camera setup utility, and patch it directly into the router instead.

Patrickwhite 19-01-2012 20:06

Re: Camera not responding
 
Another cause of this error is caused by the setup utility - Greg (of NI) confirmed that there was a problem with the camera setup utility that causes errors such as this. Set up the camera manually. Reset the camera by holding the button on the back and follow these steps:
1) Connect to the camera at http://192.168.0.90 (your ip address will need to be on the same domain)
2) The camera will ask you to create a root password - "admin" will work.
3) Log into the camera with root:admin
4) Using the setup page, add the user FRC, password FRC as admin.
5) If you're planning on using the Smart Dashboard, enable anonymous viewing
6) Change the IP address of the camera to 10.te.am.11
Once you save that last setting, you will not be able to connect to the camera. It should be set up at this point.

Greg McKaskle 19-01-2012 21:28

Re: Camera not responding
 
The patched utility is located at https://decibel.ni.com/content/message/31018

Greg McKaskle

Derschatten 19-01-2012 21:45

Re: Camera not responding
 
Lim if you read the FRC Getting Started with the 2012 FRC Control System it states the below:

Quote:

The camera can also be connected to the second Ethernet port on the 8-slot cRIO FRC. In this configuration the IP is left at the default 192.168.0.90. The User name and Password are setup identically to if the camera is connected to the radio
I would suggest setting the camera up by logging into it.

I have had the camera working in both port 2 or the switch. As my team is unsure which way we will go for processing the image. Laptop/cRIO as they all have pro and con.

biojae 19-01-2012 22:11

Re: Camera not responding
 
Quote:

Originally Posted by Mr. Lim (Post 1108573)
The camera implementation has changed, and routing your camera through port 2 does not appear to be supported anymore.

It does, you just have to supply the correct IP address.

Code:

AxisCamera camera = AxisCamera.getInstance("192.168.0.90");
That's how we have been getting our camera images this season.


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

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