Go to Post When your team becomes ubiquitous with the phrase "Always a bridesmaid, never the bride" - Peyton Yeung [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 29-01-2010, 01:02
oddjob oddjob is offline
Registered User
no team
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Earth
Posts: 118
oddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to behold
yet another No Camera Images on Dashboard thread

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.

Code:
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
Code:
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?

Last edited by oddjob : 29-01-2010 at 01:05.
Reply With Quote
  #2   Spotlight this post!  
Unread 29-01-2010, 01:09
Tom Line's Avatar
Tom Line Tom Line is offline
Raptors can't turn doorknobs.
FRC #1718 (The Fighting Pi)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1999
Location: Armada, Michigan
Posts: 2,533
Tom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond repute
Re: yet another No Camera Images on Dashboard thread

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?
Reply With Quote
  #3   Spotlight this post!  
Unread 29-01-2010, 01:17
oddjob oddjob is offline
Registered User
no team
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Earth
Posts: 118
oddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to behold
Re: yet another No Camera Images on Dashboard thread

Quote:
Originally Posted by Tom Line View Post
Have you attempted to deploy the default program supplied with no modifications?

Yes.

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.
Reply With Quote
  #4   Spotlight this post!  
Unread 29-01-2010, 10:29
oddjob oddjob is offline
Registered User
no team
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Earth
Posts: 118
oddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to behold
Re: yet another No Camera Images on Dashboard thread

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.
Reply With Quote
  #5   Spotlight this post!  
Unread 29-01-2010, 12:56
jc4p jc4p is offline
Registered User
AKA: Kasra Rahjerdi
FRC #2412 (Robototes)
Team Role: Alumni
 
Join Date: Feb 2008
Rookie Year: 2008
Location: Bellevue
Posts: 12
jc4p is an unknown quantity at this point
Re: yet another No Camera Images on Dashboard thread

Does the green LED on the secondary ethernet port on the cRIO turn on and stay on when you turn the robot on?
Reply With Quote
  #6   Spotlight this post!  
Unread 29-01-2010, 13:42
sircedric4's Avatar
sircedric4 sircedric4 is offline
Registered User
AKA: Darren
no team (The SS Prometheus)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2006
Location: Lousiana
Posts: 245
sircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond repute
Re: yet another No Camera Images on Dashboard thread

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/sh...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.
Reply With Quote
  #7   Spotlight this post!  
Unread 29-01-2010, 16:28
oddjob oddjob is offline
Registered User
no team
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Earth
Posts: 118
oddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to behold
Re: yet another No Camera Images on Dashboard 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.
Reply With Quote
  #8   Spotlight this post!  
Unread 29-01-2010, 17:27
Rolland0 Rolland0 is offline
Registered User
FRC #1684
Team Role: Programmer
 
Join Date: Sep 2007
Rookie Year: 2008
Location: Michigan
Posts: 3
Rolland0 is an unknown quantity at this point
Re: yet another No Camera Images on Dashboard thread

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).
Reply With Quote
  #9   Spotlight this post!  
Unread 29-01-2010, 18:36
gvarndell's Avatar
gvarndell gvarndell is offline
Software Engineer
AKA: Addi's and Georgie's Dad
FRC #1629 (GaCo)
Team Role: Parent
 
Join Date: Jan 2009
Rookie Year: 2008
Location: Grantsville, Maryland
Posts: 350
gvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond repute
Re: yet another No Camera Images on Dashboard thread

Quote:
Originally Posted by oddjob View Post
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.
Can you show exactly what you added to BuiltinDefaultCode.cpp and some surrounding context?
I'll take a crack at figuring it out.
__________________
Robots never, ever, ever, ever break -- The Robot Repairman (Backyardigans)
Reply With Quote
  #10   Spotlight this post!  
Unread 29-01-2010, 18:44
gvarndell's Avatar
gvarndell gvarndell is offline
Software Engineer
AKA: Addi's and Georgie's Dad
FRC #1629 (GaCo)
Team Role: Parent
 
Join Date: Jan 2009
Rookie Year: 2008
Location: Grantsville, Maryland
Posts: 350
gvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond repute
Re: yet another No Camera Images on Dashboard thread

Quote:
Originally Posted by sircedric4 View Post
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.
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.
__________________
Robots never, ever, ever, ever break -- The Robot Repairman (Backyardigans)
Reply With Quote
  #11   Spotlight this post!  
Unread 29-01-2010, 20:38
oddjob oddjob is offline
Registered User
no team
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Earth
Posts: 118
oddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to behold
Re: yet another No Camera Images on Dashboard thread

Some progress.

I did two things to the code and environment. Go here and do the steps in post #6:

#6

Then add this to the .cpp file:
Code:
#include "Vision\AxisCamera2010.h"
Now I can add this to the code and it compiles:
Code:
AxisCamera *m_camera;
Tomorrow I'll attack the problem of no images going to the dashboard.
Reply With Quote
  #12   Spotlight this post!  
Unread 29-01-2010, 20:53
gvarndell's Avatar
gvarndell gvarndell is offline
Software Engineer
AKA: Addi's and Georgie's Dad
FRC #1629 (GaCo)
Team Role: Parent
 
Join Date: Jan 2009
Rookie Year: 2008
Location: Grantsville, Maryland
Posts: 350
gvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond repute
Re: yet another No Camera Images on Dashboard thread

Quote:
Originally Posted by oddjob View Post
Some progress.

I did two things to the code and environment. Go here and do the steps in post #6:

#6

Then add this to the .cpp file:
Code:
#include "Vision\AxisCamera2010.h"
Now I can add this to the code and it compiles:
Code:
AxisCamera *m_camera;
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.
__________________
Robots never, ever, ever, ever break -- The Robot Repairman (Backyardigans)
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Slow Dashboard Images SOLUTION Radical Pi Control System 17 22-02-2010 12:35
Yet Another Axis Camera Live Feed Issue z2daj FRC Control System 2 24-01-2010 13:47
Yet another Camera thread... Pancake C/C++ 2 26-01-2009 11:42
Yet another bumper thread Vikesrock Technical Discussion 26 19-01-2009 17:04
Yet another dashboard program Neal Probert Programming 3 12-05-2002 10:43


All times are GMT -5. The time now is 03:28.

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