|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
|||||
|
|||||
|
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?
|
|
#3
|
|||
|
|||
|
Re: Camera
Follow the directions to change the camera configuration to allow anonymous connections.
|
|
#4
|
|||
|
|||
|
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?
|
|
#5
|
||||
|
||||
|
Re: Camera
There's a check box on one of the pages. I don't have the camera handy, so I can't confirm where.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|