Updates Qhull to 2015.2 using the C++ interface#1565
Updates Qhull to 2015.2 using the C++ interface#1565fran6co wants to merge 1 commit intoPointCloudLibrary:masterfrom
Conversation
331d309 to
7ffbf6c
Compare
|
The C++ interface needs the library to be linked statically, it crashes otherwise. |
73be4dd to
ebd3468
Compare
|
The method |
|
I don't know what to do with this PR. Things changed a little bit on our CI we don't manually build dependencies any more (for now), because there's not enough time. You would need to precache it in a different stage. The reentrant version of qHull was introduced only in 2015. I also cant' find ppas with backport for Precise and Trust :/ |
|
@SergioRAgostinho The all-in-one installer for Windows bundles QHull 2015.2. |
|
I can try to do backports as ppa this evening. |
|
Thanks for that Jochen. But even so, are we committing to stop supporting qhull prior to 2015? |
|
I made some for precise i386 and trusty: https://launchpad.net/~v-launchpad-jochen-sprickerhof-de/+archive/ubuntu/pcl18. precise amd64 is failing. Also I'm fine with updateing to the newer qhull version |
This is a tough one. We do not have an official baseline for our dependencies and we do not have a clear procedure how to lift it, if needed. We do not even have a "mission" statement that would make clear what is of more priority for the library, backward compatibility or new features. (As a matter of fact, I remember sometime back in 2013 when Radu was still active, he was against requiring C++11 in any foreseeable future.) |
Given the relatively lax constraints we have in terms of API changes, I would implicitly assume it's more focused towards new features. Well it's gonna be a new PCL version so why not. Canonical already dropped support for 12.04 and we can provide a backport for 14.04 so...
So basically the c++11 adoption idea is to optionally provide support for it, but not require it. That's gonna be a whole lotta work 😅 |
|
I think the C++ standard needs a little more consideration then a library version. Regarding C++11, GCC6 changed to C++14 by default, so that should be fine with most of Linux. For Visual Studio I only found a blog post stating that they support a combined mode included C++11. For Apple, I was not able to find reliable information. Apart from that I don't see a big problem with allowing C++11 features. |
Based on these two: OS X should not be a problem. |
|
Fine with me, although they only talk about C++11 support, not if it's enabled by default ;). |
|
It's not. I didn't understand that was the the core argument 😅 |
|
So the consensus is that we review/merge this, effectively raising the QHull dependency version starting from 1.9? |
|
Fine with me.
|
|
Fine by me as well. |
1f78dae to
6760cee
Compare
|
Hey. Sorry for getting back to you so late. I started looking at this today but I'm facing weird problem in which github is not loading the diff of Does anyone else have the same problem? |
|
I have the same problem with FF, but with Chromium it works. |
There was a problem hiding this comment.
Sorry for taking long to get back to you.
I never used QHull so my feedback is fairly limited.
I have two overall comment which need to be revised and addressed in multiple points:
- The first one is regarding the use of
inttypes for storing ids and indexes. By default you should usesize_t, unless QHull/PCL actually places a requirement on using another type. - The second one is a request to avoid using the inner
PointCloud::pointsdirectly. You have a pendent PR in our issue tracker which hides the access to this member, which I personally agree with. Therefore since the PointCloud container provides all resizing and indexing operations you need, I would ask to stick to using those.
| else(QHULL_USE_STATIC) | ||
| set(QHULL_RELEASE_NAME qhull_p qhull${QHULL_MAJOR_VERSION} qhull) | ||
| set(QHULL_DEBUG_NAME qhull_pd qhull${QHULL_MAJOR_VERSION}_d qhull_d${QHULL_MAJOR_VERSION} qhull_d) | ||
| endif(QHULL_USE_STATIC) |
surface/include/pcl/surface/qhull.h
Outdated
| #include "libqhullcpp/QhullFacetList.h" | ||
| #include "libqhullcpp/QhullVertexSet.h" | ||
| #include "libqhullcpp/QhullRidge.h" | ||
| #include "libqhullcpp/QhullError.h" |
There was a problem hiding this comment.
Since you're already changing this part modify the includes to use < >. Qhull doesn't reside in our build tree.
| for(orgQhull::QhullFacetList::iterator it = facets.begin (); it != facets.end (); ++it) | ||
| { | ||
| polygons[dd].vertices.resize (3); | ||
| polygons[dd].vertices.resize (3); |
There was a problem hiding this comment.
This one slipped in unnoticed. It's breaking indentation with rest of the code.
| hull_indices_.indices.reserve (num_vertices); | ||
|
|
||
| FORALLvertices | ||
| int i = 0; |
There was a problem hiding this comment.
This feels like it should be a size_t type.
There was a problem hiding this comment.
It should be a uint32_t because qhid_to_pcidx the gets used for filling up polygons[dd].vertices that is a vector of uint32_t
|
|
||
| int num_vertices = qh num_vertices; | ||
| int num_facets = qhull.facetCount(); | ||
| int num_vertices = qhull.vertexCount(); |
There was a problem hiding this comment.
These feel like they should be a size_t type.
| if (dim_ > 2) | ||
| points[i * dim_ + 2] = static_cast<coordT> (cloud_transformed.points[i].z); | ||
| points.push_back(cloud_transformed.points[i].z); | ||
| } |
There was a problem hiding this comment.
Seems like you can preallocate points from the beginning.
|
|
||
| qh_setvoronoi_all(qhull.qh()); | ||
|
|
||
| int num_vertices = qhull.vertexCount(); |
There was a problem hiding this comment.
qhull.vertexCount uses countT that is an int
| alpha_shape.points.resize (num_vertices); | ||
|
|
||
| // Max vertex id | ||
| int max_vertex_id = 0; |
There was a problem hiding this comment.
Is Vertex->id() returning int?
There was a problem hiding this comment.
yes, if you check the qhull headers they use countT and that countT is defined as an int.
|
@SergioRAgostinho About using |
SergioRAgostinho
left a comment
There was a problem hiding this comment.
I don't have anything else from my side then. :)
I think it's now a matter of deciding when to apply this given the ubuntu issue with qhull packaging.
|
What is the status of this? Would you be interested in an implementation with the qhull_r c-library? |
|
This pull request has been automatically marked as stale because it hasn't had Come back whenever you have time. We look forward to your contribution. |
|
@PointCloudLibrary/maintainers What's the status on this? The diff appears to have been approved. With 16.04 going EOL soon, and bionic distributing If we need the cpp lib, then it's available in groovy only |
Since the other pull request was merged, there is now support for multithreading via the re-entrant interface of QHull. Not the C++ interface, but I don't see a major advantage in using that. So yes, I am ok with closing this. |

The old qhull had problems with multi threading (reentrant variant of the library) and outputing stuff to the stderr/stdout. This fixes all that and updates the interface to something a bit more usable.
Removed support to previous versions, not sure what's the best way to keep those. I was thinking of creating a different version of the impl files and include them depending on the version.
Depends on #1567
Closes #1618