Go to Post They were designed that way so they would be compatible with the water-based ga.... oops, sorry, we aren't supposed to say anything about that. Never mind. - dlavery [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 31-01-2012, 13:11
2869Robotics 2869Robotics is offline
Registered User
FRC #2869
 
Join Date: Jan 2012
Location: Bethpage
Posts: 18
2869Robotics is an unknown quantity at this point
Camera

When I try and run this code, I get the following exception. I am programming in Java, so why does my exception include something relating to WindRiver? I'm trying to store an image on the cRIO and then I plan to retrieve the images using FTP.

AxisCamera cam = AxisCamera.getInstance("192.168.0.90");
cam.getImage().write("image.jpg");


>>>>ERROR: The object is in an incompatible mode: No content-length token found in packet ...in ReadImagesFromCamera() in C:/WindRiver/workspace/WPILib/Vision/AxisCamera.cpp at line 281
[cRIO] Default disabled() method running, consider providing your own
[cRIO] Default disabled() method running, consider providing your own
[cRIO] edu.wpi.first.wpilibj.camera.AxisCameraException: No image available
[cRIO] at edu.wpi.first.wpilibj.camera.AxisCamera.getImage(A xisCamera.java:292)
[cRIO] at edu.wpi.first.wpilibj.templates.RobotTemplate.oper atorControl(RobotTemplate.java:82)
[cRIO] at edu.wpi.first.wpilibj.SimpleRobot.startCompetition (SimpleRobot.java:118)
[cRIO] at edu.wpi.first.wpilibj.RobotBase.startApp(RobotBase .java:156)
[cRIO] in virtual method #10 of javax.microedition.midlet.MIDlet(bci=17)
[cRIO] at javax.microedition.midlet.MIDletTunnelImpl.callSta rtApp(64)
[cRIO] at com.sun.squawk.imp.MIDletMainWrapper.main(110)
[cRIO] in virtual method #95 of com.sun.squawk.Klass(bci=25)
[cRIO] at com.sun.squawk.Isolate.run(1506)
[cRIO] at java.lang.Thread.run(231)
[cRIO] in virtual method #47 of com.sun.squawk.VMThread(bci=42)
[cRIO] in static method #3 of com.sun.squawk.VM(bci=6)
[cRIO] edu.wpi.first.wpilibj.camera.AxisCameraException: No image available
[cRIO] at edu.wpi.first.wpilibj.camera.AxisCamera.getImage(A xisCamera.java:292)
[cRIO] at edu.wpi.first.wpilibj.templates.RobotTemplate.oper atorControl(RobotTemplate.java:82)
[cRIO] at edu.wpi.first.wpilibj.SimpleRobot.startCompetition (SimpleRobot.java:118)
[cRIO] at edu.wpi.first.wpilibj.RobotBase.startApp(RobotBase .java:156)
[cRIO] in virtual method #10 of javax.microedition.midlet.MIDlet(bci=17)
[cRIO] at javax.microedition.midlet.MIDletTunnelImpl.callSta rtApp(64)
[cRIO] at com.sun.squawk.imp.MIDletMainWrapper.main(110)
[cRIO] in virtual method #95 of com.sun.squawk.Klass(bci=25)
[cRIO] at com.sun.squawk.Isolate.run(1506)
[cRIO] at java.lang.Thread.run(231)
[cRIO] in virtual method #47 of com.sun.squawk.VMThread(bci=42)
[cRIO] in static method #3 of com.sun.squawk.VM(bci=6)
[cRIO] edu.wpi.first.wpilibj.camera.AxisCameraException: No image available
[cRIO] at edu.wpi.first.wpilibj.camera.AxisCamera.getImage(A xisCamera.java:292)
[cRIO] at edu.wpi.first.wpilibj.templates.RobotTemplate.oper atorControl(RobotTemplate.java:82)
[cRIO] at edu.wpi.first.wpilibj.SimpleRobot.startCompetition (SimpleRobot.java:118)
[cRIO] at edu.wpi.first.wpilibj.RobotBase.startApp(RobotBase .java:156)
[cRIO] in virtual method #10 of javax.microedition.midlet.MIDlet(bci=17)
[cRIO] at javax.microedition.midlet.MIDletTunnelImpl.callSta rtApp(64)
[cRIO] at com.sun.squawk.imp.MIDletMainWrapper.main(110)
[cRIO] in virtual method #95 of com.sun.squawk.Klass(bci=25)
[cRIO] at com.sun.squawk.Isolate.run(1506)
[cRIO] at java.lang.Thread.run(231)
[cRIO] in virtual method #47 of com.sun.squawk.VMThread(bci=42)
[cRIO] in static method #3 of com.sun.squawk.VM(bci=6)
[cRIO] Default disabled() method running, consider providing your own
Reply With Quote
  #2   Spotlight this post!  
Unread 31-01-2012, 14:07
notmattlythgoe's Avatar
notmattlythgoe notmattlythgoe is offline
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,717
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

You get the windriver error because the java files are actually wrapped C-code. Where is your camera plugged in? And did you do the setup utility so it can create the FRC user?
Reply With Quote
  #3   Spotlight this post!  
Unread 31-01-2012, 16:42
detruby detruby is offline
Dave Truby
AKA: Dave Truby
FRC #4145 (Wolf Pack)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Columbus
Posts: 11
detruby is an unknown quantity at this point
Re: Camera

Follow the directions to change the camera configuration to allow anonymous connections.
Reply With Quote
  #4   Spotlight this post!  
Unread 31-01-2012, 17:56
2869Robotics 2869Robotics is offline
Registered User
FRC #2869
 
Join Date: Jan 2012
Location: Bethpage
Posts: 18
2869Robotics is an unknown quantity at this point
Re: Camera

I plugged the camera into port 2 of the cRIO. I realize that we are supposed to connect it into the router/bridge but I have close to no networking experience. I reset the camera and I manually went into the camera and added a user frc password frc. Would I still need to run the camera setup tool? How would I change the camera config to allow for anonymous connections?
Reply With Quote
  #5   Spotlight this post!  
Unread 31-01-2012, 18:32
cgmv123's Avatar
cgmv123 cgmv123 is online now
FRC RI/FLL Field Manager
AKA: Max Vrany
FRC #1306 (BadgerBOTS)
Team Role: College Student
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Madison, WI
Posts: 2,078
cgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond repute
Re: Camera

Quote:
Originally Posted by 2869Robotics View Post
How would I change the camera config to allow for anonymous connections?
There's a check box on one of the pages. I don't have the camera handy, so I can't confirm where.
__________________
BadgerBOTS Robotics|@team1306|Facebook: BadgerBOTS
2016 FIRST Championship Tesla Division | 2016 Wisconsin Regional Engineering Inspiration Award

2015 FIRST Championship Carson Division | 2015 Wisconsin Regional Chairman's Award

2013 FIRST Championship Curie Division | 2013 Wisconsin Regional Chairman's Award

2012 FIRST Championship Archimedes Division | 2012 Wisconsin Regional Engineering Inspiration Award, Woodie Flowers Finalist Award (Lead Mentor Ben Senson)

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 22:23.

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