|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I have my code set up to connect to and send camera data to the dashboard. I had it working with the Microsoft LifeCam HD-3000, but when I set it up with an Axis M1011 (since I wanted manual control of exposure and other settings) I got authentication errors. We are programming our robot in Java this year, but in previous years we used LabVIEW. I remember fixing this by setting the camera to either a username/password combo of one of the following:
Code:
FRC, FRC root, pas root, admin This is the error: Code:
ERROR Unhandled exception: VisionException [com.ni.vision.VisionException: IMAQdxError: -1074360268: The camera is configured with password authentication and either the user name and password were not configured or they are incorrect.] at [com.ni.vision.NIVision._IMAQdxConfigureGrab(Native Method), com.ni.vision.NIVision.IMAQdxConfigureGrab(NIVision.java:30265), edu.wpi.first.wpilibj.vision.USBCamera.startCapture(USBCamera.java:94), edu.wpi.first.wpilibj.CameraServer.startAutomaticCapture(CameraServer.java:187), org.usfirst.frc.team1124.robot.DashboardConnection.initCamera(DashboardConnection.java:16), org.usfirst.frc.team1124.robot.Robot.robotInit(Robot.java:40), edu.wpi.first.wpilibj.IterativeRobot.startCompetition(IterativeRobot.java:72), edu.wpi.first.wpilibj.RobotBase.main(RobotBase.java:241)] Code:
CameraServer srv = CameraServer.getInstance();
USBCamera camera = new USBCamera("cam1");
camera.openCamera();
srv.setSize(1); // 320x240
srv.startAutomaticCapture(camera);
Also: When I set it to allow viewing without password (from the axis config page) the Java code spams out this error: Code:
Error when getting image from the camera: IMAQdxError: -1074360306: No acquisition in progress. at edu.wpi.first.wpilibj.CameraServer.capture(CameraServer.java:222) edu.wpi.first.wpilibj.CameraServer$2.run(CameraServer.java:192) java.lang.Thread.run(Thread.java:745) Last edited by MikeF1617 : 01-14-2016 at 09:28 PM. Reason: New Information |
|
#2
|
|||
|
|||
|
Re: Authentication Failed Axis M1011
The AXIS M1011 isn't a USB camera so I suspect the problem is right around here:
Code:
USBCamera camera = new USBCamera("cam1");
|
|
#3
|
|||
|
|||
|
Re: Authentication Failed Axis M1011
Java is odd, so it actually still uses the USBCamera class for IP cameras, but thanks anyways!
|
|
#4
|
||||
|
||||
|
Re: Authentication Failed Axis M1011
Try building the Example project,
In Eclipse it can be found in File-> New Project> Example Robot Project -> Vision -> Axis Camera Sample In order for it to work you must follow the setup instructions here http://wpilib.screenstepslive.com/s/...an-axis-camera Best of luck! |
|
#5
|
|||
|
|||
|
Re: Authentication Failed Axis M1011
That's weird. I could have sworn we used the AxisCamera class to get to it last year.
|
|
#6
|
|||
|
|||
|
Re: Authentication Failed Axis M1011
I would advise against using the Axis netcam. It has a nasty habit of deciding to stop working for without warning for nebulous reasons. If you can use a USB camera instead, do so.
|
|
#7
|
|||
|
|||
|
Re: Authentication Failed Axis M1011
Why are you trying to use the CameraServer to stream data from the Ethernet camera to the dashboard? The Dashboard can connect directly to the camera and save you a lot of roboRIO CPU cycles.
|
|
#8
|
|||
|
|||
|
Re: Authentication Failed Axis M1011
Quote:
In short: If you keep them powered up they keep trucking. I have seen one of them flake out after 3 years of service though. Some days it would work and some not. |
|
#9
|
|||
|
|||
|
Re: Authentication Failed Axis M1011
Quote:
|
|
#10
|
|||
|
|||
|
Re: Authentication Failed Axis M1011
Quote:
When I set it up I got another error: Code:
ERROR Unhandled exception: VisionException [com.ni.vision.VisionException: imaqError: -1233721680: Unknown error] at [com.ni.vision.NIVision._Priv_ReadJPEGString_C(Native Method), com.ni.vision.NIVision.Priv_ReadJPEGString_C(NIVision.java:29329), edu.wpi.first.wpilibj.vision.AxisCamera.getImage(AxisCamera.java:113), org.usfirst.frc.team1124.robot.dashboard.DashboardConnection.initCamera(DashboardConnection.java:28), org.usfirst.frc.team1124.robot.Robot.robotInit(Robot.java:70), edu.wpi.first.wpilibj.IterativeRobot.startCompetition(IterativeRobot.java:72), edu.wpi.first.wpilibj.RobotBase.main(RobotBase.java:241)] |
|
#11
|
|||
|
|||
|
Re: Authentication Failed Axis M1011
Note to anyone who has this error in the future:
The axis camera only works when the robot is enabled, so only execute camera.getImage() when the robot is enabled. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|