rovsuite / monterey

Monterey is the computer GUI for rov-suite, an open source ROV control system.
21 stars 14 forks source link

enhancement #55

Closed KDMcMullan closed 10 years ago

KDMcMullan commented 10 years ago

I haven't looked into your source, but what do you think might be involved in making the protocol work over USB, or the serial port USB implementation supported by Arduino?

I recognise the cable length limitations.

chriskonstad commented 10 years ago

Do you mean having Monterey and the Arduino talk over USB instead of UDP (over ethernet)?

KDMcMullan commented 10 years ago

That's what I was thinking. Slightly selfish: I was going to sink my USB webcam, and hang that and the Arduino off a USB hub. No PoE with USB, so I have to sink my batteries, too.

Trying to make a budget solution I can take to high schools to get pupils interested in engineering. Trying to keep to UK£100 budget.

chriskonstad commented 10 years ago

Oh okay. The biggest issue with that is that the video feed for Monterey is streamed over ethernet from the RPI and the video display widget is simple an embedded web view. Monterey doesn't have support for directly interconnecting with USB webcams (right now...).

If you're looking for a cheap solution, what about skipping the Arduino and running on just the RPI? The RPI has some GPIO that you can access with C, Python, etc. It has ethernet built in and could easily handle the video streaming. Plus, it runs off 5v and barely sips power. And, it costs the same as an Arduino ($35 USD). Even though it runs over UDP, you don't need to have a router. The RPI can connect directly to a laptop over ethernet using either a static IP or DHCP running on the laptop. I personally just use a static IP.

If that doesn't work, another possible (but kind of quick and dirty hack) would be to write a simple program that redirects Monterey's UDP IO to USB IO. I might be able to help you out with that.

KDMcMullan commented 10 years ago

Understood. I had hoped it would be a simple matter of swapping out the UDP calls for a combination of serial / USB video calls. Dammit. I might have to go with a custom solution. Is the comms protocol between the surface and the sub pretty well documented? No point in me reinventing the WHOLE wheel!!

QuantumCD commented 10 years ago

Hmm, we could possibly take a look at using OpenCV to get direct access to the webcam via USB. However, that just adds another dependency.

chriskonstad commented 10 years ago

Yup! The protocol is fairly well documented, IIRC. It has been a while since I last worked on the documentation. In fact, the debug window in Monterey actually prints out the data string from the UDP packets.

Also, is there any reason you couldn't substitute a Raspberry Pi for an Arduino? That could make your setup work with Monterey as it is now with very little work.

KDMcMullan commented 10 years ago

None. Well, budget. I have Arduinos. RPi is another leap.

chriskonstad commented 10 years ago

Oh okay. Right now I don't think I'm going to add direct USB webcam support for the video viewer. Because of USB's short cable length, I don't think this is a feature that many people will use. You're more than welcome to make the modifications yourself, though!

Thank you for the feedback!

Edit: That's in regards to adding USB webcam support for streaming video. As far as the Arduino COM is concerned, that would be easier to do with either modifying Monterey or writing a simple helper application that would "forward" UDP packets over USB and vice versa.