Go to Post And then, at the end of the match, the drive teams who are being lifted all say at once (in a GOVERNATOR voice)- "GET TO ZE CHOPPER!!!" - Graham Donaldson [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 Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 06-02-2010, 21:07
bsudduth bsudduth is offline
Registered User
None #2751
 
Join Date: Oct 2009
Location: Clemson, SC
Posts: 6
bsudduth is an unknown quantity at this point
AxisCameraException

Like many teams, we too are having trouble getting an image from the camera on the dashboard.

We have updated the driver station (we have the needle gage on the bottom right),

The cRIO has been imaged with v19.

We have updated LabView and have successfully run the Setup Axis Camera utility.

We can instantiate the camera and set the resolution and brightness.

However, whenever we try to execute the getImage() method on the instance of the AxisCamera object, we get the exception shown below.

2 Questions.

1. Is the video feed supposed to display in the dashboard once the getInstance is called?

2. Has anyone else seen/overcome the following exception?


[cRIO] edu.wpi.first.wpilibj.camera.AxisCameraException: No image available
[cRIO] at java.lang.Throwable.<init>(Throwable.java:88)
[cRIO] at java.lang.Throwable.<init>(Throwable.java:102)
[cRIO] at java.lang.Exception.<init>(Exception.java:53)
[cRIO] at edu.wpi.first.wpilibj.camera.AxisCameraException.< init>(AxisCameraException.java:20)
[cRIO] at edu.wpi.first.wpilibj.camera.AxisCamera.getImage(A xisCamera.java:257)
[cRIO] at edu.wpi.first.wpilibj.templates.Lucy.HandleImage(L ucy.java:140)
[cRIO] at edu.wpi.first.wpilibj.templates.Lucy.teleopPeriodi c(Lucy.java:93)
[cRIO] at edu.wpi.first.wpilibj.IterativeRobot.startCompetit ion(IterativeRobot.java:179)
[cRIO] at edu.wpi.first.wpilibj.RobotBase.startApp(RobotBase .java:132)
[cRIO] at javax.microedition.midlet.MIDletTunnelImpl.callSta rtApp(MIDletTunnelImpl.java:60)
[cRIO] at com.sun.squawk.imp.MIDletMainWrapper.main(MIDletMa inWrapper.java:110)
[cRIO] at com.sun.squawk.Klass.main(Klass.java:2997)
[cRIO] at com.sun.squawk.Isolate.run(Isolate.java:1554)
[cRIO] at java.lang.Thread.run(Thread.java:231)
[cRIO] at com.sun.squawk.VMThread.callRun(VMThread.java:1499 )
[cRIO] at com.sun.squawk.VM.callRun(VM.java:305)


Thanks for your help.

Barry Sudduth
Team 2751
Reply With Quote
  #2   Spotlight this post!  
Unread 07-02-2010, 00:43
Kingofl337's Avatar
Kingofl337 Kingofl337 is offline
You didn't see anything....
AKA: Adam
FRC #0501 (Power Knights)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 1998
Location: Manchester, NH
Posts: 861
Kingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond repute
Send a message via Yahoo to Kingofl337
Re: AxisCameraException

You should be getting an image back to your dashboard with just calling
AxisCamera.getInstance();

If thats not working then you have other issues? Are both LEDs lit on the cRio on network port 2? Did create the FRC login on the camera?

Also next time you call

AxisCamera.getInstance.GetImage(); do this

try(){
AxisCamera.getInstance.GetImage();
} catch (Exception e){
System.out.println("Get Image Failed" + e);
}
__________________
FIRST Team 501 PowerKnights - Mentor
FIRST Team 40 Checkmate - Mentor Alum
FIRST Team 146 Blue Lightning - Alumni

Last edited by Kingofl337 : 07-02-2010 at 00:47.
Reply With Quote
  #3   Spotlight this post!  
Unread 09-02-2010, 00:35
bsudduth bsudduth is offline
Registered User
None #2751
 
Join Date: Oct 2009
Location: Clemson, SC
Posts: 6
bsudduth is an unknown quantity at this point
Re: AxisCameraException

The final piece of the puzzle was creating the FRC/FRC account. We now get images. Unfortunately, we are experiencing a lag of 1.5-2.0 seconds. Progress comes in small steps....

Thanks,
Barry Sudduth
Team 2751
Reply With Quote
  #4   Spotlight this post!  
Unread 06-02-2014, 17:38
solopilot solopilot is offline
Mentor
FRC #0293
 
Join Date: Jan 2009
Rookie Year: 2008
Location: PA, USA
Posts: 36
solopilot is a name known to allsolopilot is a name known to allsolopilot is a name known to allsolopilot is a name known to allsolopilot is a name known to allsolopilot is a name known to all
Re: AxisCameraException

Glad that was resolved. I had the same exception but perhaps with a more devious cause. The sample program was working fine, camera.getImage() was working; but my program was not. Pretty much the same code. I found that the imports were different. I had let NetBeans import files as necessary. Things started working when I copied the sequence of imports from the sample program. Weird.
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 12:44.

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