zivid / zivid-ros

Official ROS driver for Zivid 3D cameras
BSD 3-Clause "New" or "Revised" License
60 stars 45 forks source link

Windows build #71

Open jbonyun opened 2 years ago

jbonyun commented 2 years ago

I never thought I'd be that guy, but here I am anyway, asking if there is evidence whether this is buildable on Windows. Yes, I can see that Ubuntu is the only supported OS.

I have a further complication: I have an old Zivid One (not plus), so am working with SDK 2.3.1, the last to support the camera. I've checked out eb9f7fa, which was my best effort to find the most recent spot in the tree that supported SDK 2.3.1. This method has worked for zivid-python.

I've, of course, tried myself. The generated ninja.build involves some Linux-only things: uses forward slashes in the mkdir path names, and will attempt chmod if it gets further along. It also chokes on finding ZividCored.dll in the SDK install (I have ZividCore.dll, and I have ZividCored.lib, but not ZividCored.dll).

I guess answers like "sure, has worked for people, keep going 'cause you're almost there" would be helpful. Or "don't be silly, we say Ubuntu-only for a reason, it'll never work, get yourself a real OS". Of course I'm hoping the answer is "we've been through this, and all you have to do is X,Y,Z, here's another repo or cherry-pick where we do it all for you".

Why Windows? Other parts of my setup need Windows for the hardware. (I don't think that's unusual in a ROS environment.) I'm trying to avoid a second computer in the mix. And I can't get Zivid to run in a VM or WSL (no USB access and not supported for usbip passthrough). A second computer is my fallback, but I'm so close!

apartridge commented 2 years ago

Hi @jbonyun.

We have not attempted to build the ROS driver together with Windows ourselves. So unfortunately we don't know if it is hard or not. There are some Linux specific things going on in the CMakeLists.txt files, as you have found out, but I would think those should be quite straight forward to fix to work with Windows. You should find ZividCored.dll in the C:/Program Files/Zivid/bin_debug/ folder.