Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Technical Discussion (http://www.chiefdelphi.com/forums/forumdisplay.php?f=22)
-   -   aahh! camera help anyone? (http://www.chiefdelphi.com/forums/showthread.php?t=81122)

Team3256 25-01-2010 19:13

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

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::password
~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?

Darkknight512 25-01-2010 19:31

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?

ideasrule 25-01-2010 19:40

Re: aahh! camera help anyone?
 
Quote:

Originally Posted by Team3256 (Post 906776)
~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?

Team3256 25-01-2010 19:44

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?

Darkknight512 25-01-2010 19:47

Re: aahh! camera help anyone?
 
Quote:

Originally Posted by Team3256 (Post 906799)
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.

Team3256 25-01-2010 19:58

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?

Darkknight512 25-01-2010 19:59

Re: aahh! camera help anyone?
 
Quote:

Originally Posted by Team3256 (Post 906806)
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)

ProgrammerMike7 25-01-2010 20:09

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

Team3256 25-01-2010 20:19

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?

Darkknight512 25-01-2010 20:21

Re: aahh! camera help anyone?
 
Quote:

Originally Posted by Team3256 (Post 906820)
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.

Team3256 25-01-2010 20:25

Re: aahh! camera help anyone?
 
do you know any way to check if it made it to the robot?

Alan Anderson 25-01-2010 20:32

Re: aahh! camera help anyone?
 
Quote:

Originally Posted by Team3256 (Post 906776)
~we've been able to configure ip address for the camera at 10.32.56.7, with FRC::FRC as username::password

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?

Team3256 25-01-2010 20:36

Re: aahh! camera help anyone?
 
Quote:

Originally Posted by Alan Anderson (Post 906835)
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.


All times are GMT -5. The time now is 14:40.

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