We seem to have everything set up correctly and communications seem fine, but we are not seeing images from the MS Webcam on the Default dashboard. I select “Camera HW” (Camera SW also doesn’t work) and click the green right arrow button and the counters change showing the frames per second, but we don’t actually see an image in that big box on the left. We have tried both USB ports on the roboRIO, but no images.
Ideas? Other data I need to provide before you can tell me what simple thing we are doing wrong?
Our team was having trouble with the camera (albeit an axis camera) and our solution was to override the camera ip variable in the dashboard code and hardwire the ip of the camera. It should be inside the second loop, near the left.
We are using Java, but I was trying to use the Default dashboard. The Java dashboard won’t come up at all, but that is probably a different issue. I’m reasonably sure all the software is installed correctly.
Driver’s station does show communications and robot code. I can load up the example program and run autonomous from the dashboard and a motor connected to PWM 1 spins for 2 seconds as expected.
The blue light is not on on the MS Web Cam. It flashes a couple of times when you first plug it in.
Did push reset on the roboRIO after plugging in the webcam.
The camera is shown in the RoboRIO Webdashboard.
What does clicking on the green arrow in the middle right do? Is it then trying to log the images? This is the only way I can get it to do anything. At least in that case the FPS number updates.
This post helped us. We added the code in robotInit() (Iterative Robot) and we had a camera image displayed in the standard dashboard while the robot was connected to the driver station, even when disabled.
The green arrow, red square, and red circle are for recording the video and smart dashboard values to a log file for later review. Triangle plays a recorded video, circle records the current feed in a new file. Square stops both other actions.
So we were able to get our axis camera to show up on the dashboard yesterday by changing the name of it to axis-camera. However, we’re having problems connecting to it through our code. We are getting a connection refusal when we access it as such:
AxisCamera camera = new AxisCamera("axis-camera");
Here is the exception we get when trying to run with
java.net.ConnectException: Network is unreachable
at java.net.PlainSocketImpl.socketConnect(Native Method)
I was able to run the 2015 Vision Color Sample, which does a color threshold. I modified it (few lines of code) to get the data from the axis camera, rather then a file. It does a color threshold to find the yellow bin.
In order to use the MS Webcam with the default dashboard using JAVA you need to start a camera server in JAVA. the easiest way to do this is to open the Simple Vision example code in eclipse. (File->New Project-> Sample FIRST project->Simple Vision example.) The only thing this code does is stream the webcam to the dashboard and will show you the exact syntax to use.
The only additional thing you should do is connect to the roboRIO via IP in a webrowser and check what address the MS Webcam has been assigned to. It should show up as cam0 or cam1, and you might have to change it in the sample code.
I do not have the programming computer in front of me otherwise i would just include the syntax here. I will check back here later, reply if you need the syntax copied here.