|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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;
HSLImage *image;
...
BuiltinDefaultCode(void):
camera(AxisCamera::GetInstance())
{
...
image = new HSLImage();
}
...
void TeleopPeriodic(void) {
...
camera.GetImage(image);
image->ThresholdRGB(5, 250, 5, 250, 5, 250);
...
}
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. |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|