Go to Post Karthik is afraid of the day he can't agasabapathy. - DesignComp [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

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 20-01-2011, 21:08
jault jault is offline
Registered User
FRC #1652 (LakeView Legends)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Lakeview Technology Academy
Posts: 6
jault is an unknown quantity at this point
CAMERA CODE HELP!!

Hey guys i was wondering if anyone knew how to get the camera feed on the dashboard?? the camera worked fine last year with the following code

AxisCamera.getInstance().writeResolution(AxisCamer a.ResolutionT.k320x240);
AxisCamera.getInstance().writeBrightness(0);

but this year it does not work. Whenever this camera code is put onto our robot, nothing happens, and the drive does not work either. it totally kills the code.

any suggestions??

team 1652
Reply With Quote
  #2   Spotlight this post!  
Unread 20-01-2011, 21:21
Robby Unruh's Avatar
Robby Unruh Robby Unruh is offline
*insert random dial-up tone here*
FRC #3266 (Robots R Us)
Team Role: Coach
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Eaton, OH
Posts: 338
Robby Unruh will become famous soon enough
Re: CAMERA CODE HELP!!

Make sure you have

Code:
AxisCamera camera = AxisCamera.getInstance();
in your constructor. Otherwise, you're not actually initializing it.
__________________
[Robots R Us #3266]
2015: Georgia Southern Classic (Winners / Thanks 1319 & 1648!), Queen City
2014: Crossroads, Queen City
2013: Buckeye, Queen City, Crossroads
2012: Buckeye, Queen City

2011: Buckeye
2010: Buckeye
Reply With Quote
  #3   Spotlight this post!  
Unread 21-01-2011, 00:36
dirienzo dirienzo is offline
Registered User
AKA: Nick DiRienzo
FRC #0011 (MORT)
Team Role: Programmer
 
Join Date: Apr 2010
Rookie Year: 2009
Location: USA
Posts: 15
dirienzo is a splendid one to beholddirienzo is a splendid one to beholddirienzo is a splendid one to beholddirienzo is a splendid one to beholddirienzo is a splendid one to beholddirienzo is a splendid one to behold
Re: CAMERA CODE HELP!!

Also, make sure there is an account on the camera with a username of "FRC" and a password of "FRC" (without quotations for each). Apparently you couldn't have a feed without that account last year as well. I just found out, and now we have a working feed. Time for bed now.
Reply With Quote
  #4   Spotlight this post!  
Unread 21-01-2011, 22:46
Mk.32's Avatar
Mk.32 Mk.32 is offline
Registered User
AKA: Mark
FRC #2485 (W.A.R. Lords)
Team Role: Engineer
 
Join Date: Jan 2011
Rookie Year: 2011
Location: San Diego
Posts: 770
Mk.32 has much to be proud ofMk.32 has much to be proud ofMk.32 has much to be proud ofMk.32 has much to be proud ofMk.32 has much to be proud ofMk.32 has much to be proud ofMk.32 has much to be proud ofMk.32 has much to be proud ofMk.32 has much to be proud ofMk.32 has much to be proud of
Re: CAMERA CODE HELP!!

We are also having trouble with getting the camera to show on the dashboard.
For configuring it do we need to change the subnet? or router IP?
__________________
Engineering mentor: Team 2485: WARLords 2013-

Team President: Team 3647 2010-2013
Reply With Quote
  #5   Spotlight this post!  
Unread 21-01-2011, 23:57
mwtidd's Avatar
mwtidd mwtidd is offline
Registered User
AKA: mike
FRC #0319 (Big Bad Bob)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 2003
Location: Boston, MA
Posts: 714
mwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond repute
Re: CAMERA CODE HELP!!

Quote:
Originally Posted by jault View Post
Hey guys i was wondering if anyone knew how to get the camera feed on the dashboard?? the camera worked fine last year with the following code

AxisCamera.getInstance().writeResolution(AxisCamer a.ResolutionT.k320x240);
AxisCamera.getInstance().writeBrightness(0);

but this year it does not work. Whenever this camera code is put onto our robot, nothing happens, and the drive does not work either. it totally kills the code.

any suggestions??

team 1652
make sure the camera is connected.
if the camera is not connected it causes the system to crash.
I ran into this every time i removed the camera from the system.

Quote:
Originally Posted by Mk.32 View Post
We are also having trouble with getting the camera to show on the dashboard.
For configuring it do we need to change the subnet? or router IP?
as was said before, get the Axis Cam utility and add an admin username: FRC pass: FRC.

also check out this response from NI
http://decibel.ni.com/content/docs/DOC-9552
__________________
"Never let your schooling interfere with your education" -Mark Twain
Reply With Quote
  #6   Spotlight this post!  
Unread 22-01-2011, 18:03
sjspry sjspry is offline
Registered User
FRC #1984
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Kansas
Posts: 125
sjspry has a spectacular aura aboutsjspry has a spectacular aura aboutsjspry has a spectacular aura about
Re: CAMERA CODE HELP!!

Also, note that when you call "getInstance" of the AxisCamera, it initializes and returns a class the first time you do this. If you don't capture this class in a variable and keep it "alive" during the whole of your robot's run, it will get garbage collected and the thread it creates to relay information will be killed.

Last edited by sjspry : 22-01-2011 at 18:16.
Reply With Quote
  #7   Spotlight this post!  
Unread 23-01-2011, 10:38
MattD's Avatar
MattD MattD is offline
Registered User
AKA: Matthew Douglas
FRC #0228 (GUS Robotics)
Team Role: Alumni
 
Join Date: Feb 2006
Rookie Year: 2005
Location: Indianapolis, IN
Posts: 185
MattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to behold
Send a message via AIM to MattD
Re: CAMERA CODE HELP!!

Quote:
Originally Posted by sjspry View Post
Also, note that when you call "getInstance" of the AxisCamera, it initializes and returns a class the first time you do this. If you don't capture this class in a variable and keep it "alive" during the whole of your robot's run, it will get garbage collected and the thread it creates to relay information will be killed.
This is not true. AxisCamera.getInstance() will create a new instance of the AxisCamera class and return it the first time it is called. Any time after that, it returns the one instance that it already created. There is no destructor that kills the camera thread, and a reference to the singleton AxisCamera instance is always stored within the AxisCamera class in AxisCamera.m_instance. A call to AxisCamera.getInstance() will always return this instance.

Code:
public class AxisCamera implements ISensor{
    private static AxisCamera m_instance = null;
    
    ...

    public static synchronized AxisCamera getInstance() {
        if (m_instance == null) {
            m_instance = new AxisCamera();
        }
        return m_instance;
    }
The constructor calls the AxisCameraStart function that is part of the C++ library. That function starts up the PCVideoServer. Even if there was destruction of the AxisCamera object, it would not signal this thread to stop.

To get back to the original question:
Make sure the camera is configured per the instructions located here: http://www.usfirst.org/uploadedFiles...our_Camera.pdf

If there is any console output that you see before the program stops, posting that may be helpful.
__________________
GUS Robotics Team 228

2010 WPI Engineering Inspiration Award
2010 WPI Regional Champions (Thanks 230 & 20!)
2010 CT VEX Champions
2010 CT VEX Innovate Award
2009 QCC VEX Champions
2009 CT Motorola Quality Award
2007 CT J&J Sportsmanship Award
2006 CT Best Website Award
Reply With Quote
  #8   Spotlight this post!  
Unread 24-01-2011, 03:25
EdenA EdenA is offline
Programmer & Driver
AKA: Anthony Eden
FRC #1540 (The Flaming Chickens)
 
Join Date: Jan 2009
Rookie Year: 2007
Location: Portland, Oregon
Posts: 10
EdenA is an unknown quantity at this point
Re: CAMERA CODE HELP!!

Don't try to adjust any camera settings from your code. Do all of your setting adjustments by going to the camera's webpage by connecting directly to it with your computer. The reason I say this, is because from my experience this year WPI Lib's camera parameters code is broken and crashes if you try to adjust any parameters.

In other words, try using just one line of code for streaming images from the camera:

Quote:
AxisCamera camera = AxisCamera.getInstance();
we've only had success this year with streaming images from the new camera by doing this.

Last edited by EdenA : 24-01-2011 at 03:41.
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 09:10.

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