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

jc4p 12-01-2010 17:01

Re: 2010 Camera and vision problems.
 
Quote:

Originally Posted by s133p (Post 897502)
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

I am in the same situation as you, sadly I do not currently have access to our robotics room to do the test for you. When I run the 2010 Image Demo code, or the snippet I sent you, the robot freezes and the Dashboard shouts "Watchdog not fed." If I comment out the initializer for the AxisCamera object, everything works.

s133p 12-01-2010 17:51

Re: 2010 Camera and vision problems.
 
Update: My code now seems to be able to initialize the camera without it hanging. The lights are on on the cRIO as well. To do this I re-flashed the cRIO and checked to see if the other interface was there. We also switched crossover cables, but im not sure if we needed to.

It seems like the only remaining problem is getting the video out to go back to the laptop now.

Thank you all for your help so far.

-Luke

Bigcheese 12-01-2010 18:57

Re: 2010 Camera and vision problems.
 
Quote:

Originally Posted by s133p (Post 897647)
Update: My code now seems to be able to initialize the camera without it hanging. The lights are on on the cRIO as well. To do this I re-flashed the cRIO and checked to see if the other interface was there. We also switched crossover cables, but im not sure if we needed to.

It seems like the only remaining problem is getting the video out to go back to the laptop now.

Thank you all for your help so far.

-Luke

Same ;/. They had it working at the kickoff, or at least it seemed like they did.

DanDon 12-01-2010 23:20

Re: 2010 Camera and vision problems.
 
Quote:

Originally Posted by s133p (Post 897647)
Update: My code now seems to be able to initialize the camera without it hanging. The lights are on on the cRIO as well. To do this I re-flashed the cRIO and checked to see if the other interface was there. We also switched crossover cables, but im not sure if we needed to.

It seems like the only remaining problem is getting the video out to go back to the laptop now.

Thank you all for your help so far.

-Luke

Any idea what fixed it? My code is still hanging when creating the instance of AxisCamera.

Here is the result of an inetstatShow command

PHP Code:

-> inetstatShow
Active Internet connections 
(including servers)
PCB      Proto Recv-Q Send-Q  Local Address         Foreign Address       (state)
-------- ----- ------ ------  --------------------- --------------------- -------
5c5f60   TCP    17376      0  192.168.0.3.1036      192.168.0.90.80       ESTABLISHED

5c54e0   TCP    17376      0  192.168.0.3.1034      192.168.0.90.80       ESTABLISHED

5c4a60   TCP        0      0  192.168.0.3.1032      192.168.0.90.80       CLOSE_WAIT
5c4520   TCP        0      0  0.0.0.0.1180          0.0.0.0.0             LISTEN
5c3fe0   TCP        0      0  0.0.0.0.3537          0.0.0.0.0             LISTEN
5c3800   TCP        0      0  0.0.0.0.43973         0.0.0.0.0             LISTEN
5c3020   TCP        0      0  0.0.0.0.1028          0.0.0.0.0             LISTEN
5c2ae0   TCP        0      0  0.0.0.0.3363          0.0.0.0.0             LISTEN
5c25a0   TCP        0      0  0.0.0.0.3079          0.0.0.0.0             LISTEN
5c2060   TCP        0      0  0.0.0.0.21            0.0.0.0.0             LISTEN
5c15e0   TCP        0      0  127.0.0.1.1024        0.0.0.0.0             LISTEN
5c1b20   TCP        0      0  0.0.0.0.0             0.0.0.0.0             CLOSED
5c10a0   TCP        0      0  0.0.0.0.44516         0.0.0.0.0             LISTEN
598a80   UDP        0      0  0.0.0.0.1026          0.0.0.0.0
598940   UDP        0      0  0.0.0.0.1110          0.0.0.0.0
598800   UDP        0      0  0.0.0.0.0             0.0.0.0.0
5981c0   UDP        0      0  0.0.0.0.44515         0.0.0.0.0
598080   UDP        0      0  0.0.0.0.68            0.0.0.0.0
value 
0x1
-> 

And here's the output of an ifShow command

PHP Code:

-> ifShow
lo 
(unit number 0):
     
Flags: (0x48049UP LOOPBACK MULTICAST TRAILERS ARP RUNNING INET_UP
     Type
SOFTWARE_LOOPBACK
     inet
127.0.0.1
     Netmask 0xff000000 Subnetmask 0xff000000
     Metric is 0
     Maximum Transfer Unit size is 1536
     0 packets received
20 packets sent
     0 multicast packets received
     0 multicast packets sent
     0 input errors
0 output errors
     0 collisions
0 dropped
     0 output queue drops
fec 
(unit number 0):
     
Flags: (0x68043UP BROADCAST MULTICAST ARP RUNNING INET_UP
     Type
ETHERNET_CSMACD
     inet
10.3.75.2
     Broadcast address
255.255.255.255
     Netmask 0xff000000 Subnetmask 0xff000000
     Ethernet address is 00
:80:2f:11:4d:14
     Metric is 0
     Maximum Transfer Unit size is 1500
     0 octets received
     0 octets sent
     204995 unicast packets received
     202032 unicast packets sent
     247 non
-unicast packets received
     2 non
-unicast packets sent
     0 incoming packets discarded
     0 outgoing packets discarded
     0 incoming errors
     0 outgoing errors
     70 unknown protos
     0 collisions
0 dropped
     0 output queue drops
fei 
(unit number 0):
     
Flags: (0x78043UP BROADCAST MULTICAST ARP RUNNING INET_UP
     Type
ETHERNET_CSMACD
     inet
192.168.0.3
     Broadcast address
255.255.255.255
     Netmask 0xffffff00 Subnetmask 0xffffff00
     Ethernet address is 00
:80:2f:11:4d:15
     Metric is 0
     Maximum Transfer Unit size is 1500
     317987878 octets received
     3500254 octets sent
     218474 unicast packets received
     53020 unicast packets sent
     0 multicast packets received
     0 multicast packets sent
     138 broadcast packets received
     2 broadcast packets sent
     0 incoming packets discarded
     0 outgoing packets discarded
     0 incoming errors
     0 outgoing errors
     0 unknown protos
     0 collisions
0 dropped
     0 output queue drops
value 
26 0x1a 

When I remove the call to AxisCamera::GetInstance(), the watchdog is fed correctly and the code has no problems running.

The camera has the root/admin account set up and has the default 192.168.0.90 IP address.
And yes, I am using a crossover cable.

elfinn 13-01-2010 08:10

Re: 2010 Camera and vision problems.
 
Can you ping your camera (192.168.0.90) from the WR Console prompt?

s133p 13-01-2010 12:29

Re: 2010 Camera and vision problems.
 
Quote:

Originally Posted by DanDon (Post 897898)
Any idea what fixed it? My code is still hanging when creating the instance of AxisCamera.

Here is the result of an inetstatShow command

When I remove the call to AxisCamera::GetInstance(), the watchdog is fed correctly and the code has no problems running.

The camera has the root/admin account set up and has the default 192.168.0.90 IP address.
And yes, I am using a crossover cable.

Can you post the relevant parts of your code? The includes and the camera code should be good.

Also, I don't know if the camera /works/ after starting it up, only that it starts up. I'm going to put some tracking code on today at some point and try to see if the camera is working.

Also, has anyone heard of a team actually getting the camera working/sending to the dashboard? Because I think its possible that this is a first problem. Actually, has anyone gotten "2010ImageDemo" to compile?

I really wish I could tell what is FIRSTs fault, and what is mine. :P

Zme 13-01-2010 13:52

Re: 2010 Camera and vision problems.
 
we got the code to compile but it didn't seem to be working, held the target in front of it and it just said no valid targets, no video was sent to the dashboard. we are really confused and since this task is pretty important to us and we didn't write the code, its safe to say that we are a little frustrated

s133p 13-01-2010 13:57

Re: 2010 Camera and vision problems.
 
Quote:

Originally Posted by Zme (Post 898241)
we got the code to compile but it didn't seem to be working, held the target in front of it and it just said no valid targets, no video was sent to the dashboard. we are really confused and since this task is pretty important to us and we didn't write the code, its safe to say that we are a little frustrated

Okay, I'm taking this to mean that first has the problem not us. Although, did you ever plug the camera into the computer just to make sure its focused?

Other than that it looks like we just have to wait for first to to fix it.

Zme 13-01-2010 15:27

Re: 2010 Camera and vision problems.
 
i did hook it up to a computer to check to see if its focused, it was a little bit out but not all that much

DanDon 13-01-2010 15:47

Re: 2010 Camera and vision problems.
 
So I get into the lab today and the camera decides to initialize itself without a problem. Still getting no image on the dashboard though. I'm not getting any other data on the dashboard either though....is anyone else?

EDIT:

Annnnnnd now it's decided to go back to not working. Can I throw this thing out of a window?

Kingofl337 13-01-2010 15:47

Re: 2010 Camera and vision problems.
 
I'll test the Java Camera Code tonight and see if it works correctly using the v19 image and the sample code.

Kingofl337 13-01-2010 20:33

Re: 2010 Camera and vision problems.
 
1 Attachment(s)
I tested the sample code for Java and it seems ok, but it also has some gyro code in it so I stripped that out to show the bare minimum. Here you go...

It uses the Driver Station to Output Cam X and Y values.

Bigcheese 13-01-2010 21:47

Re: 2010 Camera and vision problems.
 
So I guess this means that in C++ either the example is wrong or the WPILib is wrong...

DanDon 13-01-2010 21:53

Re: 2010 Camera and vision problems.
 
Quote:

Originally Posted by Bigcheese (Post 898611)
So I guess this means that in C++ either the example is wrong or the WPILib is wrong...

Have you gotten the camera to at least instantiate? I can ping the camera (192.168.0.90) with 0% packet loss from the cRio, and the user/pass combo is set up correctly but my code still hangs on AxisCamera::GetInstance().

Kingofl337 13-01-2010 22:20

Re: 2010 Camera and vision problems.
 
Seeing Java and C++ use pretty much the same code base, I'd think it would work in one if it works in the other, I can test the C++ code tomorrow night.

DanDon 13-01-2010 22:28

Re: 2010 Camera and vision problems.
 
Quote:

Originally Posted by Kingofl337 (Post 898662)
Seeing Java and C++ use pretty much the same code base, I'd think it would work in one if it works in the other, I can test the C++ code tomorrow night.

If the C++ code does work, is there any way you can put together a list of what we might be doing wrong? I'm getting nowhere fast as of now.

Kingofl337 14-01-2010 08:49

Re: 2010 Camera and vision problems.
 
With Java, it pretty much went.
Download: http://joule.ni.com/nidu/cds/view/p/lang/en/id/1534 and install it
Update cRio Image to v19 (Tick Format Controller)
Plug Camera into Laptop and Run Config Utility
Plug the camera into the robot using Port 2 and a Crossover Cable
Pull down the Netbeans plug-ins
Run the source code I posted on the last page

I'd assume it would be the same for Wind River, except you would need to download the update from http://first.wpi.edu/Images/CMS/Firs...te20100107.exe for Workbench.

DanDon 14-01-2010 09:31

Re: 2010 Camera and vision problems.
 
Quote:

Originally Posted by Kingofl337 (Post 898851)
With Java, it pretty much went.
Download: http://joule.ni.com/nidu/cds/view/p/lang/en/id/1534 and install it
Update cRio Image to v19 (Tick Format Controller)
Plug Camera into Laptop and Run Config Utility
Plug the camera into the robot using Port 2 and a Crossover Cable
Pull down the Netbeans plug-ins
Run the source code I posted on the last page

I'd assume it would be the same for Wind River, except you would need to download the update from http://first.wpi.edu/Images/CMS/Firs...te20100107.exe for Workbench.

Hmm, only difference between your list and mine is that I manually edited the username and password rather than use the Config Utility. Does the Config Utility change anything else on the camera? I'll give running that a shot once I get into the lab and post results.

Kingofl337 14-01-2010 09:43

Re: 2010 Camera and vision problems.
 
Something else you may want to try, if you used Wind River last year is to uninstall it and delete all traces of it. Then reinstall, I think the location of WPILib.a moved down a directory and Wind River could be pointing to the wrong file.

You may also try searching for WPILib.a under C:\Windriver and deleting it, after that reinstall the Workbench update. If it can't find WPILib.a then that's your issue and you need to point to the current location. If you were using WPILIb source code to compile you WPILib.a file that can cause the issue as well. I haven't seen the new version of WPILib source yet.

Bigcheese 14-01-2010 12:11

Re: 2010 Camera and vision problems.
 
Quote:

Originally Posted by DanDon (Post 898619)
Have you gotten the camera to at least instantiate? I can ping the camera (192.168.0.90) with 0% packet loss from the cRio, and the user/pass combo is set up correctly but my code still hangs on AxisCamera::GetInstance().

Yep, I have gotten past that point in the code. Duno if tracking works though because the lens was out of focus and is now dead, so I'm heading over to Fry's to get another one.

The dashboard on the Driver Station doesn't work though. :(

DanDon 14-01-2010 15:13

Re: 2010 Camera and vision problems.
 
Still absolutely no dashboard data with the 2010ImageDemo. I'm getting the code to run, however there's an output line on the VxWorks console that worries me.

Quote:

task 0x1df9a60 <FRC_cameraTask> deleted: errno=0 <0> status=0 <0>

No idea what it means, but it doesn't look promising to me. Any help?

byteit101 14-01-2010 15:26

Re: 2010 Camera and vision problems.
 
Quote:

Originally Posted by DanDon (Post 899089)
Still absolutely no dashboard data with the 2010ImageDemo. I'm getting the code to run, however there's an output line on the VxWorks console that worries me.




No idea what it means, but it doesn't look promising to me. Any help?

That means something deleted the camera Task. Usually by going out of scope. Make sure you don't accidentally dispose the camera

JesterKarrde 14-01-2010 20:22

Re: 2010 Camera and vision problems.
 
I'm working on LabVIEW trying to solve the same problem. I've gotten the image to show up on the LabVIEW instrument, but not on the dashboard. I am getting the image from the cRio.

tekman1001 14-01-2010 20:43

Re: 2010 Camera and vision problems.
 
Hey does anyone know were the demo code is located I can't find it anywhere.
Thanks,

woodk 14-01-2010 22:16

Re: 2010 Camera and vision problems.
 
Some people seem to be having a similar problem to what I had ...
in my case the DSupdate did not update the dashboard (only the driver station). I only noticed because I installed the update on a second laptop and it looked different. I went back and checked the file date and it was not the same on the classmate. I had to run the DSupdate program, but tell it to uninstall, then run it again and install. Now it works.

- Kevin

woodk 14-01-2010 22:19

Re: 2010 Camera and vision problems.
 
Quote:

Originally Posted by tekman1001 (Post 899308)
Hey does anyone know were the demo code is located I can't find it anywhere.
Thanks,

You should be able to create demo code by selecting File -> New -> Example

Make sure you follow the "Getting started with C++" document the first time.

- Kevin

1jbinder 14-01-2010 22:53

Re: 2010 Camera and vision problems.
 
Reinstalling worked for us!!!!
Thanks guys,
Julian

ranc 14-01-2010 23:19

Re: 2010 Camera and vision problems.
 
Quote:

Originally Posted by 1jbinder (Post 899434)
Reinstalling worked for us!!!!
Thanks guys,
Julian

Did you reinstall Windriver? or the driver station update?

Bigcheese 15-01-2010 18:04

Re: 2010 Camera and vision problems.
 
I finally got camera output + target data on the dashboard. The problem was indeed the drivers station update.

Here's how to fix it:
  1. Download the drivers station update: http://joule.ni.com/nidu/cds/view/p/lang/en/id/1535
  2. Run the drivers station update and install.
  3. Run the drivers station update and select remove for both components.
  4. Run the drivers station update and install.

This fixes it. NI needs to fix the installer.

DanDon 15-01-2010 18:25

Re: 2010 Camera and vision problems.
 
Quote:

Originally Posted by Bigcheese (Post 899969)
I finally got camera output + target data on the dashboard. The problem was indeed the drivers station update.

Here's how to fix it:
  1. Download the drivers station update: http://joule.ni.com/nidu/cds/view/p/lang/en/id/1535
  2. Run the drivers station update and install.
  3. Run the drivers station update and select remove for both components.
  4. Run the drivers station update and install.

This fixes it. NI needs to fix the installer.

I was just about to post this. Exactly what I had to do to fix the problem.

I also have the camera tracking the target on a pan/tilt assembly :yikes: .

tekman1001 15-01-2010 21:21

Re: 2010 Camera and vision problems.
 
Does anyone know if you should be able to ping the camera @ 192.168.0.90 from the driver station. Thanks

DanDon 15-01-2010 21:25

Re: 2010 Camera and vision problems.
 
Quote:

Originally Posted by tekman1001 (Post 900088)
Does anyone know if you should be able to ping the camera @ 192.168.0.90 from the driver station. Thanks

Not from the DS, but rather from a terminal connecting to the cRio. Either through NetConsole, or through Windriver, etc.

The syntax for the VxWorks ping command is

Code:

ping "host address",numPackets
or

Code:

ping "192.168.0.90",10
for a 10 packet ping.

ranc 16-01-2010 00:12

Re: 2010 Camera and vision problems.
 
Somehow, it still doesn't work for my team. We tried reinstalling the driver station update and the dashboard reverted to the newer update. However, it still refuses to show an image or return data. Is it necessary to change the camera settings through the given program?

Michael DiRamio 16-01-2010 00:21

Re: 2010 Camera and vision problems.
 
Quote:

Originally Posted by ranc (Post 900202)
Somehow, it still doesn't work for my team. We tried reinstalling the driver station update and the dashboard reverted to the newer update. However, it still refuses to show an image or return data. Is it necessary to change the camera settings through the given program?

Have you tried using one of the other development environments to see if the issue is with the camera setup or with C++?

We have been unable to get the camera sending the camera information using C++ (seems to hang during the camera initialization) but have it running successfully in both Java and LabVIEW.

umangv620 16-01-2010 15:50

Re: 2010 Camera and vision problems.
 
Has anyone gotten the Camera running in LabView?

RyanN 16-01-2010 19:13

Re: 2010 Camera and vision problems.
 
Quote:

Originally Posted by s133p (Post 896653)
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)

364 is having trouble with theirs. Actually, it sounds like an exact repeat of the problems your team was having.

I don't know the details, but basically the ethernet port lights are off. We've tried a few crossover cables, but none of them are working. The camera works connected to a laptop, and the port works when we connect the router to port 2, so neither the camera or the cRio seems to be broken.

I know we've updated the LabView software and the Dashboard software. The Dashboard update didn't work, so we tried it again, and got it to work.

The last thing I know of is that the cRio is not responding to the Dashboard or something anymore. Something about the Watchdog is stopping.

Anyway, don't quote me on the problems as I wasn't the one messing with it, but I wanted to add another team to the list.

I think we tried everything here. I know this thread was up on the projector the whole time while the programming team tried to sort it out.

Vito364 16-01-2010 19:29

Re: 2010 Camera and vision problems.
 
Quote:

Originally Posted by RyanN (Post 900640)
364 is having trouble with theirs. Actually, it sounds like an exact repeat of the problems your team was having.

I don't know the details, but basically the ethernet port lights are off. We've tried a few crossover cables, but none of them are working. The camera works connected to a laptop, and the port works when we connect the router to port 2, so neither the camera or the cRio seems to be broken.

I know we've updated the LabView software and the Dashboard software. The Dashboard update didn't work, so we tried it again, and got it to work.

The last thing I know of is that the cRio is not responding to the Dashboard or something anymore. Something about the Watchdog is stopping.

Anyway, don't quote me on the problems as I wasn't the one messing with it, but I wanted to add another team to the list.

I am the chief programmer for 364. We have tried all of the suggestions we could find on this post, but we are still having issues. All of the information that Ryan posted is pretty accurate. I tried uninstalling and reinstalling the DS update, but that still didn't solve anything. We are particularly interested in the fact that it seems that the ethernet port on the cRIO doesn't seem to communicate with the camera at all, but we can still communicate with when the camera is connected strait up to a laptop. The error messages in the diagnostics window say that we are experiencing a "44003" error, and the watchdog is cutting out. We can control motors and get feedback, so I know that the dashboard is communicating with the cRIO.

umangv620 16-01-2010 20:15

Re: 2010 Camera and vision problems.
 
Quote:

Originally Posted by Vito364 (Post 900649)
I am the chief programmer for 364. We have tried all of the suggestions we could find on this post, but we are still having issues. All of the information that Ryan posted is pretty accurate. I tried uninstalling and reinstalling the DS update, but that still didn't solve anything. We are particularly interested in the fact that it seems that the ethernet port on the cRIO doesn't seem to communicate with the camera at all, but we can still communicate with when the camera is connected strait up to a laptop. The error messages in the diagnostics window say that we are experiencing a "44003" error, and the watchdog is cutting out. We can control motors and get feedback, so I know that the dashboard is communicating with the cRIO.

We are getting the same error.
I cannot test this till monday, but you might wanna try post 6 of this thread
Hopefully reinstalling the DS update will work, but if it doesnt, this might(post 3)

jerry w 16-01-2010 21:49

Re: 2010 Camera and vision problems.
 
Quote:

Originally Posted by umangv620 (Post 900512)
Has anyone gotten the Camera running in LabView?

I am pleased to report that the out of the box FRC labview code gives us a camera image. Originally, we had two crossover cables in series. :p
when we discovered the problem, the single crossover in series with a normal cable worked just fine. We are painting the target now. By noon tomorrow we hope to have target images.

We have had much experience with setting IP addresses on computers. This is the most likely cause of a system to fail to get an image. I have to threaten students with bodily harm if they try to do wireless before testing with wired LAN. The wireless stuff loves to do its own thing. After we had wired connections successfully, then we did the wireless.

dag0620 18-01-2010 12:14

Re: 2010 Camera and vision problems.
 
I am quite excited about the hopefully better camera workings this year. Wether or we get the target tracking working this year is an anserw i won't know until shipping date, but we intend to use it for tele-opp. On the intial testing of the camera, the vetrans were able to get it to work perfectly fine, however there was a slight delay. I wanted to see if anyone found a way to fix the lag, or are we stuck waiting a few seconds to get the images back. - If the lag is un-fixable, I am interested to see how the drive-teams get around that little obstacle.

TPNigl 18-01-2010 18:49

Re: 2010 Camera and vision problems.
 
We're programming in java and we got the camera hooked up to the cRIO and Dashboard. It recognized the camera by saying "camera running e". However there was no image being fed to the dashboard. The dashboard has already been fixed and the v19 update has already been made. Any suggestions?

s133p 18-01-2010 20:54

Re: 2010 Camera and vision problems.
 
Just a last small update from us, everything seems to be working after trying the uninstall re-install that was recommended. Thank you all for the help!

mobilegamer999 19-01-2010 19:25

Re: 2010 Camera and vision problems.
 
I'm a programmer for rookie team 3357 and we are programming in Java.

When ever we initialize the camera (AxisCamera.getInstance();) our code NEVER works. It displays "Watchdog not fed" and "no robot code". It also hangs on that line. We have updated our drivers station to v19 and done all of the other necessary updates.

Any suggestions?

tdressel 20-01-2010 00:31

Re: 2010 Camera and vision problems.
 
From above:

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:


Could you direct me to the "FRC 2010 Vision Demonstration" program mentioned above? We are having issues getting our camera working as well with C++.

-Ted Dressel, Mentor, Team 1111

Bryscus 20-01-2010 10:00

2010 Camera and Vision Attempted Setup Summary
 
************************************************** ****************************************
**EDIT: PLEASE DON'T REFER TO THIS. REFER TO POST #68 INSTEAD. THERE IS INCORRECT INFORMATION BELOW!**
************************************************** ****************************************

Hi Guys,

Since there’s a wealth of information located in this thread I’m going to try to summarize the steps for getting a working camera setup for C++ (this may still be helpful for those using the other platforms as well). This summary assumes that code can be loaded on the cRio and run. This is specifically for the 2010 Vision Demonstration example.

1. cRio must be reflashed with v19 image.
2. WindRiver should be intstalled with the WPI Lib update (WorkbenchUpdate20100107.exe). Did anyone have to uninstall WindRiver first?
3. The camera should be set up with IP address 192.168.0.90 (which is the default) and a username and password of “root” and “admin” respectively (admin is NOT the default). I understand there are other valid usernames and password combinations as well.
4. The camera should be connected via CROSSOVER cable to Ethernet port 2 on the cRio and adequate power supplied.
5. The driver’s station update should be installed (DSUpdate1.0for2010.zip). This requires installing BOTH components, uninstalling BOTH components and then reinstalling BOTH components again. Apparently the NI loader has issues. ::ouch::
6. Add the “2010 Vision Demonstration Program” to the current workspace and compile. (In WindRiver click File -> New -> Example… -> VxWorks Downloadable Kernel Module Sample Project -> FRC 2010 Vision Demonstration Program -> Finish.) Be sure to use the correct compiled cRio image path located in the FIRST Downloader Preferences section of “Preferences” (Located under Window).
7. Deploy the code. And watch it work!

From the information I can glean from this thread, this should work (and pan and tilt maybe as well if you hook up some servos – my goal is just to get some images first).

Now at this point, us SPAM guys haven’t been able to get it to work (camera/cable work with a computer, but not the cRio), but we didn’t uninstall BOTH of the driver’s station components last night. I’m thinking of just starting from scratch on all of this, so the above is somewhat speculative. Please feel free to make comments or suggestions for additions to the above steps. I know a many people have been going through the same frustrations and I’m trying to alleviate some of the pain. Hope this helps someone!

- Bryce

Bryscus 20-01-2010 10:03

Re: Camera ping questions
 
I've seen in this thread that one can access the console on the cRio using WindRiver and NetConsole. Is it correct for me to assume then, that one can use putty or some other console program as well by connecting a null modem cable between a PC and the cRio? If this is the case, what is the baud rate and other settings?

My first assumption would be a 115200 baud rate 8 - N - 1 with no flow control. Any help would be great. Thanks.

Bryscus 20-01-2010 10:49

Re: 2010 Camera and vision problems.
 
Well, I see now how one can connect to the cRio using an Ethernet based approach, but is there a method to use just a serial cable?

- Bryce

Mark McLeod 20-01-2010 11:25

Re: 2010 Camera and vision problems.
 
Use a null modeum cable
Any terminal emulator program (9600 baud, 8 data bits, 1 stop bit, parity-none, flow control-none)

On the cRIO there is a DIP switch "Console Out" that must be on. I usually leave it on.

Connect up and reset the cRIO to see the startup console dump.

Spacetech 20-01-2010 15:31

Re: 2010 Camera and vision problems.
 
I got it working by changing the username of the camera to FRC and the password to FRC

In Vision/AxisCamera2010.cpp it's using that combo (and only that combo) for the send request
Code:

Authorization: Basic RlJDOkZSQw==
Last years code confirms that the authorization string is FRC, FRC (Vision2009/AxisCamera.cpp)
Code:

"RlJDOkZSQw==",    /* FRC, FRC */

Bryscus 20-01-2010 17:27

Re: 2010 Camera and vision problems.
 
Quote:

Originally Posted by Spacetech (Post 903196)
I got it working by changing the username of the camera to FRC and the password to FRC

In Vision/AxisCamera2010.cpp it's using that combo (and only that combo) for the send request
Code:

Authorization: Basic RlJDOkZSQw==
Last years code confirms that the authorization string is FRC, FRC (Vision2009/AxisCamera.cpp)
Code:

"RlJDOkZSQw==",    /* FRC, FRC */

I'll try that tonight and see if it helps us. I'll try to post again tomorrow if we get everything working. Thanks!

TPNigl 20-01-2010 18:11

Re: 2010 Camera and vision problems.
 
Ok, so we've tried changing the username and password to FRC, but the camera is still not sending any images. It still says "camera running e". We have everything working on the dashboard except the image.

We noticed that when plugged into port 2, the orange light in the port is not flashing, as opposed to the flashing one in port 1. Is there any chance that could signify the problem/a solution?

sdlynx 20-01-2010 19:58

Re: 2010 Camera and Vision Attempted Setup Summary
 
Quote:

Originally Posted by Bryscus (Post 902972)
Hi Guys,

Since there’s a wealth of information located in this thread I’m going to try to summarize the steps for getting a working camera setup for C++ (this may still be helpful for those using the other platforms as well). This summary assumes that code can be loaded on the cRio and run. This is specifically for the 2010 Vision Demonstration example.

<steps>

From the information I can glean from this thread, this should work (and pan and tilt maybe as well if you hook up some servos – my goal is just to get some images first).

Now at this point, us SPAM guys haven’t been able to get it to work (camera/cable work with a computer, but not the cRio), but we didn’t uninstall BOTH of the driver’s station components last night. I’m thinking of just starting from scratch on all of this, so the above is somewhat speculative. Please feel free to make comments or suggestions for additions to the above steps. I know a many people have been going through the same frustrations and I’m trying to alleviate some of the pain. Hope this helps someone!

- Bryce

We tried all of this, and we still doin't get any feed. Also, we manage to keep getting a watchdog not fed error. Both our jaguars are plugged in and connected to motors, along with both joysticks with the drive station. Help?

Bryscus 21-01-2010 09:38

2010 Camera and Vision UPDATED Setup Summary
 
Ok Guys,

Last night we were able to get it working! It appears our major problem was that the camera did not have an ADMINISTRATIVE user with the username "FRC" and password "FRC". When I add this it works, and when I use "root" and "admin" it does not. This seems definitive to me. Also, I don't think it was necessary, but as we were grasping at straws, we installed the FRC LabView update on the Classmate PC (FRCLabVIEWUpdate2.0for2010.zip). If any teams still can't get this to work, this might be the problem. Can anyone who got it to work verify that they didn't have to install this? Also, you shouldn't have to uninstall and reinstall WindRiver because we didn't.

Here are the updated steps below with what we did:

1. cRio must be reflashed with v19 image.

2. WindRiver should be intstalled with the WPI Lib update (WorkbenchUpdate20100107.exe).
**AN UNINSTALL APPEARS UNNECESSARY AS WE DID NOT UNINSTALL.**

3. The camera should be set up with IP address 192.168.0.90 (which is the default) and a username and password of **FRC** and **FRC**, respectively. I understand there **MAY BE** other valid usernames and password combinations as well.
** I PREVIOUSLY STATED THE USERNAME AND PASSWORD AS root AND admin. THIS IS INCORRECT. I KNOW AT LEAST ONE VALID COMBINATION IS "FRC" and "FRC". root AND admin DO NOT WORK!**

4. The camera should be connected via CROSSOVER cable to Ethernet port 2 on the cRio and adequate power supplied. When you plug in the camera, the orange and green lights should stay on (when not sending data) and may blink a couple times, but no rapid blinks (again, when idle).These two lights signify that there is at least a connection between the cRio and camera. They must be on, or you either have a bad cable, or non CROSSOVER cable (the orange one is a crossover cable).

5. The driver’s station update should be installed (DSUpdate1.0for2010.zip). This requires installing BOTH components, uninstalling BOTH components and then reinstalling BOTH components again. Apparently the NI installer has issues.
**IT MAY NOT BE NECESSARY TO UNINSTALL BOTH COMPONENTS. THE OTHER IS FOR THE CYPRESS I/O AND SHOULD NOT BE RELATED TO THE CAMERA. IT MIGHT HOWEVER, AFFECT THE I/O MODULE.**

6. Add the “2010 Vision Demonstration Program” to the current workspace and compile. (In WindRiver click File -> New -> Example… -> VxWorks Downloadable Kernel Module Sample Project -> FRC 2010 Vision Demonstration Program -> Finish.) Be sure to use the correct compiled cRio image path located in the FIRST Downloader Preferences section of “Preferences” (Located under Window).

7. Deploy the code. And watch it work!


I'll try to give a description of what happens after rebooting the cRio using the unmodified 2010 Vision Demo example:

With the dashboard up and running, reprogram the cRio and then reboot. When the dashboard shows that you have three green lights (communications and two others I don't remember), you should be disabled and Ethernet port 2 on the cRio (to which the camera is connected) should have steady lights, orange and green (the orange may blink every now and then). After enabling, not much happens for at least 10 seconds. Referring to the code, there is a wait statement that will wait for 10 seconds to allow the camera to boot. During this time THE WATCHDOG IS NOT FED. So just after enabling and for about 10 seconds afterwards, the watchdog will not be fed. There will be a message that says "Watchdog not fed". After about 12-15 seconds the orange light at Ethernet Port 2 will start flashing rapidly and an image will be displayed. Also, the "Watchdog not fed" message will go away. The green lights at the front of the camera should come on as well to let you know it has an active connection. Also, when you pull the trigger, the camera will track a target. It seems to do a reasonable job, but the frame rate of the image displayed using the unmodified code is pretty horrible.

My hope is that this will help a lot of teams overcome their frustrations. I'll try to answer any questions people might have about this process.

- Bryce

P.S. The caps locked words are not me screaming, but rather trying to point out important information. :rolleyes:

Bryscus 21-01-2010 09:43

Re: 2010 Camera and Vision Attempted Setup Summary
 
Quote:

Originally Posted by sdlynx (Post 903428)
We tried all of this, and we still doin't get any feed. Also, we manage to keep getting a watchdog not fed error. Both our jaguars are plugged in and connected to motors, along with both joysticks with the drive station. Help?

sdlynx,

Please refer to the updated setup summary. The "watchdog not fed" message will appear for about 12-15 seconds and then go away. You might not be waiting long enough.

We also have 1 joystick and multiple jags hooked up (we're still on last years setup).

If you have verified that the camera works using a computer, you should see the orange and green light turn on on Ethernet Port 2 when hooked up to the cRio.

Tech 23-01-2010 11:46

Re: 2010 Camera and vision problems.
 
We switched to "2010ImageDemo" and got our camera working.

Note: You need to wait for the camera lights to come back green after rebooting the robot then enable the robot. About 10 seconds later, the camera stream comes up.

In my personal opinion, this camera setup is a real pain in the you know what. :)

Mr. Lim 23-01-2010 19:12

Re: 2010 Camera and vision problems.
 
Has anyone gotten the camera working in DEBUG mode through Wind River?

We can get it working in both RUN, and when we DOWNLOAD the code, but in DEBUG mode the video feed never comes up.

Even in RUN and DOWNLOAD modes, sometimes it's unreliable. When we make code changes using either of these methods, we must reset the cRIO. After powering the unit back on, the video feed doesn't always come up.

Would love to know if anyone else is experiencing this same behaviour, or if it's just us?

Bryscus 24-01-2010 16:50

Re: 2010 Camera and vision problems.
 
Quote:

Originally Posted by Mr. Lim (Post 905526)
Has anyone gotten the camera working in DEBUG mode through Wind River?

We can get it working in both RUN, and when we DOWNLOAD the code, but in DEBUG mode the video feed never comes up.

Even in RUN and DOWNLOAD modes, sometimes it's unreliable. When we make code changes using either of these methods, we must reset the cRIO. After powering the unit back on, the video feed doesn't always come up.

Would love to know if anyone else is experiencing this same behaviour, or if it's just us?

I don't know about the debug mode, but we also have issues with camera reliability when booting. We can see the code hang in the NetConsole window. Somtimes it instantiates the camera task but doesn't really go anywhere from there.

- Bryce

esquared 25-01-2010 11:57

Re: 2010 Camera and vision problems.
 
Quote:

Originally Posted by Bryscus (Post 906053)
I don't know about the debug mode, but we also have issues with camera reliability when booting. We can see the code hang in the NetConsole window. Somtimes it instantiates the camera task but doesn't really go anywhere from there.

- Bryce

1511 is having the same issue when doing a Debug download. Typically the hang occurs between "starting camera instance" and "getting camera parameters", if you use the 2010ImageDemo example program.

Also, when doing Debug mode with the 2010ImageDemo, the user program will fail to terminate correctly so you can't do multiple debug/run/terminate sessions in a row. The normal FRC tasks terminate correctly, but the CameraTask and PCVideoServer tasks don't die, and result in the robot hanging until a reboot.

--Eric

Mr. Lim 25-01-2010 12:48

Re: 2010 Camera and vision problems.
 
Quote:

Originally Posted by esquared (Post 906492)
1511 is having the same issue when doing a Debug download. Typically the hang occurs between "starting camera instance" and "getting camera parameters", if you use the 2010ImageDemo example program.

Also, when doing Debug mode with the 2010ImageDemo, the user program will fail to terminate correctly so you can't do multiple debug/run/terminate sessions in a row. The normal FRC tasks terminate correctly, but the CameraTask and PCVideoServer tasks don't die, and result in the robot hanging until a reboot.

--Eric

Yep, 1310 sees the exact same issue here as well. For the time being, we've given up on using DEBUG mode now that we have camera code implemented. We're RUNNING the code, and doing a remote target reset through Wind River between each programming cycle.

It's a real pain, but for the time being, I don't see any way around it. I wonder if there could be an issue with how the AxisCamera object is disposed of?

Sean1038 26-01-2010 11:28

Re: 2010 Camera and vision problems.
 
I saw that someone said that the watchdog was not being fed. We had that problem too and it turns out that what we were doing was that we put a camera display image into the teleop front panel to see if we could get a picture that way, but when we took that part out of teleop the watchdog never timed out again.

Lucario231 02-02-2010 20:27

Re: 2010 Camera and vision problems.
 
Hi
I am having trouble with the DS update.
I have tried the the up date and deleted the folders and did everything for it.
When the Classmate restarted the DS newer came up on the driver station for the driver account. Did I do something wrong or did I miss something. Please help.

By the way I am using LabVIEW.

brianelite 08-02-2010 21:35

Re: 2010 Camera and vision problems.
 
I am using 2010 image demo - it seems that this should enable the camera to be displayed in the driver station - am I understanding this correctly?

Currently, however it is not working... just want to make sure I am not wasting my time....

The camera image display says "timeout in cameracommunications"

sometimes the operation will not start because "watch dog not fed" ... sometimes this isn't an issue, however...

edit fixed problem; ds not updated


All times are GMT -5. The time now is 14:45.

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