OCCRA
Go to Post Public Service Announcement: Pressing the spacebar when the robot is enabled isn't nearly as funny the forty-second time. - Taylor [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Events   CD-Media   CD-Spy   FRC-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 01-19-2010, 04:44 PM
ellisk ellisk is offline
Registered User
FRC #1540
 
Join Date: Dec 2008
Location: Vancouver, WA
Posts: 41
ellisk is on a distinguished road
Reinstall of dashboard doesn't fix camera image streaming

I'm trying to get the camera to stream images to the dashboard. Currently, this is what happens:

The code (in C++) looks like this:
Code:
                printf("in operator control\n");
		GetWatchdog().SetEnabled(false);
		AxisCamera &camera = AxisCamera::getInstance();
		camera.writeResolution(k320x240);
		camera.writeBrightness(0);
		printf("Done with camera\n");
		Wait(3.0);
		printf("done waiting\n");
which is at the top of Operator Control. The IP address of the dashboard machine is 10.15.40.5. I have updated the cRIO and also installed the LabView and dashboard updates, as well as the missing DLL.

When I run the code, I get, in the console:
Code:
in operator control
task 0x1de16ff0 (FRC_cameraTask) deleted: errno=0 (0) status=0 (0)
Done with camera
done waiting
After looking at the thread at http://www.chiefdelphi.com/forums/sh...ghlight=camera I uninstalled and then reinstalled the driver station update. This did not resolve my problem.

I can ping the camera from the cRIO's command prompt and I set up the camera using the "Setup Axis Camera" tool.

When I run the program and look at the dashboard, all that I see for the camera is a white screen.

Does anyone have any ideas why it isn't working?

Thanks.
  #2   Spotlight this post!  
Unread 01-19-2010, 05:35 PM
ellisk ellisk is offline
Registered User
FRC #1540
 
Join Date: Dec 2008
Location: Vancouver, WA
Posts: 41
ellisk is on a distinguished road
Re: Reinstall of dashboard doesn't fix camera image streaming

I got it working. The problem, I think, was that I wasn't giving the camera enough time to boot up. A Wait() at the start, or just waiting for the cRIO a while after booting, fixes this.
  #3   Spotlight this post!  
Unread 01-20-2010, 07:04 AM
Greg McKaskle Greg McKaskle is offline
Registered User
no team (Team NI)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 3,952
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: Reinstall of dashboard doesn't fix camera image streaming

Ah. I saw this with a C team last year. If the cRIO boots faster than the camera, you can have the cRIO start pestering the camera for images. The camera is still in the process of booting, and has to spend time processing the images and returning errors. Doing this, meant that the camera wasn't finished booting for ~90 seconds. The solution is to slow down the camera task, especially in the error case. If you don't receive an image from the camera, or on a specific error, sleep for 250 or 500 ms before asking again.

Ideally this would be put into WPILib.

Greg McKaskle
Closed Thread


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can we use the camera image on Dashboard this year? Jon236 Programming 1 01-11-2010 11:52 AM
cRio doesn't re-image Lilszamora FRC Control System 3 02-15-2009 08:06 PM
Camera Config doesn't save! comwiz7 Programming 2 02-20-2006 04:19 PM
Fix-it window and dashboard code changes David Brinza Programming 3 01-28-2005 12:00 AM
Image Discuss: If done. Quick Fix is here CD47-Bot Robot Showcase 2 03-04-2003 07:07 PM


All times are GMT -5. The time now is 06:42 AM.

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


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