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,

Where did you put that line in the program?

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.

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.

We are having the exact same problem :confused:

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!!!

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

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:

#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);

Sounds like you might want to check out this thread:

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.

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?

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