Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   2010 Camera and vision problems. (http://www.chiefdelphi.com/forums/showthread.php?t=79935)

s133p 11-01-2010 14:16

2010 Camera and vision problems.
 
After working most of last build season trying to get the camera working, and ultimately failing. We are hoping to get the camera set up and working this year.

The problem is that it doesn't. The camera works when plugged in to the laptop, both through the NI vision assistant and the web interface. However, when plugged into the cRIO, nothing works. Running the default code that came with this years kit (C++ in windriver) there is no response. Also, the link light on the port that the camera is plugged into on the cRIO doesn't light up.

So far I have tried everything I can think of and I have hit a dead end. Has anyone here had any luck getting the camera working? Any suggestions?

Thanks in advance,
-Luke (675)

ebmonon36 11-01-2010 14:21

Re: 2010 Camera and vision problems.
 
Are you using a crossover cable when you plug it into the cRIO?

Eric

s133p 11-01-2010 15:20

Re: 2010 Camera and vision problems.
 
Eric,
Yes, we are using a crossover cable to connect. Are we supposed to be using something else? The crossover cable that attaches it to the cRIO is the same as the one we used when attaching it to the PC.

-Luke

EricVanWyk 11-01-2010 15:28

Re: 2010 Camera and vision problems.
 
Many (most?) modern laptops are smart enough to compensate if you use / don't use a cross over cable by switching internally. It is possible that your laptop is tricking you by this method.

Try plugging a hub or switch into ethernet port 2 on the cRIO. Does it light up now?

Joe Ross 11-01-2010 16:02

Re: 2010 Camera and vision problems.
 
The crossover cable in the kit last year was orange. The other ethernet cables in the kit were not crossover cables.

s133p 11-01-2010 16:16

Re: 2010 Camera and vision problems.
 
We have used the orange cable. And the cable we are using now is a crossover (We tested it). If I plug the computer into port 2, the lights do come up just as they do if the computer is plugged into port 1. (Although there are no comms with this method). Because of that I am reasonably sure the port is okay.

In reference to another thread on here, I made sure the Camera to Dashboard program compiles and is on the robot. And if I have a debugging console running there are no errors reported :-/

This is really irritating.

-Luke

DanDon 11-01-2010 16:25

Re: 2010 Camera and vision problems.
 
Quote:

Originally Posted by s133p (Post 896747)
We have used the orange cable. And the cable we are using now is a crossover (We tested it). If I plug the computer into port 2, the lights do come up just as they do if the computer is plugged into port 1. (Although there are no comms with this method). Because of that I am reasonably sure the port is okay.

In reference to another thread on here, I made sure the Camera to Dashboard program compiles and is on the robot. And if I have a debugging console running there are no errors reported :-/

This is really irritating.

-Luke

Try ouputting data to the debugging console indicating when a command is successfully completed, that way at least you know the code is running correctly.

jc4p 11-01-2010 16:27

Re: 2010 Camera and vision problems.
 
Which camera to dashboard program are you using?
The "Camera to Dashboard" example program does not work to my knowledge. Either build the "FRC 2010 Vision Demonstration" program, or add this to your robot's main code:
Code:

AxisCamera &camera = AxisCamera::getInstance();
camera.writeResolution(k320x240);
camera.writeBrightness(0);

You will have to also do:
Code:

#include "Vision/AxisCamera2010.h"
If you do this and your camera still does not send an image to the laptop, then it is definitely not a programming problem.

s133p 11-01-2010 16:33

Re: 2010 Camera and vision problems.
 
DanDon: The code has that, and every part completes as expected.

jc4p: Ahhh, I will give that a go when I get back to the laptop. Is the transmit to the DS auto-magic from that point, or should I also include the PCVideoServer?

Thanks again everyone for all the help. Ill report back after I test again.

DanDon 11-01-2010 16:35

Re: 2010 Camera and vision problems.
 
Quote:

Originally Posted by s133p (Post 896765)
DanDon: The code has that, and every part completes as expected.

jc4p: Ahhh, I will give that a go when I get back to the laptop. Is the transmit to the DS auto-magic from that point, or should I also include the PCVideoServer?

Thanks again everyone for all the help. Ill report back after I test again.

I believe that in the WPIlib documentation it says that an AxisCamera instantiation automatically invokes a PCVideoServer.

s133p 11-01-2010 16:37

Re: 2010 Camera and vision problems.
 
Quote:

Originally Posted by DanDon (Post 896769)
I believe that in the WPIlib documentation it says that an AxisCamera instantiation automatically invokes a PCVideoServer.

Okay, thanks. I think I was just looking at the wrong/old pdf.

s133p 11-01-2010 17:38

Re: 2010 Camera and vision problems.
 
After testing the recommended code, I still have some problems.

Code:

AxisCamera &camera = AxisCamera::getInstance();
camera.writeResolution(k320x240);
camera.writeBrightness(0);

I am using that with print statements between every line. The one before the first line makes it to the terminal, but after that there is nothing. Then after a while some cryptic errors pop up.

The one that leads me to believe this is a hardware problem of some sort is:
Quote:

connect: S_errno_ETIMEOUT
As far as I can tell, that means I am done here. Unless anyone has any other ideas or hardware change recommendations.

-Luke

DanDon 11-01-2010 17:41

Re: 2010 Camera and vision problems.
 
Quote:

Originally Posted by s133p (Post 896827)
After testing the recommended code, I still have some problems.

Code:

AxisCamera &camera = AxisCamera::getInstance();
camera.writeResolution(k320x240);
camera.writeBrightness(0);

I am using that with print statements between every line. The one before the first line makes it to the terminal, but after that there is nothing. Then after a while some cryptic errors pop up.

The one that leads me to believe this is a hardware problem of some sort is:

As far as I can tell, that means I am done here. Unless anyone has any other ideas or hardware change recommendations.

-Luke

That seems like it would indicate a problem instantiating an AxisCamera object....as to how to fix it, unfortunately no idea until I can get into a lab and play around a bit.

Joe Ross 11-01-2010 23:06

Re: 2010 Camera and vision problems.
 
I assume you set up the camera passwords per the control system documentation?

s133p 12-01-2010 13:55

Re: 2010 Camera and vision problems.
 
Ok, I feel like I am close to the solution. One thing I am seeing, after poking around in the console of the cRIO, is that it only has two network devices, the loopback, and the main one with the 10.xx.xx.2 ip. This makes me wonder how port two is supposed to connect on a different subnet to the camera.

My question then, is if one of you who has the console working to your cRIO could run "ifShow" and just tell me what things are listed. Failing that, I am at my wits end and I will have to call NI tomorrow if I cant get this fixed.

-Luke


All times are GMT -5. The time now is 13:04.

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