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.

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?

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

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,"

%i

%i",GetImage(myImage,NULL));
dprintf(LOG_INFO,"

%i",GetLastVisionError());

}	

};

START_ROBOT_CLASS(SleepingGrandma);