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)

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.


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