Go to Post If this photo doesn't tell us why a photographer is important to a team, I don't know what will. - JaneYoung [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, 00:31
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
cRIO unable to connect to camera

My team is using C++ and we're trying to get our cRIO to communicate with our camera. We have the Axis 206 and an 8-slot cRIO. We have used the axis camera setup tool to set the camera up for going into the second port. We are using a crossover cable and we have been able to get video feed from our computer through a direct connection. Below is our code:

Quote:
AxisCamera &camera = AxisCamera::GetInstance();
camera.WriteResolution(AxisCameraParams::kResoluti on_640x480);
camera.WriteBrightness(0);
camera.WriteCompression(20);
We have also tried passing in the camera's ip address to GetInstance(). Whenever we run our code we get the following error message in the driver station:

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
Right now we don't know what we're doing wrong and we really need help. Thanks in advance!
Reply With Quote
  #2   Spotlight this post!  
Unread 13-01-2012, 23:11
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: cRIO unable to connect to camera

Quote:
Originally Posted by TofuRama View Post
We have also tried passing in the camera's ip address to GetInstance().
What IP address is the camera using? If you want the cRIO to talk to it, the address should be 10.24.84.11.
Reply With Quote
  #3   Spotlight this post!  
Unread 14-01-2012, 01:18
scottbot95 scottbot95 is offline
Registered User
FRC #1388 (Eagle Robotics)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Arroyo Grande, CA
Posts: 46
scottbot95 is an unknown quantity at this point
Re: cRIO unable to connect to camera

Quote:
Originally Posted by Alan Anderson View Post
What IP address is the camera using? If you want the cRIO to talk to it, the address should be 10.24.84.11.
That's only true if It's plugged into the bridge, isn't it? I thought that if you had the Camera plugged straight into the second port on the 8-module models that the IP should be 192.168.0.90.
Reply With Quote
  #4   Spotlight this post!  
Unread 14-01-2012, 07:01
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 588
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
The default IP address for the camera has changed this year from the 192 address using the 2nd Ethernet port to .11 on the team subnet with the camera plugged into the switch. This is because we'd like to encourage all teams to do it consistently so it's easier to help in cases like this and the cRIO II doesn't have a second port.

So try setting the cameras IP address to 10.x.y.11 (x and y are your team number) and plugging it into the switch. Or if you want to leave it in the second port, call AxisCamera::GetInstance with a string parameter of the IP address.

Brad
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
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 13:01.

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