|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#4
|
|||
|
|||
|
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); |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
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 |