Go to Post FRC: so inspiring, even car thieves can't handle it. - evanperryg [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 04-02-2011, 16:41
Andrew T. Andrew T. is offline
Registered User
FRC #1241
 
Join Date: Nov 2010
Location: Rick Hansen S.S.
Posts: 8
Andrew T. is an unknown quantity at this point
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,
Reply With Quote
  #2   Spotlight this post!  
Unread 05-02-2011, 08:29
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Camera problem in driver station

Quote:
Originally Posted by Andrew T. View Post
We use the AxisCamera &camera = AxisCamera::GetInstance();
and it still doesnt work
Where did you put that line in the program?
Reply With Quote
  #3   Spotlight this post!  
Unread 05-02-2011, 15:13
newkidd-sagar newkidd-sagar is offline
Registered User
FRC #1241
 
Join Date: Jan 2010
Location: Mississauga
Posts: 13
newkidd-sagar is an unknown quantity at this point
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.
Reply With Quote
  #4   Spotlight this post!  
Unread 05-02-2011, 21:16
TomThompson TomThompson is offline
Registered User
FRC #0847
 
Join Date: Jan 2010
Location: Philomath, Oregon
Posts: 23
TomThompson is an unknown quantity at this point
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.
Reply With Quote
  #5   Spotlight this post!  
Unread 09-02-2011, 12:21
Austinh100's Avatar
Austinh100 Austinh100 is offline
Registered User
FRC #3695 (Foximus-Prime)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Yorkville, IL
Posts: 6
Austinh100 is an unknown quantity at this point
Re: Camera problem in driver station

We are having the exact same problem
Reply With Quote
  #6   Spotlight this post!  
Unread 11-02-2011, 17:20
2611.Sparky 2611.Sparky is offline
Registered User
FRC #2611
 
Join Date: Dec 2010
Location: Jackson
Posts: 7
2611.Sparky is an unknown quantity at this point
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!!!
Reply With Quote
  #7   Spotlight this post!  
Unread 12-02-2011, 14:15
basicxman basicxman is offline
Emily Horsman
FRC #2200 (MMRambotics)
Team Role: Programmer
 
Join Date: Oct 2007
Rookie Year: 2007
Location: Burlington, Ontario
Posts: 971
basicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant future
Send a message via AIM to basicxman Send a message via MSN to basicxman Send a message via Yahoo to basicxman
Re: Camera problem in driver station

Quote:
Originally Posted by 2611.Sparky View Post
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.
Reply With Quote
  #8   Spotlight this post!  
Unread 14-02-2011, 08:44
2611.Sparky 2611.Sparky is offline
Registered User
FRC #2611
 
Join Date: Dec 2010
Location: Jackson
Posts: 7
2611.Sparky is an unknown quantity at this point
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);
Reply With Quote
  #9   Spotlight this post!  
Unread 14-02-2011, 11:18
BotnEyedJoe BotnEyedJoe is offline
Mentor
AKA: Joe Hurler
no team
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Rosemont, PA
Posts: 29
BotnEyedJoe is an unknown quantity at this point
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.
Reply With Quote
  #10   Spotlight this post!  
Unread 14-02-2011, 23:17
team 3311 team 3311 is offline
Registered User
FRC #4057 (Klamath Basion Robotics)
Team Role: Leadership
 
Join Date: Dec 2010
Rookie Year: 2008
Location: klamath falls OR.
Posts: 75
team 3311 has a spectacular aura aboutteam 3311 has a spectacular aura about
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?
Reply With Quote
  #11   Spotlight this post!  
Unread 16-02-2011, 13:55
2611.Sparky 2611.Sparky is offline
Registered User
FRC #2611
 
Join Date: Dec 2010
Location: Jackson
Posts: 7
2611.Sparky is an unknown quantity at this point
Re: Camera problem in driver station

Quote:
Originally Posted by BotnEyedJoe View Post
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!
Reply With Quote
Reply


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


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

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