Go to Post A well-working FIRST robot can be charismatic. People are attracted to it. Teams rally behind it. Little kids stare with wide eyes. Relatives say to their friends "look at what my niece helped invent". This is an awesome thing. - Andy Baker [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
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 13-01-2012, 12:14
TofuRama TofuRama is offline
01000110 01010010 01000011
AKA: Matt
FRC #2484 (Team Implosion)
Team Role: Programmer
 
Join Date: Apr 2011
Rookie Year: 2009
Location: Woods Cross Utah
Posts: 17
TofuRama is an unknown quantity at this point
Can't connect to the camera

We are using C++, the axis 206 camera, and the 8-slot cRIO. We have used the Camera setup tool for a direct connection to the cRIO's second Ethernet port. However, our cRIO can't find it. Below is our code:

Quote:
AxisCamera &camera = AxisCamera::GetInstance();
camera.WriteResolution(AxisCameraParams::kResoluti on_640x480);
camera.WriteBrightness(0);
camera.WriteCompression(20);
We are using a crossover cable and we have been able to connect it directly to a computer and were able to get video feed. The username and password for the camera are:
username: FRC
password: FRC

Whenever we run our code, the diagnostics message window reads:

Quote:
ERROR: S_errno_ECONNREFUSED (0x0000003D): Failed to connect to the camera ...in CreateCameraSocket() in C:/WindRiver/workspace/WPILib/Vision/AxisCameraParams.cpp at line 457
Any ideas?
Reply With Quote
  #2   Spotlight this post!  
Unread 13-01-2012, 12:15
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: Can't connect to the camera

Try using:
AxisCamera &camera = AxisCamera::GetInstance("192.168.0.90");
Reply With Quote
  #3   Spotlight this post!  
Unread 13-01-2012, 13:25
TofuRama TofuRama is offline
01000110 01010010 01000011
AKA: Matt
FRC #2484 (Team Implosion)
Team Role: Programmer
 
Join Date: Apr 2011
Rookie Year: 2009
Location: Woods Cross Utah
Posts: 17
TofuRama is an unknown quantity at this point
Re: Can't connect to the camera

Thanks! We're no longer getting any errors. Also, how do we get the video onto our driver station?
Reply With Quote
  #4   Spotlight this post!  
Unread 13-01-2012, 13:48
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: Can't connect to the camera

Quote:
Originally Posted by TofuRama View Post
Thanks! We're no longer getting any errors. Also, how do we get the video onto our driver station?
The default dashboard is set up to expect the camera at 10.xx.yy.11. To use the camera in the configuration you have it, you will have to install LabVIEW, create a dashboard project, change the camera IP, build the Dashboard and use your new Dashboard.A possibly easier option would be to set up the camera to plug into the robot radio as described on Page 27 of Getting Started with the 2012 FRC Control System.
Reply With Quote
  #5   Spotlight this post!  
Unread 13-01-2012, 13:51
TofuRama TofuRama is offline
01000110 01010010 01000011
AKA: Matt
FRC #2484 (Team Implosion)
Team Role: Programmer
 
Join Date: Apr 2011
Rookie Year: 2009
Location: Woods Cross Utah
Posts: 17
TofuRama is an unknown quantity at this point
Re: Can't connect to the camera

Thanks!
Reply With Quote
  #6   Spotlight this post!  
Unread 13-01-2012, 13:54
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: Can't connect to the camera

Quote:
Originally Posted by TofuRama View Post
Thanks!
If you go with the camera->Robot radio option, you can take the IP back out of your GetInstance call as the robot radio configuration appears to be the new default looking at AxisCamera.cpp and AxisCameraParams.cpp
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 03:06.

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