Go to Post All I ask is that you stay with FIRST. It's a great place to be - Wayne Doenges [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

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 20-01-2014, 18:13
Spencer Logan Spencer Logan is offline
Registered User
FRC #1551
 
Join Date: Jan 2012
Location: Naples
Posts: 2
Spencer Logan is an unknown quantity at this point
Camera not sending images for 7 seconds when enabled

Hello from team 1551. This year we are trying to do some simple vision stuff in autonomous to search for the hot goal. All we want to do is search for a hot goal, and then shoot the ball accordingly, so we hope to only have to run the loop once and not have to deal with a second image processor or anything like that. We are using the Wind River VisionSample2014 example because we are inexperienced with vision and a fairly small team. The only changes we have made to the example code is threshold values adjusted for our camera, and uncommenting the lines that save images to the cRIO. When we run the program, it spits out an error for around 5-7 seconds, and then runs normally. We assume the error is occurring because the camera is not outputting an image, because after the error stops, we can detect hot goals, and use the information to our advantage. We can always see the camera's output in the driver station and in the browser, and only the code is incapable of reading the image for those few seconds. For testing purposes we set the code to stop until it gets an image, just to confirm that there is nothing running in the code that would cause the change, but the error still occurs.

Just for reference, here is the error that is popping up.

>>>>ERROR: status = -1074396154 (0xBFF60406) ImaqThreshold error: ...in ComputeThreshold() in C:/WindRiver/workspace/WPILib/Vision/ColorImage.cpp at line 37

Thanks for any help you can offer
Reply With Quote
  #2   Spotlight this post!  
Unread 20-01-2014, 22:25
thelegend thelegend is offline
Registered User
FRC #1325
 
Join Date: Jan 2013
Location: Canada
Posts: 7
thelegend is an unknown quantity at this point
Re: Camera not sending images for 7 seconds when enabled

We tried using the default code that's in Windriver but that didn't seem to work out for me either.

I recommend you check out RoboRealm for your image processing. This year was the first year our team opted to try out image code and so far with all the experimentation, we found RoboRealm to be the best. It isn't a complicated software to use and its very versatile in its uses. The serial key comes in the Kit of Parts.

Give RoboRealm a couple of days and you'll be fine.
Reply With Quote
  #3   Spotlight this post!  
Unread 22-01-2014, 05:33
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Camera not sending images for 7 seconds when enabled

I don't have much experience with the C++ camera code, but it sounds like the constructor for the camera is trying to communicate to the camera, and the operations are timing out. At one point LabVIEW did this, and the delay was actually that the code was trying to set properties and each had a one second timeout.

Anyway, you may try moving the camera code into your robot init or into disabled code. You can also look at it and see if the timeouts are exposed or if the property sets are really needed.

Greg McKaskle
Reply With Quote
  #4   Spotlight this post!  
Unread 22-01-2014, 05:58
notmattlythgoe's Avatar
notmattlythgoe notmattlythgoe is online now
Flywheel Police
AKA: Matthew Lythgoe
FRC #2363 (Triple Helix)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Newport News, VA
Posts: 1,722
notmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond repute
Re: Camera not sending images for 7 seconds when enabled

Get the instance of the camera in robot init. That way it starts the connection when the robot turns on.
Reply With Quote
Reply


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 14:03.

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