We have configured the user accounts and IP of the camera. The dashboard is the right one with a compass in the lower right, no thanks to the installer that doesn’t work. The Windriver and dashboard PC has 10.xx.yy.6 IP and the driver station is running on the classmate at 10.xx.yy.5, set to remote dashboard at 10.xx.yy.6. We can build CameraToDashboardExample and run it. In the console we have confirmation that the ImageServer is starting (or whatever it is called, I won’t be using the cRIO again until Saturday). Tried toggling the green button below the image window in the dashboard. Not a single frame comes through. What to try next? I can post the exact console messages on Saturday.
A separate issue: created a new program that won’t compile due to inclusion of AxisCamera.
class TeamRobot : public IterativeRobot
{
DriverStation *ds;
RobotDrive *drive;
Joystick *TMjoystick;
AxisCamera *camera; // this is line 26
public:
TeamRobot(void)
{
ds = DriverStation::GetInstance();
drive = new RobotDrive(1, 3, 2, 4);
TMjoystick = new Joystick(1); // create the joystick
camera = AxisCamera::getInstance(); // create the camera
camera->writeResolution(k320x240);
camera->writeBrightness(0);
...
The compile error message is
C:/windriver/workspace/TeamRobot/TeamRobot.cpp:26: error: ISO C++ forbids declaration of `AxisCamera' with no type
C:/windriver/workspace/TeamRobot/TeamRobot.cpp:26: error: expected `;' before '*' token
If I remove all camera lines of code, it compiles fine. Now what?
Ok - I’m probably going to put my foot in my mouth since I haven’t played with the C++ implementation or the Java either, but with labview you actually need to deploy the default framework (which includes the camera code) to the Crio before seeing any pictures on the dashboard.
Have you attempted to deploy the default program supplied with no modifications?
Except there may have been some include file edits needed to get the example to compile. One of the camera examples needed some edits. We can’t get any images on the dashboard running CameraToDashboardExample. The cRIO has been imaged to C++ v19. We can run a mecanum drive program that doesn’t include any camera code.
I tried adding AxisCamera to a new “BuiltinDefaultCode” project and it compiles with no errors, so there is something busted in our robot project. We’ll fix it by copying our robot code into the new project and move on. It would be nice to know what’s broken, but the clock is running.
We have had that exact same problem! Our installer didn’t work either and we had to manually install everything and we also had troubles with the AxisCamera compiling. We got that same error code.
We did what jhersh recommended in another thread, and removed the files from the demo folder. (The thread was: http://www.chiefdelphi.com/forums/showthread.php?t=80970&page=2) We did as they suggested and still were having the same problem. We finally started a new example based on the new 2010ImageDemo and just blew away the *.cpp files and copied our *.cpp files into the project. That allowed the program to compile with the AxisCamera code but we still aren’t getting images.
To top it off, whenever we have the AxisCamera active, the robot acts extremely flaky. We don’t get images, and in addition we are getting intermittent communications and both the communications and robot code lights on the dashboard flash red and green. If we move the robot, it stops and goes and stops and goes. This only happens if we call the AxisCamera code.
I’ve had nothing but trouble with the code since we’ve started. I believe this weekend I am going to change development computers completely or blow away everything I have from all years of robotics. I think there’s just too much to fight if your update installer doesn’t work properly and if you have Windriver from last year. (I moved our last year Windriver to another directory and have this years in the default directory, but it doesn’t seem to help)
I think it is complete garbage that I have to have a brand new computer each year that’s never seen Windriver, but its the only think I can think of to stop having everything we code a battle.
I hope someone helps you with your problem because it will solve ours as well, so I’ll be watching this thread.
Today I installed all the tools on a new PC, plus the patches/updates. Loaded the example code BuiltinDefaultCode and it compiles. Tried CameraToDashboardExample and that compiles.
Then add “AxisCamera *camera;” to BuiltinDefaultCode.cpp and it doesn’t compile, same error as before.
Anybody got some magic dust to sprinkle on my PC? Just getting it to compile with a camera object is turning into an epic, and then more than likely, I still won’t get images to the dashboard. Much of the delivered code is of a high standard and problem free, but this C++ camera stuff is not ready for prime time.
Regarding the separate issue in the original post, are you including “Vision/AxisCamera2010.h” and/or “WPILib.h”? Regarding the camera, have you run the axis camera setup tool? Our camera didn’t work until we did that (but I don’t know if it was relevant).
By chance, have you, as I did originally, skipped installing the LabView DVD – thinking it wasn’t needed if you were just going to use C++?
Earlier this week, I went back and installed the LabView software (painful exercise that was) and it has helped enormously.
One would not intuitively assume the need to do this.
But it seems to be requisite to success with Wind River C++ development.
AxisCamera.h is only already included in a handful .cpp files (BuiltinDefaultCode.cpp is not one of them) and not in any other .h files – not even WPILib.h.
So, yes, you needed to explicitly add the ‘#include’.
I think somebody pointed that out to you in another post.