Go to Post Team handbooks - they are like safety glasses... they seem stupid and a pain to wear, and they make it harder to see... but they seem important about 1 msec after a flaming hunk on metal bounces off them. - Not2B [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 25-01-2010, 19:13
Team3256's Avatar
Team3256 Team3256 is offline
Registered User
FRC #3256
 
Join Date: Jan 2010
Location: California
Posts: 8
Team3256 is an unknown quantity at this point
Unhappy aahh! camera help anyone?

greetings from team 3256! programmer here, and I am on the verge of pulling my hair out. please help us and save my hair!

like other numerous threads I have read, we're having camera issues too. I'd like to think I've read through every thread about fixing the camera, but if I did, one would think it'd be fixed by now...-sigh- anyway, would anyone want to lend a helping hand to a rookie team?

here's some stats on what we have so far:
~running C++, the vision 2010 program.
~we've been able to configure ip address for the camera at 10.32.56.7, with FRC::FRC as username:assword
~we can get the camera to work by going through the address in an internet browser when it is hooked up to the computer/router, but when we get it set up in the cRIO, nothing.
~it's safe to assume every program we have is up-to-date (we did the whole driver station uninstall/reinstall thing-y, etc)
~we made sure to have the cross-over cable for the camera hooked up to Ethernet port 2 on the cRIO
~in another forum, I read about a "watch dog not being fed" for the first 12 or so seconds. we get nothing like that.
(~I'm kinda new to C++ too. I'm use to Robot C, not C++, so if you do any programming explanation, feel free to expand on some more complex ideas )

from my point of view, it should be working by now...but it's not...so something's wrong. any help?
  #2   Spotlight this post!  
Unread 25-01-2010, 19:31
Darkknight512 Darkknight512 is offline
Programmer/Electronics
FRC #3375 (North Stars)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Canada
Posts: 26
Darkknight512 is on a distinguished road
Re: aahh! camera help anyone?

I actually just got Team 3375's camera working, This is what I did.

1.Connect the camera to the computer with a crossover cable. Set Computers IP to 192.168.0.91 Subnet Mask to 225.225.225.0 Gateway Blank or 192.168.0.1 (Try both I forget)

2. Run the Axis camera utility thing.

3. Connect the camera back to port 2 with the crossover cable

3. Go into WindRiver and add this to the Initialization part of your program

Put this in your includes
Quote:
#include "vxWorks.h"
#include "Vision/AxisCamera2010.h"
#include "PCVideoServer.h"
Quote:
AxisCamera &camera = AxisCamera::getInstance();
camera.writeResolution(k640x480);
camera.writeBrightness(10);
Here is my whole file so you can't mess up putting the code in the right spot

Quote:
#include "WPILib.h"
#include "vxWorks.h"
#include "Vision/AxisCamera2010.h"
#include "PCVideoServer.h"

class RobotDemo : public SimpleRobot
{
RobotDrive myRobot; // robot drive system
Joystick stick; // only joystick
public:
RobotDemo(void):
myRobot(1, 2), // these must be initialized in the same order
stick(1) // as they are declared above.
{
GetWatchdog().SetExpiration(0.1);
AxisCamera &camera = AxisCamera::getInstance();
camera.writeResolution(k640x480);
camera.writeBrightness(10);
}

void Autonomous(void)
{
GetWatchdog().SetEnabled(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 arcade steering.
*/
void OperatorControl(void)
{
GetWatchdog().SetEnabled(true);
while (IsOperatorControl())
{
GetWatchdog().Feed();
myRobot.ArcadeDrive(stick); // drive with arcade style (use right stick)
Wait(0.005); // wait for a motor update time
}
}
};

START_ROBOT_CLASS(RobotDemo);
4. Reboot the robot

If this doesn't work, make sure your Driver Station has a compass in the bottom right hand corner, if not then reinstall the Driver Station , and that your cRIO is flashed with v19

To do this, just use the Simple Robot template, The camera demonstration thing doesn't work for me.

Another note, the camera feed lags if you select the top window, select the bottom window and the feed is much more "real time"

Question to some of the other teams, My live feed has a light blue line down the middle about 2 pixels wide, I have no idea why its there, probably going to leave it if no one has any ideas because it could help with aiming I guess. Is it intentional?

Last edited by Darkknight512 : 25-01-2010 at 19:45.
  #3   Spotlight this post!  
Unread 25-01-2010, 19:40
ideasrule's Avatar
ideasrule ideasrule is offline
Registered User
FRC #0610 (Coyotes)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Toronto
Posts: 108
ideasrule is a jewel in the roughideasrule is a jewel in the roughideasrule is a jewel in the roughideasrule is a jewel in the rough
Re: aahh! camera help anyone?

Quote:
Originally Posted by Team3256 View Post
~it's safe to assume every program we have is up-to-date (we did the whole driver station uninstall/reinstall thing-y, etc)
We had to manually delete the entire driver station software from C:/Program Files, then install the driver station again, before the feed worked. Perhaps try that?
  #4   Spotlight this post!  
Unread 25-01-2010, 19:44
Team3256's Avatar
Team3256 Team3256 is offline
Registered User
FRC #3256
 
Join Date: Jan 2010
Location: California
Posts: 8
Team3256 is an unknown quantity at this point
Re: aahh! camera help anyone?

for step 1, do you mean set our COMPUTER at 192.168.0.91 or the CAMERA at 192.168.0.91? because if we changed the computer's, wouldn't that affect our connection back to the cRIO?
  #5   Spotlight this post!  
Unread 25-01-2010, 19:47
Darkknight512 Darkknight512 is offline
Programmer/Electronics
FRC #3375 (North Stars)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Canada
Posts: 26
Darkknight512 is on a distinguished road
Re: aahh! camera help anyone?

Quote:
Originally Posted by Team3256 View Post
for step 1, do you mean set our COMPUTER at 192.168.0.91 or the CAMERA at 192.168.0.91? because if we changed the computer's, wouldn't that affect our connection back to the cRIO?
No I mean connect the camera to the router normally, make sure the IP for the camera is set to 192.168.0.90 (Just select Static IP in the settings) then connect the camera to the computer with a crossover cable, set the computer ip to 192.168.0.91, set the subnet mask to 225.225.225.0 and run the AXIS config utility on the desktop. It should read successful. Then go on to step 2.
  #6   Spotlight this post!  
Unread 25-01-2010, 19:58
Team3256's Avatar
Team3256 Team3256 is offline
Registered User
FRC #3256
 
Join Date: Jan 2010
Location: California
Posts: 8
Team3256 is an unknown quantity at this point
Re: aahh! camera help anyone?

mkay, the AXIS config utility is the one with the same icon as the cRIO imaging tool right? or the one from the CD?

and do we put or computer back at the original IP address or leave as is?
  #7   Spotlight this post!  
Unread 25-01-2010, 19:59
Darkknight512 Darkknight512 is offline
Programmer/Electronics
FRC #3375 (North Stars)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Canada
Posts: 26
Darkknight512 is on a distinguished road
Re: aahh! camera help anyone?

Quote:
Originally Posted by Team3256 View Post
mkay, the AXIS config utility is the one with the same icon as the cRIO imaging tool right? or the one from the CD?

and do we put or computer back at the original IP address or leave as is?
The one with the same icon as the cRIO imaging tool

I think the Driverstation will reset the ip when it starts, just restart the program if not then,
Put your IP back to what the driver station set it to. (10.xx.yy.5 or 10.xx.yy.6 not sure which one)
  #8   Spotlight this post!  
Unread 25-01-2010, 20:09
ProgrammerMike7 ProgrammerMike7 is offline
Registered User
AKA: Mike
FRC #2200 (MMRambotics)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Canada
Posts: 13
ProgrammerMike7 will become famous soon enoughProgrammerMike7 will become famous soon enough
Re: aahh! camera help anyone?

Hi, we have been having the same problem you have been having but I have recently fixed this. I posted detailed step-by-step instructions in this thread: http://www.chiefdelphi.com/forums/sh...ghlight=camera.

I hope this helps getting your camera up and running.

-Mike and Team 2200
__________________
Wait (-1)
  #9   Spotlight this post!  
Unread 25-01-2010, 20:19
Team3256's Avatar
Team3256 Team3256 is offline
Registered User
FRC #3256
 
Join Date: Jan 2010
Location: California
Posts: 8
Team3256 is an unknown quantity at this point
Re: aahh! camera help anyone?

arrgh it was to no avail...we even tried threatening harm to the computer and it still didn't work. any other suggestions?
  #10   Spotlight this post!  
Unread 25-01-2010, 20:21
Darkknight512 Darkknight512 is offline
Programmer/Electronics
FRC #3375 (North Stars)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Canada
Posts: 26
Darkknight512 is on a distinguished road
Re: aahh! camera help anyone?

Quote:
Originally Posted by Team3256 View Post
arrgh it was to no avail...we even tried threatening harm to the computer and it still didn't work. any other suggestions?
Did you use my code exactly (I posted a copy/paste of my current robot code)? And find a way to verify that the code made it all the way to the robot, mine didn't ACTUALLY upload for half the evening today. Be sure to reboot the robot, the new code doesn't take effect until a reboot.
  #11   Spotlight this post!  
Unread 25-01-2010, 20:25
Team3256's Avatar
Team3256 Team3256 is offline
Registered User
FRC #3256
 
Join Date: Jan 2010
Location: California
Posts: 8
Team3256 is an unknown quantity at this point
Re: aahh! camera help anyone?

do you know any way to check if it made it to the robot?
  #12   Spotlight this post!  
Unread 25-01-2010, 20:32
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: aahh! camera help anyone?

Quote:
Originally Posted by Team3256 View Post
~we've been able to configure ip address for the camera at 10.32.56.7, with FRC::FRC as username:assword
The cRIO code expects to find the camera at IP address 192.168.0.90 (its default). Where did you pull the 10.x.y.7 number from?
  #13   Spotlight this post!  
Unread 25-01-2010, 20:36
Team3256's Avatar
Team3256 Team3256 is offline
Registered User
FRC #3256
 
Join Date: Jan 2010
Location: California
Posts: 8
Team3256 is an unknown quantity at this point
Re: aahh! camera help anyone?

Quote:
Originally Posted by Alan Anderson View Post
The cRIO code expects to find the camera at IP address 192.168.0.90 (its default). Where did you pull the 10.x.y.7 number from?
we found somewhere in directions to change it to 10.x.y.z, z being whatever wasn't taken.
we changed it back to 192.168.0.90 though.
Closed Thread


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Is anyone using the Camera? GillSt.Bernards General Forum 19 05-03-2009 21:52
improvements to demo camera code anyone windell747 NI LabVIEW 13 06-02-2009 21:22
Can anyone sell us their camera?? Athenian Roboti Kit & Additional Hardware 2 20-02-2006 07:16
For anyone who doesn't get the camera code..... Jake M Programming 8 16-01-2006 18:56
Camera Help (New to Camera Programming) Idaman323 Programming 6 14-01-2006 03:56


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

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