Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   Camera Instance Problem (http://www.chiefdelphi.com/forums/showthread.php?t=82314)

Gamer930 10-02-2010 00:13

Camera Instance Problem
 
We are working on trying to get the Camera to work in Windriver C++ I have gone through and it seems our problem is different then others.

DS Version: 2010.01.06.00 (which is update 2 I can see the Gyro Dial on dashboard)
cRIO Image: C-2010_v19

I have included #include "Vision/AxisCamera.h" at the beginning of code.
Followed the instructions on page 58 of 2-2010FRCControl%20System-Getting%20Started-Rev-0.7.pdf

Our problem is when we make an instance of AxisCamera using the following code we get communication to the driver station but says "No Robot Code". If I comment out the GetInstance() line it everything runs perfect.
Code:

                //printf("Getting camera instance\n");
                AxisCamera &camera = AxisCamera::GetInstance();
                //printf("Setting camera parameters\n");
                //camera.WriteResolution(AxisCamera::kResolution_320x240);
                //camera.WriteCompression(20);
                //camera.WriteBrightness(0);
                GetWatchdog().SetEnabled(true);
                while (IsOperatorControl())
                {
                        GetWatchdog().Feed();

Note: I have no other vision code in the code except for what is shown and the include statement at beginning.
We have updated Windriver to "C/C++ Team Update 4.2 2/8/2010"

Zme 10-02-2010 10:14

Re: Camera Instance Problem
 
check the council out it should give you some indication as to whats going on.

you might also want to give the camera some time to boot before you try doing anything with it (once you get this code working that is)

Gamer930 10-02-2010 18:48

Re: Camera Instance Problem
 
1 Attachment(s)
Unresolved Symbols List:
AxisCamera::GetInstance()

is the message I'm getting. . I have tried to put a Wait in front of the GetInstance and everything I try I get the same results. . .

attached is the actual error window

heydowns 11-02-2010 01:33

Re: Camera Instance Problem
 
Quote:

Originally Posted by Gamer930 (Post 917431)
Unresolved Symbols List:
AxisCamera::GetInstance()

is the message I'm getting. . I have tried to put a Wait in front of the GetInstance and everything I try I get the same results. . .

attached is the actual error window

Unresolved symbol means (in this case) that the code implementing the function call (AxisCamera::GetInstance()) is missing (from the WPILib library).

Is this with the most recent WPILib C++ update (02-08)?
We have this problem too, it seems the latest update has some issues in this regard.

See this thread on the official usfirst.org forums for the problem report and description, as well as a workaround, and hopefully an announcement of an updated release in the near future:
http://forums.usfirst.org/showthread.php?t=14573

Gamer930 11-02-2010 09:33

Re: Camera Instance Problem
 
Called NI and they were unaware of any new Library errors . . . They wanted me to change to Labview and download the Labview default code on while I was on Hold. . . .
Did that and everything worked great. .

So there is forsure yet another error in the WPI Default Code/Library by the sounds of things and comments from other teams

Seriously considering just switching back to Labview. . . . We did Labview last year but grew to like Windriver in the off season.

Alan Anderson 11-02-2010 11:45

Re: Camera Instance Problem
 
Quote:

Originally Posted by heydowns (Post 917775)
...it seems the latest update has some issues in this regard.

Those working on the issue seem to think it's a compiler (or perhaps linker) bug that is being brought out by the particular contents of the library. There are workarounds (as mentioned in the thread you linked to), and there will likely be an update that makes the bug stop surfacing.

heydowns 11-02-2010 14:12

Re: Camera Instance Problem
 
Quote:

Originally Posted by Alan Anderson (Post 917935)
Those working on the issue seem to think it's a compiler (or perhaps linker) bug that is being brought out by the particular contents of the library. There are workarounds (as mentioned in the thread you linked to), and there will likely be an update that makes the bug stop surfacing.

That's odd, considering I took the stock WR suite and built the stock WPILib sources (to produce the workaround lib image linked above).

Do you have more details on said bug?

Kyledoo 12-02-2010 07:01

Re: Camera Instance Problem
 
Any idea when the new library will come out?
I removed all of our code that uses DriverStationLCD and we still had the problem.

pafwl 12-02-2010 12:49

Re: Camera Instance Problem
 
I am having that problem too. I installed the update (4.2) to fix my DashboardLCD which worked great but it broke the camera. I removed the camera references and I am good.

I updated the thread we were on so I was hoping that Brad might have seen it.

Right now with all the camera problems it is "dead to me" so I am good. :)

I am planning on using Gyro directions for targetting. More reliable.

If the camera ever gets fixed I may go back but I am working very hard not to.

byteit101 12-02-2010 15:24

Re: Camera Instance Problem
 
did you try rebuilding? [right click project]>Rebuild


All times are GMT -5. The time now is 11:25.

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