Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   Camera problem in driver station (http://www.chiefdelphi.com/forums/showthread.php?t=90925)

Andrew T. 04-02-2011 16:41

Camera problem in driver station
 
Hey Guys,

I have a problem with the axis m1011 camera. When we enable the robot on the driver station, we get a picture from the camera. But after 5 seconds the camera image stop and we lose connection with the entire robot. We tried everything to fix it, but it still does not work.

We use the AxisCamera &camera = AxisCamera::GetInstance();
and it still doesnt work

Has anyone got the working with the Axis M1011 Camera with windriver.

Can someone please help us generously

Thanks,

Alan Anderson 05-02-2011 08:29

Re: Camera problem in driver station
 
Quote:

Originally Posted by Andrew T. (Post 1015685)
We use the AxisCamera &camera = AxisCamera::GetInstance();
and it still doesnt work

Where did you put that line in the program?

newkidd-sagar 05-02-2011 15:13

Re: Camera problem in driver station
 
Our team put the code right after opening operator control, so not in the while loop. Regardless, when we put it in the while loop we get the same problem.

TomThompson 05-02-2011 21:16

Re: Camera problem in driver station
 
We have had the same problem and are at a loss for what is causing it. If anyone finds a sloution, please let me know.

Austinh100 09-02-2011 12:21

Re: Camera problem in driver station
 
We are having the exact same problem :confused:

2611.Sparky 11-02-2011 17:20

Re: Camera problem in driver station
 
Team 2611 is having the same problem. After 5 seconds of the camera is plugged in, the cRIO apparently crashes: The status light stops blinking, the camera feed stops, and the classmate loses connection. We've tried both Crossover and Straight Ethernet cables, both in port 2 of the cRIO. We've tried having "AxisCamera &camera=AxisCamera::GetInstance();" at the beginning of the program, right after the include line, we've tried putting it in the OperatorControl function, and in the RobotDemo function. Nothing works. Whenever the camera is plugged in and there is code for the camera, the robot crashes. If either one is missing however, it does not crash.

Any help would be amazing!!!

basicxman 12-02-2011 14:15

Re: Camera problem in driver station
 
Quote:

Originally Posted by 2611.Sparky (Post 1020774)
Whenever the camera is plugged in and there is code for the camera, the robot crashes.

Define 'crash', watchdog timeout or full program stop? You should post your full source code.

2611.Sparky 14-02-2011 08:44

Re: Camera problem in driver station
 
Crash means that the status light stops blinking, connections are lost, the camera stops updating, we are unable to deploy a new program even through a different laptop until we restart it by cutting the power.
Here is our code:
Code:

#include "WPILib.h"

AxisCamera &robotCam=AxisCamera::GetInstance();

class RobotDemo : public SimpleRobot
{
        RobotDrive myRobot; // robot drive system
        Joystick stickL; // left joystick
        Joystick stickR; // right joystick

public:
        RobotDemo(void):
                myRobot(1, 2, 3, 4),        // these must be initialized in the same order
                stickL(1),                // as they are declared above.
                stickR(2)
        {
                myRobot.SetExpiration(0.5);
        }

        /**
        * Drive left & right motors for 2 seconds then stop
        */
        void Autonomous(void)
        {
                myRobot.SetSafetyEnabled(false);
                myRobot.Drive(0.5, 0.0);        // drive forwards half speed
                Wait(2.0);                                //    for 2 seconds
                myRobot.Drive(0.0, 0.0);        // stop robot
        }

        /**
        * Runs the motors with tank steering.
        */
        void OperatorControl(void)
        {
                myRobot.SetSafetyEnabled(false);
                while (IsOperatorControl())
                {
                        myRobot.TankDrive(stickR.GetAxis(Joystick::kYAxis), stickL.GetAxis(Joystick::kYAxis));
                        Wait(0.005);                                // wait for a motor update time
                }
        }
};

START_ROBOT_CLASS(RobotDemo);


BotnEyedJoe 14-02-2011 11:18

Re: Camera problem in driver station
 
Sounds like you might want to check out this thread:

http://www.chiefdelphi.com/forums/sh...ad.php?t=90687

While the thread is in the Python forum, it really applies to WPILib, and in the thread there is a pointer to a patch on FIRST Forge which might help you, and directions on how to incorporate it into your copy of WPILib.

team 3311 14-02-2011 23:17

Re: Camera problem in driver station
 
Hey,

I looked over the code that you posted.
All you got that has something with camera on it is this here:
AxisCamera &robotCam=AxisCamera::GetInstance();
Right?

The thing is that I got the same problem like you do and I tried to put this piece of code in at the same position like you did but I'm not even get a picture for one second. It's really weird.

So did you get your program fixed? If yes how?

2611.Sparky 16-02-2011 13:55

Re: Camera problem in driver station
 
Quote:

Originally Posted by BotnEyedJoe (Post 1022626)
Sounds like you might want to check out this thread:

http://www.chiefdelphi.com/forums/sh...ad.php?t=90687

While the thread is in the Python forum, it really applies to WPILib, and in the thread there is a pointer to a patch on FIRST Forge which might help you, and directions on how to incorporate it into your copy of WPILib.

Thanks! The process on that thread works perfect! Thank you!


All times are GMT -5. The time now is 13:31.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi