Go to Post But altering register values via bitwise operations in nested ternary commands is so much fun! - artdutra04 [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 17-01-2011, 20:43
CodeMonkeyMatt CodeMonkeyMatt is offline
Registered User
FRC #2605
 
Join Date: Jan 2011
Rookie Year: 2008
Location: WA
Posts: 46
CodeMonkeyMatt is on a distinguished road
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);
...
}
I've also tried changing image to a ColorImage instead of HSLImage, although my understanding of inheritance makes me think that's not at all necessary.

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.
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


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

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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