When calling the getImage() method of the AxisCamera class (we are using Java as a language), we get an AxisCameraException: no image available. The axis camera is at 10.0.87.11, and is accessible by the team’s computers, the classmate, and even the cRio. Using the ‘write’ methods in the AxisCamera class, such as writeBrightness() or writeResolution(), the changes can be seen when viewing the camera page (from our laptops or computers). freshImage() always returns false. The camera has been tried both in the port of a router (10.0.87.11) and the second slot of the cRio (192.168.0.90). The latter configuration is not accessible by the cRio or our computers. We have not been able to find any information online. We are using Java, with a 2013 imaged cRio (though the getImage() method returned the same exception with the 2012 imaged one), and an Axis M1011 camera. Help would be much appreciated.
We are having the same issue with getImage(). As far as we know we have the correct I.P. address and I can’t seem to find an actual error. We even have the camera feed on the driver’s station working. So far we think that the issue is with our actual camera and the way it’s set up. We still haven’t found a solution. Have you fixed the problem yet?
No, we have not. We’ve since set up a packet sniffer on a team laptop. Plugging the camera, laptop, and cRIO into a hub, we can see that even when the code is not enabled, the camera and cRIO are communicating, and that the camera is streaming mjpg. Why the cRIO cannot get an image from this stream is unknown.
We had this problem too. We used the FIRST camera config tool to set up our Axis Camera, but we had to troubleshoot after.
Here are some things you should check in the camera’s setup page:
-Does the subnet mask match that of the D-Link?
-There should be an account with FRC as the user AND password
-The resolution in Basic Setup -> Video Settings should be set to 320x240 (We think)
These are what we messed with before it started working. I personally think your problem is the FRC account on the camera. If you have an FRC account but don’t know if the password is also FRC, delete it and make it again. (Sometimes the camera config tool messes it up)
We are currently having the same issues. All of the things you mentioned have been checked and I am still not able to connect to the camera from within code in Java. I am able to access it in the smart dashboard and via the live web view. Does anyone have any ideas?
The Axis camera will take about 7 seconds from the time you set the connection to it to the time the first image is available. Try starting the connection to the camera when the robot starts and make sure you wait a few seconds before enabling the robot after it starts up.