-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move OpenNI and VTK support from io to their own modules #5798
Comments
I was so surprised to realize that |
Hi, I understand your point. The problem that PCL's io module depends on VTK (and thus entails a lot of dependencies on Debian/Ubuntu) also came up in perception_pcl (the ROS-PCL bridge) some time ago. I compiled an overview where PCL's io module needs vtk:
My favourite solution would be to replace everything from VTK in Another idea: could delayed loading be the solution? (on Windows) See #5642
This is true, we replace dependencies on boost modules whenever there is a good alternative. |
Since we worked on delayed loading, we wanted to add here: Delay loading is well suited to resolve this kind of issues at runtime. Of course at compile time, still all optional dependencies are required. It's rather simple to use, only the linker flags have to be extended by the Btw: Another particularly useful use case of delay loading is CUDA, whose dependencies are also rather heavy. Activating CUDA at compile time and combining it with delayed loading, the CUDA dependencies can be skipped on any machine not needing CUDA at all (e.g., only non-CUDA functions are used or even no CUDA hardware is available). We implented this into OpenCV, transferring it to PCL is straightforward. |
@mvieth I didn't realise that all of the functionality you mention in your overview list is actually dependent on VTK. That makes my suggestion of splitting rather pointless: I was hoping/expecting that things like loading ply and obj files were done by libpcl itself. It also makes it pointless for my specific use case: the one thing for which I need the io module is ply file loading and saving, so I would still have to pull in vtk. Feel free to close this issue. And I will (eventually:-) implement my ply file load/save in my own code. If I manage to do this in a way that is "libpcl-compatible" I will try and donate the code back to libpcl. |
@jackjansen Sorry for the misunderstanding: PCL does have functions to load and save ply and obj files, which do not depend on VTK: |
@mvieth thanks a lot for the clarification! |
In the https://github.com/cwi-dis/cwipc toolkit that I maintain I depend on libpcl for some features. Specifically for this bug report: I use the ply-file readers from the io package. My toolkit is cross-platform.
But the io package is rather heavy: it also depends on vtk and OpenNI (at least when it is built for the Windows all-in-one installer).
So this means my users have a whole lot of packages they need to install, even though my toolkit doesn't actually need them.
Both of the mentioned dependencies have their own specific problems, especially on Windows:
PATH
.(I have a similar issue with the
boost
dependency, but I get the impression that the libpcl developers are already moving away from boost as much as possible, so I'm hoping that problem will eventually go away by itself).Context
See above.
Expected behavior
If the OpenNI and VTK I/O handlers were in their own package, in stead of in
io
, I wouldn't have to worry about them (because I don't use them).Current Behavior
Currently all I/O is in a single package
io
, which means that the only way to disable (or enable) certain features is to build libpcl from source.Describe the solution you'd like
If the OpenNI and VTK I/O handlers were in their own package, in stead of in
io
, I wouldn't have to worry about them (because I don't use them).Describe alternatives you've considered
An alternative is that I build libpcl from source with exactly the options I need, and that I distribute that version with my
cwipc
package. But that would "lock in" the users of my package to have access only to the libpcl features that I happen to have selected, whereas with the setup where I don't distribute a private copy of libpcl my users have the freedom to use any libpcl feature they want (because I'm linking to the libpcl that they have installed).Additional context
The text was updated successfully, but these errors were encountered: