Go to Post This is definitely the best FRC parody of an FRC parody I have seen. - Jared Russell [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
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
  #5   Spotlight this post!  
Unread 09-02-2011, 16:11
ColonelThrtyTwo's Avatar
ColonelThrtyTwo ColonelThrtyTwo is offline
Registered User
FRC #3676
 
Join Date: Jan 2011
Location: Somewhere in Texas
Posts: 13
ColonelThrtyTwo is an unknown quantity at this point
Re: Camera slowing down robot

Quote:
Originally Posted by kinganu123 View Post
You may want to
1. Run ALL the camera stuff in another thread
I tried doing that first, but it suffered from the same problem. I thought it was because I wasn't writing the thread right, but apparently that is not so.

Quote:
Originally Posted by kinganu123 View Post
2. Hook up the camera directly to the bridge (recommended)
I personally don't how its done (we can't seem to get ours to connect), but I'm fairly certain both are possible
Will try that.

Quote:
Originally Posted by shawkinsl View Post
How does the robot behave when you don't run any camera initializing code? If it is still misbehaving, your issue probably lies somewhere else in your code. (look particularly close at your looped methods.)

I also highly recommend opening a new thread for anything that requires delays (or really handles anything graphical at all -- like images from a camera).
It behaves normally without retrieving the camera instance.

Quote:
Originally Posted by omalleyj View Post
Code:
camera = AxisCamera.getInstance();
camera.writeResolution(AxisCamera.ResolutionT.k160x120);
camera.writeCompression(30);
camera.writeMaxFPS(1);
You are doing the above only once right (e.g. in the init method or a constructor)? Not in a loop? You should be able to run the camera at a much higher frame rate and not even notice. That said, the other suggestion of running directly through the radio (if you don't need to process images) is a good idea. A separate thread should not be necessary if you aren't actually doing any processing, the getInstance() means you are using the camera's own thread anyway.
Yes, just once in the robotInit function, which I know is only running once.

I don't plan on making the main thread do camera work; running it in the main thread was simply to check if the camera was working.

EDIT: By the bridge, do you mean the wireless router, or the cRIO? It was plugged into the cRIO board, and when I connected it to the router, it gave me "[cRIO] AxisCameraParams: connect: S_errno_EHOSTDOWN"

Last edited by ColonelThrtyTwo : 09-02-2011 at 16:38.
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 10:51.

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