Go to Post When you get a vanity license plate with you team or robot name on it or some other FIRST reference. - Raul [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 20-01-2011, 13:23
gyroscopeRaptor's Avatar
gyroscopeRaptor gyroscopeRaptor is offline
Registered ConfUser
AKA: Mark McGivern
FRC #3633 (Catalyst)
Team Role: College Student
 
Join Date: Dec 2010
Rookie Year: 2011
Location: Albert Lea, MN / Troy, NY
Posts: 360
gyroscopeRaptor has a spectacular aura aboutgyroscopeRaptor has a spectacular aura about
Axis camera setup problem

Team was setting up camera today. We have it configured through the cRIO. When browsing to the camera's IP address while it is connected via ethernet, the camera displays on the page. Then, when we switch to the driver account, we connect it through the cRIO and it displays a white screen on the camera area of the driver panel. cRIO is formatted for c++.

How do we make it actually display video on the driver panel?
Reply With Quote
  #2   Spotlight this post!  
Unread 20-01-2011, 13:33
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 667
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: Axis camera setup problem

Did you include the DashboardDataFormat.cpp/.h code from the examples? You need to include them and it has a function sendVisionData() (or something similar, this is from my memory) that you need to call in your robot loop so it will send the camera data to the dashboard app.
__________________
Reply With Quote
  #3   Spotlight this post!  
Unread 20-01-2011, 13:36
basicxman basicxman is offline
Emily Horsman
FRC #2200 (MMRambotics)
Team Role: Programmer
 
Join Date: Oct 2007
Rookie Year: 2007
Location: Burlington, Ontario
Posts: 971
basicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant future
Send a message via AIM to basicxman Send a message via MSN to basicxman Send a message via Yahoo to basicxman
Re: Axis camera setup problem

Quote:
Originally Posted by gyroscopeRaptor View Post
How do we make it actually display video on the driver panel?
If you take a look at the 2010 Camera Tracking example included in your WindRiver installation, you'll see some camera code.

You basically need to do a few things,
Code:
// In your constructor
AxisCamera &camera = AxisCamera::GetInstance();
camera.WriteResolution(CAMERA_RESOLUTION);
camera.WriteCompression(CAMERA_COMPRESSION);
camera.WriteBrightness(CAMERA_BRIGHTNESS);
camera.WriteMaxFPS(CAMERA_MAX_FPS);
camera.WriteExposureControl(CAMERA_EXPOSURE);
camera.WriteWhiteBalance(CAMERA_WHITE_BALANCE);

// When you want to display a new image.
if (camera.IsFreshImage()) {
  HSLImage *image = camera.GetImage();
}
You can find more sample code at https://github.com/MMRambotics/RetroreflectiveTracking.
Reply With Quote
  #4   Spotlight this post!  
Unread 20-01-2011, 14:16
gyroscopeRaptor's Avatar
gyroscopeRaptor gyroscopeRaptor is offline
Registered ConfUser
AKA: Mark McGivern
FRC #3633 (Catalyst)
Team Role: College Student
 
Join Date: Dec 2010
Rookie Year: 2011
Location: Albert Lea, MN / Troy, NY
Posts: 360
gyroscopeRaptor has a spectacular aura aboutgyroscopeRaptor has a spectacular aura about
Re: Axis camera setup problem

Would these solutions work for the new axis M1011 camera?
Reply With Quote
  #5   Spotlight this post!  
Unread 24-01-2011, 03:33
EdenA EdenA is offline
Programmer & Driver
AKA: Anthony Eden
FRC #1540 (The Flaming Chickens)
 
Join Date: Jan 2009
Rookie Year: 2007
Location: Portland, Oregon
Posts: 10
EdenA is an unknown quantity at this point
Re: Axis camera setup problem

Quote:
Originally Posted by gyroscopeRaptor View Post
Would these solutions work for the new axis M1011 camera?
From my experience with the new camera, WPI lib does not have support this year to change the parameters in the code (WPI lib is that bad this year). that means, you need to adjust the camera parameters by using the camera's web interface, and you won't be able to modify them during the match. In fact, the only way I've been able to stream images with the new camera without causing some sort of cataclysmic crash is by contenting myself with just one line of code:

Code:
AxisCamera &camera = AxisCamera::GetInstance();

Last edited by EdenA : 24-01-2011 at 03:38.
Reply With Quote
  #6   Spotlight this post!  
Unread 24-01-2011, 07:48
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,748
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Axis camera setup problem

I suspect the problem is related to changing parameters while a MJPG stream is underway. There is apparently some code that doesn't deal appropriately with the camera returning an error and no image, and that results in a bad pointer reference.

Hopefully the error handling will be improved, but you may be able to use the API just fine by stopping the MPEG stream, changing the params, and starting it up again.

Greg McKaskle
Reply With Quote
  #7   Spotlight this post!  
Unread 12-02-2011, 09:58
mandrews281 mandrews281 is offline
Registered User
FRC #0281
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Greenville SC
Posts: 82
mandrews281 is a splendid one to beholdmandrews281 is a splendid one to beholdmandrews281 is a splendid one to beholdmandrews281 is a splendid one to beholdmandrews281 is a splendid one to beholdmandrews281 is a splendid one to beholdmandrews281 is a splendid one to behold
Re: Axis camera setup problem

We are having similar data access crashes with our M1011 camera. There appears to be a good information in the RobotPy thread on the same problem:

http://www.chiefdelphi.com/forums/sh...ad.php?t=90687

There is a potential patch up at WPIforge and will require some expertise to re-build the WPILib. I guess I know what I'll be doing at our shop this afternoon.
__________________
Michael Andrews
Team #281 Programming Mentor
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


All times are GMT -5. The time now is 13:00.

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