Go to Post It doesn't matter what goes wrong as long as you have fun. We all thought this was one of our best trips, even though we were second to last in our divison. - afowl [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 14-01-2016, 21:18
MikeF1617 MikeF1617 is offline
Registered User
AKA: Michael Fischler
FRC #1124 (UberBots)
Team Role: Programmer
 
Join Date: Sep 2013
Rookie Year: 2013
Location: United States
Posts: 15
MikeF1617 is an unknown quantity at this point
Exclamation Authentication Failed Axis M1011

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
I found those combinations in the LabVIEW WPIlib vision code. However, none of these fix the error.

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)]
The code getting the camera stream:

Code:
CameraServer srv = CameraServer.getInstance();
		
USBCamera camera = new USBCamera("cam1");
camera.openCamera();
        
srv.setSize(1); // 320x240
srv.startAutomaticCapture(camera);
Does anyone know how to get this working?

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)
Edit: I found how to edit the exposure of the Microsoft Camera using the USBCamera class, but I won't be able to test it until tomorrow. If someone has an answer to this issue it would still be appreciated.

Last edited by MikeF1617 : 14-01-2016 at 21:28. Reason: New Information
  #2   Spotlight this post!  
Unread 14-01-2016, 21:45
Justin Buist Justin Buist is offline
Registered User
FRC #4003 (TriSonics)
Team Role: Mentor
 
Join Date: Feb 2015
Rookie Year: 2015
Location: Allendale, MI
Posts: 22
Justin Buist is an unknown quantity at this point
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");
Hope that helps. I could be wrong.
  #3   Spotlight this post!  
Unread 15-01-2016, 09:06
MikeF1617 MikeF1617 is offline
Registered User
AKA: Michael Fischler
FRC #1124 (UberBots)
Team Role: Programmer
 
Join Date: Sep 2013
Rookie Year: 2013
Location: United States
Posts: 15
MikeF1617 is an unknown quantity at this point
Re: Authentication Failed Axis M1011

Java is odd, so it actually still uses the USBCamera class for IP cameras, but thanks anyways!
  #4   Spotlight this post!  
Unread 15-01-2016, 09:12
Joe Derrick's Avatar
Joe Derrick Joe Derrick is offline
Mentor - Programming
FRC #0319
 
Join Date: Feb 2012
Rookie Year: 2011
Location: Prospect Mountain High School
Posts: 48
Joe Derrick is a glorious beacon of lightJoe Derrick is a glorious beacon of lightJoe Derrick is a glorious beacon of lightJoe Derrick is a glorious beacon of lightJoe Derrick is a glorious beacon of lightJoe Derrick is a glorious beacon of light
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!
__________________
2010-2017 Mentor Team 319
2012 - Rockwell Automation Award Winner
2014 - Xerox Creativity in Engineering Winner, Archimedes Division
2015 - Rockwell Automation and Gracious Proffesionalism Winner, Tesla Division
2016 - North Shore and UNH District Event Winner, Carson Division
http://www.frc319.com
  #5   Spotlight this post!  
Unread 15-01-2016, 20:31
Justin Buist Justin Buist is offline
Registered User
FRC #4003 (TriSonics)
Team Role: Mentor
 
Join Date: Feb 2015
Rookie Year: 2015
Location: Allendale, MI
Posts: 22
Justin Buist is an unknown quantity at this point
Re: Authentication Failed Axis M1011

Quote:
Originally Posted by MikeF1617 View Post
Java is odd, so it actually still uses the USBCamera class for IP cameras, but thanks anyways!
That's weird. I could have sworn we used the AxisCamera class to get to it last year.
  #6   Spotlight this post!  
Unread 15-01-2016, 21:18
Oblarg Oblarg is offline
Registered User
AKA: Eli Barnett
FRC #0449 (The Blair Robot Project)
Team Role: Mentor
 
Join Date: Mar 2009
Rookie Year: 2008
Location: Philadelphia, PA
Posts: 1,108
Oblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond repute
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.
__________________
"Mmmmm, chain grease and aluminum shavings..."
"The breakfast of champions!"

Member, FRC Team 449: 2007-2010
Drive Mechanics Lead, FRC Team 449: 2009-2010
Alumnus/Technical Mentor, FRC Team 449: 2010-Present
Lead Technical Mentor, FRC Team 4464: 2012-2015
Technical Mentor, FRC Team 5830: 2015-2016
  #7   Spotlight this post!  
Unread 15-01-2016, 21:20
RufflesRidge RufflesRidge is offline
Registered User
no team
 
Join Date: Jan 2012
Location: USA
Posts: 989
RufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant future
Re: Authentication Failed Axis M1011

Quote:
Originally Posted by MikeF1617 View Post
I have my code set up to connect to and send camera data to the dashboard.
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   Spotlight this post!  
Unread 15-01-2016, 21:53
Justin Buist Justin Buist is offline
Registered User
FRC #4003 (TriSonics)
Team Role: Mentor
 
Join Date: Feb 2015
Rookie Year: 2015
Location: Allendale, MI
Posts: 22
Justin Buist is an unknown quantity at this point
Re: Authentication Failed Axis M1011

Quote:
Originally Posted by Oblarg View Post
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.
That hasn't been my experience with them. I use about 28 of the Axis M1011 and M1013 for security cameras and I track their uptime with Nagios checking them every 60 seconds. Most of them were at 100% uptime for 2015 if you remove instances where I had the network down for maintenance reasons. I might have 4-5 instances in a year where our weekly drop off the grid to generator power and back again mucks with the camera just right to keep it from coming back on.

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   Spotlight this post!  
Unread 15-01-2016, 22:01
Oblarg Oblarg is offline
Registered User
AKA: Eli Barnett
FRC #0449 (The Blair Robot Project)
Team Role: Mentor
 
Join Date: Mar 2009
Rookie Year: 2008
Location: Philadelphia, PA
Posts: 1,108
Oblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond repute
Re: Authentication Failed Axis M1011

Quote:
Originally Posted by Justin Buist View Post
That hasn't been my experience with them. I use about 28 of the Axis M1011 and M1013 for security cameras and I track their uptime with Nagios checking them every 60 seconds. Most of them were at 100% uptime for 2015 if you remove instances where I had the network down for maintenance reasons. I might have 4-5 instances in a year where our weekly drop off the grid to generator power and back again mucks with the camera just right to keep it from coming back on.

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.
The issues I have had have all been their IP configuration somehow getting screwed up. We lost our camera halfway through last year due to this, with no discernible cause. We were not able to get it working again, despite the aid of several CSA's and multiple hours of dedicated effort.
__________________
"Mmmmm, chain grease and aluminum shavings..."
"The breakfast of champions!"

Member, FRC Team 449: 2007-2010
Drive Mechanics Lead, FRC Team 449: 2009-2010
Alumnus/Technical Mentor, FRC Team 449: 2010-Present
Lead Technical Mentor, FRC Team 4464: 2012-2015
Technical Mentor, FRC Team 5830: 2015-2016
  #10   Spotlight this post!  
Unread 17-01-2016, 16:25
MikeF1617 MikeF1617 is offline
Registered User
AKA: Michael Fischler
FRC #1124 (UberBots)
Team Role: Programmer
 
Join Date: Sep 2013
Rookie Year: 2013
Location: United States
Posts: 15
MikeF1617 is an unknown quantity at this point
Re: Authentication Failed Axis M1011

Quote:
Originally Posted by Justin Buist View Post
That's weird. I could have sworn we used the AxisCamera class to get to it last year.
I didn't know that existed, but I found it (when I looked at the examples which I hadn't done before...).

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)]
But at this point we are just going to use the USB camera.
  #11   Spotlight this post!  
Unread 23-01-2016, 18:56
MikeF1617 MikeF1617 is offline
Registered User
AKA: Michael Fischler
FRC #1124 (UberBots)
Team Role: Programmer
 
Join Date: Sep 2013
Rookie Year: 2013
Location: United States
Posts: 15
MikeF1617 is an unknown quantity at this point
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.
Closed Thread


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 03:55.

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