Go to Post "automated chaos" nuff said. - Jferrante [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 05-12-2009, 21:12
kevin51292 kevin51292 is offline
Registered User
FRC #2753
 
Join Date: Dec 2008
Rookie Year: 2006
Location: Hillsborough, NJ
Posts: 8
kevin51292 is an unknown quantity at this point
Camera Error Number

Hey Guys!!

I've been trying to get the camera up and running, but I've been getting an error when I call GetImage. The error number is 166204. I've searched high and low for what camera error numbers mean and I haven't been able to find anything. So do any of you know what this error means, and possibly how to fix it? Thanks.
  #2   Spotlight this post!  
Unread 07-12-2009, 09:18
DavidGitz's Avatar
DavidGitz DavidGitz is offline
Lead Technical Advisor
FRC #1208 (MeTool Brigade)
Team Role: Coach
 
Join Date: Dec 2006
Rookie Year: 1996
Location: O'Fallon, IL
Posts: 341
DavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud of
Send a message via AIM to DavidGitz Send a message via MSN to DavidGitz Send a message via Yahoo to DavidGitz
Re: Camera Error Number

I assume you are using LV. I can't find anything on that code either. Just to verify, make sure you can ping the Camera. Also, do you get this error code when you Open the Camera Reference as well?
  #3   Spotlight this post!  
Unread 07-12-2009, 21:14
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Camera Error Number

I can't find an error for that number. The LV WPI errors are all in the -44000 range. It could possibly be referring to a notifier or a lower level LV resource that isn't being used properly, but that number doesn't show up as one.

Can you attach the code that produces the error? A picture of the code might reveal the issue, but a VI is even better.

Greg McKaskle
  #4   Spotlight this post!  
Unread 07-12-2009, 21:48
kevin51292 kevin51292 is offline
Registered User
FRC #2753
 
Join Date: Dec 2008
Rookie Year: 2006
Location: Hillsborough, NJ
Posts: 8
kevin51292 is an unknown quantity at this point
Re: Camera Error Number

Hey Guys!!

Thanks for the responses. I am actually using WindRiver this year. I found in the FRCError.h header file that my error number is an initialization error, but I'm still not really sure why I'm getting it. I copied my source code in the bottom of this post, so maybe that will help.

#include <iostream.h>
#include "math.h"

#include "AxisCamera.h"
#include "BaeUtilities.h"
#include "FrcError.h"
#include "TrackAPI.h"
#include "Target.h"
#include "WPILib.h"

#include "Gamepad.h"


int SleepingGrandma_debugFlag = 1;

/**
* This is a demo program showing the use of the color tracking API to track two colors.
* It uses the SimpleRobot class as a base of a robot application that will automatically call your
* Autonomous and OperatorControl methods at the right time as controlled by the switches on
* the driver station or the field controls. Autonomous mode tracks color assuming camera is
* mounted on a gimbal with two servos.
*/

class SleepingGrandma : public IterativeRobot
{
RobotDrive *myRobot; // robot drive system
Joystick *rightStick; // joystick 1 (arcade stick or right tank stick)
Joystick *leftStick; // joystick 2 (tank left stick)
DriverStation *ds; // driver station object
Servo *horizontalServo; // first servo object
Servo *verticalServo; // second servo object

public:
/**
* Constructor for this robot subclass.
* Create an instance of a RobotDrive with left and right motors plugged into PWM
* ports 1 and 2 on the first digital module. The two servos are PWM ports 3 and 4.
* Tested with camera settings White Balance: Flurorescent1, Brightness 40, Exposure Auto
*/


public:
/**
* Constructor for this robot subclass.
* Create an instance of a RobotDrive with left and right motors plugged into PWM
* ports 1 and 2 on the first digital module. The two servos are PWM ports 3 and 4.
* Tested with camera settings White Balance: Flurorescent1, Brightness 40, Exposure Auto
*/
SleepingGrandma(void)
{
ds = DriverStation::GetInstance();
myRobot = new RobotDrive(1, 2, 0.5); // robot will use PWM 1-2 for drive motors
rightStick = new Joystick(1); // create the joysticks
leftStick = new Joystick(2);
// remember to use jumpers on the sidecar for the Servo PWMs
SetDebugFlag ( DEBUG_SCREEN_ONLY ) ;


/* stop the watchdog if debugging */
GetWatchdog().SetExpiration(0.5);
GetWatchdog().SetEnabled(false);
}


void DisabledInit(void)
{
}

void DisabledPeriodic(void)
{
}

void DisabledContinuous(void)
{
}

void AutonomousInit(void)
{
}

void AutonomousPeriodic(void)
{
}

void AutonomousContinuous(void)
{
}

void TeleopInit(void)
{

}

void TeleopPeriodic(void)
{

}

void TeleopContinuous(void)
{
int val = StartCameraTask(10, 0, k160x120, ROT_0);
StartImageSignal(val);
StartImageAcquisition();
Image* myImage = frcCreateImage(IMAQ_IMAGE_RGB);
dprintf (LOG_INFO,"\n\n%i\n\n%i",GetImage(myImage,NULL));
dprintf(LOG_INFO,"\n\n%i",GetLastVisionError());

}
};

START_ROBOT_CLASS(SleepingGrandma);
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Axis Camera Communications Error furiousgeorge Programming 7 18-11-2009 22:02
Camera error message Slick NI LabVIEW 1 25-01-2009 11:34
Axis Camera in C++; code error?? Straberrie Programming 3 22-12-2008 21:52
What's this number 80 in error math? K.Porter Programming 3 25-01-2007 18:28
Camera pointing error? Craig Putnam Programming 14 21-01-2006 02:52


All times are GMT -5. The time now is 01:11.

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