cwi-dis / cwipc

MIT License
17 stars 2 forks source link

Investigate using Realsense cameras over Ethernet #116

Open jackjansen opened 4 months ago

jackjansen commented 4 months ago

Realsense nowadays supports a "network camera". More details are in https://dev.intelrealsense.com/docs/open-source-ethernet-networking-for-intel-realsense-depth-cameras?_ga=2.207548058.808217773.1721646934-1540133113.1721646934

That document is about using a RPi4, which I've done some preliminary experiments with but it didn't have the performance for decent frame rate.

But we could try with a NUC attached to the camera, and possibly using the 1G/10G ethernet switch (using 10G for the uplink to the main computer).

jackjansen commented 4 months ago

Looked into the networked camera, and I'm not sure it's good enough for what we want to do. It supports only a few formats, and uses RTP/RTSP for control.

Another option might be to stream the .bag format. I've ask a question about how feasible this is in the forums: https://support.intelrealsense.com/hc/en-us/community/posts/31741337945491-Is-it-possible-to-stream-the-bag-format let's see what comes out of that.

And I just realised that if both sides are unix-based we could use /dev/fd as the bag input and output "files" (assuming the bag format is streamable). The receiver side could run an ssh command with stdout piping into, say, fd=8, and then call rs2::config::enable_device_from_file("/dev/fd/8"). The sender command could simply enable_record_to_file("/dev/fd/1")

@troeggla any comments from the unix-feasibility side of this?

jackjansen commented 4 months ago

And we may also be able to do this on Windows, using named pipes. Apparently named pipes have a filename, on some magical filesystem. The names are something like \\.\pipe\the-name-of-the-pipe. See https://superuser.com/questions/1740347/default-windows-hidden-files-systems