Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Technical Discussion (http://www.chiefdelphi.com/forums/forumdisplay.php?f=22)
-   -   Not seeing MS Webcam images in default dashboard (http://www.chiefdelphi.com/forums/showthread.php?t=133304)

adamdb 21-01-2015 19:02

Not seeing MS Webcam images in default dashboard
 
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?

Thanks

Mark McLeod 21-01-2015 19:10

Re: Not seeing MS Webcam images in default dashboard
 
  1. Don't click on the green arrow.
  2. Try pushing Reset on the roboRIO after the camera is plugged in.

dubiousSwain 21-01-2015 19:15

Re: Not seeing MS Webcam images in default dashboard
 
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.

adciv 21-01-2015 21:48

Re: Not seeing MS Webcam images in default dashboard
 
What language are you using?
Did the driverstation report you having robot code?
Did the blue light on the MS camera come on?

adamdb 21-01-2015 23:47

Re: Not seeing MS Webcam images in default dashboard
 
  • 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.

markmcgary 22-01-2015 00:38

Re: Not seeing MS Webcam images in default dashboard
 
Quote:

Originally Posted by adamdb (Post 1431788)
Ideas?

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.

Greg McKaskle 22-01-2015 08:15

Re: Not seeing MS Webcam images in default dashboard
 
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.

Greg McKaskle

adciv 22-01-2015 10:09

Re: Not seeing MS Webcam images in default dashboard
 
ok, so it sounds like the RIO isn't opening the camera. We're labview so I can't diagnose anymore than that. Let us know if what markmcgary linked to works.

notmattlythgoe 23-01-2015 07:48

Re: Not seeing MS Webcam images in default dashboard
 
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:

Code:

AxisCamera camera = new AxisCamera("axis-camera");
Any ideas?

Greg McKaskle 23-01-2015 08:26

Re: Not seeing MS Webcam images in default dashboard
 
Did you try it with .local appended to your address name?

Greg McKaskle

notmattlythgoe 23-01-2015 08:50

Re: Not seeing MS Webcam images in default dashboard
 
Quote:

Originally Posted by Greg McKaskle (Post 1432585)
Did you try it with .local appended to your address name?

Greg McKaskle

Yes I did. Both gave the same failure. I will get the exception on Saturday and post it.

notmattlythgoe 24-01-2015 11:47

Re: Not seeing MS Webcam images in default dashboard
 
Here is the exception we get when trying to run with

Code:

AxisCamera("axis-camera.local");
Code:

java.net.ConnectException: Network is unreachable
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
        at java.net.Socket.connect(Socket.java:589)
        at edu.wpi.first.wpilibj.vision.AxisCamera.createCameraSocket(AxisCamera.java:532)
        at edu.wpi.first.wpilibj.vision.AxisCamera.access$200(AxisCamera.java:28)
        at edu.wpi.first.wpilibj.vision.AxisCamera$1.run(AxisCamera.java:406)
        at java.lang.Thread.run(Thread.java:745)


Joe Ross 24-01-2015 14:28

Re: Not seeing MS Webcam images in default dashboard
 
Quote:

Originally Posted by notmattlythgoe (Post 1432577)
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:

Code:

AxisCamera camera = new AxisCamera("axis-camera");
Any ideas?

We've successfully used the AxisCamera class using both ip address and axis-camera.local using the Axis Camera Sample program.

notmattlythgoe 24-01-2015 14:49

Re: Not seeing MS Webcam images in default dashboard
 
Quote:

Originally Posted by Joe Ross (Post 1433306)
We've successfully used the AxisCamera class using both ip address and axis-camera.local using the Axis Camera Sample program.

Have you had any success doing a color threshold of the image?

Joe Ross 24-01-2015 15:01

Re: Not seeing MS Webcam images in default dashboard
 
Quote:

Originally Posted by notmattlythgoe (Post 1433323)
Have you had any success doing a color threshold of the image?

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.

dave1027 24-01-2015 15:18

Re: Not seeing MS Webcam images in default dashboard
 
Quote:

Originally Posted by adamdb (Post 1431788)
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?

Thanks

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.

-Dave

notmattlythgoe 24-01-2015 15:27

Re: Not seeing MS Webcam images in default dashboard
 
Quote:

Originally Posted by Joe Ross (Post 1433329)
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.

Where is Vision Color Sample located?

Edit: Never mind, found it after the Java update.

notmattlythgoe 26-01-2015 08:04

Re: Not seeing MS Webcam images in default dashboard
 
Quote:

Originally Posted by Joe Ross (Post 1433329)
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.

We were finally able to get it running, but not with the AxisCamera. The robotRio sees the IP camera as cam0, so I was able to use it just like the USB cameras. Thank for the help.


All times are GMT -5. The time now is 00:43.

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