Go to Post We are just here to give back to a program that gave us so much as students. - Alex Cormier [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 17-01-2011, 18:53
team2491 team2491 is offline
Registered User
FRC #2491
 
Join Date: Dec 2008
Location: Minnesota
Posts: 14
team2491 is an unknown quantity at this point
Axis Camera Freezes

We're working with C++; not sure if this is relevant, or even if it's a programming issue, but about five seconds after our camera starts sending images, it freezes, sometimes coming back on a few minutes later (if so, it generally works from that point on). We're not really doing anything with the camera in our current version of the code, just letting it get sent to the Camera Image window in the driver station. The relevant code is as follows:


AxisCamera &camera = AxisCamera::GetInstance();
camera.WriteResolution(AxisCamera::kResolution_320 x240);
camera.WriteCompression(20);
camera.WriteBrightness(0);

Help?

  #2   Spotlight this post!  
Unread 17-01-2011, 19:10
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,756
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 Freezes

The images from the camera are read on port 2 and written on port 1, requiring a task or thread to do the transfer. If your program loads up the cRIO sufficiently, it may be that the task is starved and doesn't send the images. I suppose another symptom of this would be that when it comes back, it will be lagged by several seconds.

This year, the rules and electronics allow for the camera to be directly connected to the external switch, and to allow the images to be read directly from the dashboard. You may want to investigate as it frees up some amount of cRIO CPU and should have less lag.

Greg McKaskle
  #3   Spotlight this post!  
Unread 22-01-2011, 20:52
TomThompson TomThompson is offline
Registered User
FRC #0847
 
Join Date: Jan 2010
Location: Philomath, Oregon
Posts: 23
TomThompson is an unknown quantity at this point
Re: Axis Camera Freezes

We are having a similar problem with the Axis 1011 camera. We have tried using only the minimum camera code, resetting the camera and reimaging the cRio. We can run the axis 206 camera just fine, but as soon as we switch cameras the problem continues. We don't have a spare Axis 206 so we wanted to have one of our cameras as a spare. We do anticipate processing images so connecting directly to the D-Link would not be an option. Would appreciate any help. We are using C++.
  #4   Spotlight this post!  
Unread 22-01-2011, 22:13
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,756
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 Freezes

Have you configured the 1011 to have the FRC account? Does it work with NI Vision Assistant?

Greg McKaskle
  #5   Spotlight this post!  
Unread 22-01-2011, 23:15
TomThompson TomThompson is offline
Registered User
FRC #0847
 
Join Date: Jan 2010
Location: Philomath, Oregon
Posts: 23
TomThompson is an unknown quantity at this point
Re: Axis Camera Freezes

It does have the FRC account. Haven't tried it with NI Vision Assistant, but the camera will send images to a laptop if connected directly to the laptop. When connected through the cRio, as the initial post mentioned, we get about 5 seconds of video on the driver station and then the cRio crashes. We were thinking there might be some problem with exceeding a buffer or something, but don't know where to begin with that. Another, possibly unrelated issue, is that we can't seem to reset the image size through C++. The Axis 206 sends a smaller image than the axis 1011 according to information on the driver station, but attempts to change that in software have failed.
  #6   Spotlight this post!  
Unread 26-01-2011, 00:44
TomThompson TomThompson is offline
Registered User
FRC #0847
 
Join Date: Jan 2010
Location: Philomath, Oregon
Posts: 23
TomThompson is an unknown quantity at this point
Re: Axis Camera Freezes

Based on some other threads in the forum, we have tried a few other ideas to get the axis 1011 camera to work. We went into the camera and set the resolution to the lowest possible value, removed compression, and lowered the frame rate. None of those settings had any impact on the problem. We still get a few seconds of feed to the dashboard and the cRio crashes. Forgot to get a screen capture on the error, but will try to do that tomorrow. Someone in the forum suggested that the WPILib code for the camera doesn't work for the axis 1011. Is there any confirmation of that, or should be continue to troubleshoot. We are just about out of ideas.
  #7   Spotlight this post!  
Unread 26-01-2011, 02:07
RoboMaster's Avatar
RoboMaster RoboMaster is offline
Alum, former programmer&co-captain
FRC #2472 (The Centurions)
Team Role: Mentor
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Minnesota, Twin Cities
Posts: 268
RoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant future
Re: Axis Camera Freezes

Quote:
Originally Posted by Greg McKaskle View Post
The images from the camera are read on port 2 and written on port 1, requiring a task or thread to do the transfer. If your program loads up the cRIO sufficiently, it may be that the task is starved and doesn't send the images. I suppose another symptom of this would be that when it comes back, it will be lagged by several seconds.

This year, the rules and electronics allow for the camera to be directly connected to the external switch, and to allow the images to be read directly from the dashboard. You may want to investigate as it frees up some amount of cRIO CPU and should have less lag.

Greg McKaskle
We are not having this problem, so sorry for breaking in, but this option sounds quite interesting. I have not heard anything of connecting the camera to the switch. Could you explain or point me to any resources of how to do this correctly? (Or do you just plug it into the switch, no more changes required?)
__________________
My engineering blog: noeticbrainwaves.blogspot.com

I'm not slacking, my code's compiling
...and I'm using LabVIEW
  #8   Spotlight this post!  
Unread 26-01-2011, 06:43
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,756
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 Freezes

You plug it in and use the IP range reserved for cameras. In other words, change the camera IP to be 10.te.am.xx. I believe xx is above 10, but look for the official doc.

You can probably figure out how to get images from the camera, but I expect example code for how to do this to go up soon.

Greg McKaskle
  #9   Spotlight this post!  
Unread 29-01-2011, 18:50
NetPlanet NetPlanet is offline
Registered User
AKA: Michael Bilinsky
FRC #0296 (The Northern Knights)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Montreal, Qc
Posts: 23
NetPlanet is an unknown quantity at this point
Re: Axis Camera Freezes

We are having a similar problem using java. When the robot is tethered, there are no problems. But when using the wireless the camera freezes a few seconds after we enable the robot. I would think that this is a communication error, but then why does it freeze only when we hit the enable button?
__________________
Checkout my new blog! >> www.netopyaplanet.com
~yay
  #10   Spotlight this post!  
Unread 29-01-2011, 20:00
Michael DiRamio Michael DiRamio is offline
Registered User
FRC #1114 (Simbotics)
Team Role: Teacher
 
Join Date: Jan 2006
Rookie Year: 2006
Location: St. Catharines, Ontario, Canada
Posts: 39
Michael DiRamio has a reputation beyond reputeMichael DiRamio has a reputation beyond reputeMichael DiRamio has a reputation beyond reputeMichael DiRamio has a reputation beyond reputeMichael DiRamio has a reputation beyond reputeMichael DiRamio has a reputation beyond reputeMichael DiRamio has a reputation beyond reputeMichael DiRamio has a reputation beyond reputeMichael DiRamio has a reputation beyond reputeMichael DiRamio has a reputation beyond reputeMichael DiRamio has a reputation beyond repute
Re: Axis Camera Freezes

We have found that it freezes when the battery gets low and you put a lot of load on it (driving around). The camera reboots and comes back on about a minute later if there's not too much load. Might explain why it works when tethered, but freezes when not tethered (more likely to be moving around).
  #11   Spotlight this post!  
Unread 30-01-2011, 03:13
sjspry sjspry is offline
Registered User
FRC #1984
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Kansas
Posts: 125
sjspry has a spectacular aura aboutsjspry has a spectacular aura aboutsjspry has a spectacular aura about
Re: Axis Camera Freezes

Well, I've been running the camera off of a power supply when developing my vision code, and it's done this to me once. I guess it's just a glitch, as the cam doesn't actually reboot or anything.
Closed Thread


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 03:52.

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