|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Re: Clarity on Smart Dashboard Camera Mechanism
Thanks, so what will basically happen is I will start an MPEG server on my raspberry pi that is updating frames and sending to the the url you specified, the roborio's background CameraServer class will grab these frames according to the url (http://10.x.y.z:9090/stream.mjpg), and will then send the images to the smartdashboard on the computer?
Also, what might be a faster way of uploading these frames to byte format, because even on my desktop, I am noticing significant lag. |
|
#2
|
|||
|
|||
|
Re: Clarity on Smart Dashboard Camera Mechanism
Quote:
OpenCV does not provide a way to avoid the decompress+recompress. If you aren't actually editing the images being sent to the dashboard, you can use the cscore library that we use on the roboRio to both send the original camera JPEG via HTTP in the lowest overhead way possible and make it available for OpenCV processing. There's a Java tutorial for this here: http://wpilib.screenstepslive.com/s/...essing-in-java. The RobotPy folks are working on a cscore wrapper that should make this possible to do in Python, but there's not an existing tutorial that I know of. |
|
#3
|
|||
|
|||
|
Re: Clarity on Smart Dashboard Camera Mechanism
I think I understand now. So I will replace line 34 of my server code with:
self.wfile.write('<img src="http://10.x.y.z:9090/stream.mjpg" height="240px" width="320px"/>') and thread the server_serve_forever() statement, so that the pi can simultaneously process and set the images in a global variable, perhaps a queue. So just for clarification, there isn't much I will have to do on my end other than set up a mjpeg stream with an appropriate send port and ip address. The smart dashboard will do the rest by finding the url and grabbing the images. |
|
#4
|
|||
|
|||
|
Re: Clarity on Smart Dashboard Camera Mechanism
Quote:
|
|
#5
|
|||
|
|||
|
Re: Clarity on Smart Dashboard Camera Mechanism
So I have been looking at the smartdashboard camera viewer properties and it asks for the "camera's ip address or mdns name". Here I can feed the URL: "http://10.x.y.z:9090/stream.mjpg" and should it successfully make a connection to the Dash? Should the x, y, and z have integer values? Is it possible to set a mdns name for the http web server?
Also the the ports that are allowed for team use ranges from "5800-5810" |
|
#6
|
||||||
|
||||||
|
Re: Clarity on Smart Dashboard Camera Mechanism
Quote:
|
|
#7
|
|||
|
|||
|
Re: Clarity on Smart Dashboard Camera Mechanism
Quote:
The ports allowed for team use are listed in R56. Ports 5800-5810 are one option; another is port 80. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|