![]() |
Vision Processing / Networking Problems
I've been fighting the camera since about Thursday, and I'm running out of ideas. It seems that there may also be some networking problems interconnected, but I can't tell which is which anymore. I'll try to document what steps I've taken and what seems to have helped, but feel free to ask me questions and I'll answer as best as I can. (Note: I'm a new member, so my posts may take a while to show up, so feel free to ask for lots of information at a time).
Phase 1: Camera video feed and basic arcade drive code both working. Phase 2: I believe that I added the HSLImage object and attempted to get an image from the camera. Also, we were trying to set up another computer to run Windriver/Driver Station so we could get off the classmate. Both computers are connected in Windriver, but cannot download (this happened on the new computer before the classmate). Classmate is Windows 7, new computer is XP. Phase 3: The next day, problem still persists. FTP was also unable to connect. We tried various combinations of changing IP addresses on the computers, disabling wireless on one or both computers for a time, checking/replugging in the ethernet connections on the robot, and rebooting the robot and computers. Eventually, we got the ability to download again. This problem still crops up every once in a while, but I haven't noticed a definitive pattern, and we do the above dance until it works again. Phase 4: In trying to be able to download, I had commented out the vision code, so I re-added it, piece by piece. Once again, the video feed comes through without a problem, but this time when I add vision processing, there is a new problem. Either the drive/servos do not work and the camera continuously sends back pictures, or the drive/servos work and the camera breaks. When the drive breaks, it sometimes gives us an error message in Windriver and asks if we want to attach the debugger. I cannot remember exactly what the error message said, but it always mentioned one of the vision classes. At least twice, it was "GetImaqImage()" function of ImageBase. This seems to be tied into the vision processing code fairly reliably, but I can't find anything that explains how to do it right. The example in the First Forge document doesn't even compile. We modified the BuiltinDefaultCode example to use an iterative robot. We declare the image with the other objects at the start of the class, and while I don't know if we need to, initialize it in the constructor as well. We then attempt to get an image from the camera in TeleopPeriodic: Code:
AxisCamera& camera;That's about all I can think of. If anyone can help us with our vision or networking problems, or both, or explain how they're interconnected, we would really appreciate it. |
Re: Vision Processing / Networking Problems
I guess my advice is to isolate your problems.
If WR pops up a dialog about investigating a crash, that is a good opportunity to look around for stale pointers, divide by zero, etc. Your code crashed and WR is telling you how. If you have networking problems and can't ftp, use the DS and ping to identify the IP addresses. I'm pretty sure that once ping works to the cRIO, ftp will too. Greg McKaskle |
Re: Vision Processing / Networking Problems
So, I am/was unable to work much on the robot today or tomorrow, but thanks for the quick response. Unless the error is in the vision WPILib, there aren't any obvious bugs like divide by zero. I'm not sure what a stale pointer is, so I suppose that's possible, but I don't think so. I couldn't understand the error, but next time we get it, I'll be sure to post it here. Also, I was recently pointed in the direction of possibly better documentation (haven't had a chance to look into it yet - darn school), so here's hoping that helps.
For now though, I'm taking your advice and trying to isolate the problems. So, we've temporarily taken out the vision code to solve the wireless problems. Can you explain how to use ping to identify IP addresses? I know the form "ping 10.xx.yy.n" but I don't see exactly how that helps. Some of the errors for this reference values with 'n's that I don't recognize, and I've double checked on all the computers to make sure no adapter has that IP set. I believe one of those numbers might have been 21, but not sure. When ping works, FTP does as well, but I don't understand how to use ping to make FTP work. Thanks for your help. |
Re: Vision Processing / Networking Problems
ping will not fix networking problems, but acts as a connectivity test. If you can ping .02 (the cRIO), things should work. If not, can you ping something in the middle? I believe the dlink is .04, so can you ping it? Generally, ping lets you test the links in the chain to see where it is broken.
That is why ping is built into the DS, on the diagnostic tab. The top light tells you if you have a cable connected, the next is I believe the DS router, if used. The next is the bridge, and finally the cRIO. Greg McKaskle |
Re: Vision Processing / Networking Problems
No, I think the D-Link is .01. I may be mistaken but I think the idea of using the D-Link this year is that there is no .04 until you are at competition. At competition, you put the D-Link in bridge mode and the field will provide .04 so that your classmate PC will plug into the field to control your robot. But when you are testing or practicing, you put the D-Link in AP mode so that your laptop can control the robot directly via the D-Link AP. So you can't ping .04. Please correct me if I am wrong because I can't find anything that mentions we need to use last year's Linksys AP/router (which is the .04).
|
Re: Vision Processing / Networking Problems
mikets, you're right in that it is .01, not .04 and that we don't need to use last years router. I haven't looked into the competition format yet, but what you said sounds right.
Greg, the odd thing is that when we are unable to download/ftp (and I don't think we can ping either, though not positive on that), we still have communications on the driver station and can use whatever the last code was on the bot. |
Re: Vision Processing / Networking Problems
Sorry for the incorrect IP.
So, it sounds like the DS works, but the development computer doesn't. Is that right? What is the IP of the dev computer. You can look in the adapter settings under IPV4 in the control panel, or often it is easier to type ipconfig into a command window. Remember that you don't want any two devices with the same IP, or you'll have problems if they are on the network at the same time. Also, if a laptop has wireless and wired ethernet, it actually has two IP addresses, one for each Network Interface Card or NIC. Actually, record the IP for both interfaces on the programming laptop. You should be able to set the programming computer to something like .07 and have it and the DS on at the same time. Greg McKaskle |
Re: Vision Processing / Networking Problems
Thanks for your help.
The DS and development computer in this context are one and the same. I can drive the robot, but not FTP it from the same computer. I am aware that two computers shouldn't have the same IP address, and I know the wired and wireless have different IP's. That's what I was trying to convey with "I've double checked on all the computers to make sure no adapter has that IP set". I've tried combinations of .5, .6, .21, and several other random ones that I can't remember since they were simply high random ones that I was pretty sure weren't in use. The networking problems seems to be working itself out though. I'm not sure why, but I'm not exactly complaining. However, the vision's gotten worse. I can get it to send pictures back (which is what I'm trying to do), but as soon as I try to drive the motors, the camera goes out. Code:
#include "WPILib.h"Edit: Forgot to mention. We opened up the target console in windriver and looked at the processes. When the camera gets knocked out, the "FRC_PCVide>" task gets an error number of 3d0004 if that helps. |
| All times are GMT -5. The time now is 13:36. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi