Go to Post For me Gracious Professionalism is about helping other teams make their ideas work. We do everything we can to help other teams program, or lend them parts from our pit. On the field we play to win. - Alpha Beta [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 23-03-2013, 13:50
Negative 9 Negative 9 is offline
Registered User
FRC #0611
 
Join Date: Dec 2012
Location: Mclean, VA
Posts: 46
Negative 9 is an unknown quantity at this point
Getting DS to show camera feed

I'm using an 8 slot cRIO and an M1013 AxisCamera. I ran the AxisCamera configuration utility from the Driver Station and it said the username and password were both successfully changed to FRC.

My code was compiling fine before, but since I added the camera code I haven't been able to compile. The compilation just stalls at
Code:
[cRIO] FPGA Hardware GUID: 0xa14c11bde4bb64aef6a86fc52a294cd9
[cRIO] FPGA Software GUID: 0xa14c11bde4bb64aef6a86fc52a294cd9
The code I added was just constructing it and the compilation just stalls. If I remove the code it works just fine.
Code:
import edu.wpi.first.wpilibj.camera.AxisCamera;
Code:
AxisCamera camera;
Code:
camera = AxisCamera.getInstance();
When I connect the cRIO to the DriverStation and go to the Diagnostic tabs I get repeated error messages saying:
Code:
ERROR: S_errno_EHOSTDOWN(0x00000043): Failed to connect to the camera ...in CreateCameraSocket() in C:/WindRiver/workspace/WPILib/Vision/AxisCameraParams.cpp at line 457
and at sparse intervals it gives this error message as well...
Code:
ERROR: S_errno_EINPROGRESS(0x00000044): Failed to connect to the camera ...in CreateCameraSocket() in C:/WindRiver/workspace/WPILib/Vision/AxisCameraParams.cpp at line 457
Any ideas? Also, what code actually sends the DriverStation the image from the camera? I looked through last year's code and there's nothing that looks like it does. Will it automatically display the image if configured correctly regardless of what's in the code?
Reply With Quote
  #2   Spotlight this post!  
Unread 23-03-2013, 14:05
otherguy's Avatar
otherguy otherguy is offline
sparkE
AKA: James
FRC #2168 (The Aluminum Falcons)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: CT
Posts: 430
otherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to behold
Re: Getting DS to show camera feed

I'm no expert on connecting to the camera through the cRIO, but from the error message, it seems like the code cannot find the camera at the specified IP.

Are you sure you've got the camera at the right IP?

In the past we used something like this:
Code:
AxisCamera.getInstance("10.21.68.11");
The getInstance() method you're using assumes the camera is at 10.x.y.1 by default. Use the version of the method which specifies the IP.

http://team2168.org/javadoc/edu/wpi/...a.lang.String)

If your camera is on cRIO ethernet port 2, the IP should be 192.168.0.90, If it's connected on the ethernet switch, it should be 10.x.y.11
__________________
http://team2168.org
Reply With Quote
  #3   Spotlight this post!  
Unread 23-03-2013, 16:20
Negative 9 Negative 9 is offline
Registered User
FRC #0611
 
Join Date: Dec 2012
Location: Mclean, VA
Posts: 46
Negative 9 is an unknown quantity at this point
Re: Getting DS to show camera feed

Thanks! Now my code compiles, but I'm still not getting a camera feed on the DriverStation

printing camera.freshImage() returns true.

EDIT: Hmmmm... Now it's printing false and I haven't changed anything. Strange.

Last edited by Negative 9 : 23-03-2013 at 16:25.
Reply With Quote
  #4   Spotlight this post!  
Unread 23-03-2013, 21:47
otherguy's Avatar
otherguy otherguy is offline
sparkE
AKA: James
FRC #2168 (The Aluminum Falcons)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: CT
Posts: 430
otherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to behold
Re: Getting DS to show camera feed

Sorry, I may have led you down the wrong path.
If all you're trying to do is get the image to show on the default dashboard, I think you just need to configure your camera correctly.
I could be wrong, but you shouldn't need special code on the cRIO unless you're trying to process images locally on it.

See these links:
http://wpilib.screenstepslive.com/s/...manual-id=8559
http://wpilib.screenstepslive.com/s/...view-dashboard

Sorry I cant be of more help, I don't have any hardware here to test with at the moment and we have used smart dashboard in the past, and it's as simple as adding a widget and pointing it to the right IP:
Getting started w/ smartdashboard
http://wpilib.screenstepslive.com/s/...sion-installer
__________________
http://team2168.org
Reply With Quote
  #5   Spotlight this post!  
Unread 27-03-2013, 18:40
eddie12390's Avatar
eddie12390 eddie12390 is offline
Registered User
AKA: Eddie
FRC #3260 (SHARP)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Pittsburgh
Posts: 285
eddie12390 is a glorious beacon of lighteddie12390 is a glorious beacon of lighteddie12390 is a glorious beacon of lighteddie12390 is a glorious beacon of lighteddie12390 is a glorious beacon of light
Re: Getting DS to show camera feed

Quote:
Originally Posted by Negative 9 View Post
Thanks! Now my code compiles, but I'm still not getting a camera feed on the DriverStation

printing camera.freshImage() returns true.

EDIT: Hmmmm... Now it's printing false and I haven't changed anything. Strange.
I'm not sure if you've solved the problem yet but if you haven't, which dashboard are you using?
__________________
Any post that I make expresses only my opinions. I do not represent the opinions of my team or of any entity affiliated with my team.

As a Mentor:
2016 - Engineering Inspiration at Greater Pittsburgh Regional

As a Driver:
2014 - Winner of Greater Pittsburgh Regional
Reply With Quote
  #6   Spotlight this post!  
Unread 02-04-2013, 12:36
JohnFogarty's Avatar
JohnFogarty JohnFogarty is offline
Trapped under a pile of MECANUMS :P
AKA: @doctorfogarty
FTC #11444 (Garnet Squadron) & FRC#1102 (M'Aiken Magic)
Team Role: Mentor
 
Join Date: Aug 2009
Rookie Year: 2006
Location: SC
Posts: 1,574
JohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond repute
Re: Getting DS to show camera feed

If you're programming in Java I would assume you are using the SmartDashboard...correct?
__________________
John Fogarty
2010 FTC World Championship Winner & 2013-2014 FRC Orlando Regional Winner
Mentor FRC Team 1102 M'Aiken Magic
"Head Bot Coach" FTC Team 11444 Garnet Squadron
Former Student & Mentor FLL 1102, FTC 1102 & FTC 3864, FRC 1772, FRC 5632
2013 FTC World Championship Guest Speaker

Last edited by JohnFogarty : 02-04-2013 at 12:36. Reason: typo.
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:32.

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