View Single Post
  #7   Spotlight this post!  
Unread 10-04-2014, 18:01
prometheusLKR prometheusLKR is offline
Registered User
FRC #0900
 
Join Date: Jan 2014
Location: Raleigh
Posts: 3
prometheusLKR is an unknown quantity at this point
Re: Dashboard Robot SDRead Communication Problems

Quote:
Originally Posted by Alan Anderson View Post
That is not a very good way to do it. Given the network architecture we use, I would go so far as to call it a spectacularly poor way to do it.

Your dashboard program should be getting the image directly from the camera, without forcing the robot program and Smart Dashboard communication to be an intermediary. The default Dashboard already connects to the camera and reads the image. You just need to feed that image to your vision processing.
We tried doing that, and because of the internal buffering of the camera, if we use the dashboard Read MJPG just when we want to get a new image, the image is not current, and if we read from the camera continuously, we have bandwidth issues (even at low resolution and frame rate, it resulted in our robot losing communication with the field at the NC Regional). We seem to have been able to solve this issue by running the "MJPG Loop" vi in Periodic Tasks, and when we need an image, we get the image string and communicate it using a network tables variable. This has resulted in being able to consistently get a current image, something we were never able to accomplish getting the image directly from the camera in dashboard code.

This is, however, not the problem being discussed in the thread, and as an update on that issue (not getting correct values with SD Read Boolean and Read Numeric), we seem to have been able to fix the problem by switching from SD Read and Write vi's to NT Read and Write vi's.

~another programmer from OP's team
Reply With Quote