![]() |
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 |
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?
|
Re: Camera
Follow the directions to change the camera configuration to allow anonymous connections.
|
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?
|
Re: Camera
Quote:
|
| All times are GMT -5. The time now is 11:36. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi