-
-
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
[Rebase] Make fixes for VTK 6 #363
Conversation
Thanks for going through the effort to rebase these patches! Two comments:
|
@jpgr87 I don't see the hardcoded vtk libraries in PCLConfig.cmake.in, it's using ${VTK_LIBRARIES} already. I can't run the test suite, I'm on Mavericks and I'm having some issues to get it working. |
Sorry, I should have been more clear. The problem is this line: set(VTK_LIBRARIES vtkCommon vtkRendering vtkHybrid vtkCharts) These libraries don't exist in vtk6, causing sadness for programs that try to build againt pcl. The VTK_LIBRARIES variable should be set based on the output of find_package(VTK ${QUIET_}) instead of being hard-coded. |
@jpgr87 not sure if it works. I'm fixing my environment still =/ |
Uhm, I'm getting this error:
|
@jspricke could we have a vtk6 branch on PCL so that more can participate in this ? |
@nizar-sallem it wouldn't make sense to have it in the main repository (because we can't give push rights based on branches and it would pollute the global namespace), but you can have it in your fork easily. Just send pull requests against @fran6co branch or you could add each other as collaborators in your fork and push directly. |
You can commit directly to my vtk6-fixes branch and it's going to show up here. |
Thanks @fran6co |
Sorry the git refs got all mixed up (my fault). Anyway whenever we are done I will do the clean up. |
I did put it back. |
Thanks |
On my side everything is fine I tested apps and visualization with built VTK-6.0 |
I pulled the PR, built, and ran the unit tests on Fedora 20 x86_64. Everything looks like it works (minus the first unit test segfaulting, not sure if that has to do with this PR or not yet) |
which unit test exactly ? |
a_recognition_ism_test fails. I caught it in gdb when built with RelWithDebInfo, but when I rebuilt as Debug to get more output the test didn't crash. It seemed like it was stuck though, after running for about 5 minutes I killed it. I'll rebuild RelWithDebInfo minus optimization flags and try again soon. |
Thanks @jpgr87 if it is related to VTK-6.0 support post it here please :) |
@nizar-sallem, I'm going to rebase this branch. |
@fran6co Thanks that cleaned it |
Now it's failing with this error. Probably something is off with the include paths.
|
You might not have built vtk with qt support. It's packaged separately as libvtk5-qt4-dev on ubuntu, not sure how you installed vtk on the mac. |
I'm using homebrew, the formula installs 6 and it did build with qt support, but it could be something wrong with homebrew. After Mavericks everything went bonkers =/ Or that vtk6 changed a lot of things. |
Hi, |
the surface/src/vtk_smoothing/vtk_utils.cpp looks fine in here. |
also about #include "QVTKWidget.h", that is relateed to Qt5. VTK compiles only against Qt4 so I dropped Qt5 finding from PCL in this branch. |
@fran6co Are we done here ? |
Didn't test it yet. I'll give it a try one of these days. |
It's going to take me a while to fix the style, could you pinpoint what brackets are missing? |
I am no expert in vtk, but I can try if this will work on my system (Arch).
I am pretty sure Jochen meant spaces before braces. We also have a rule about wrapping return statements with braces, but your code is okay in that respect. |
I installed vtk6.1 from source and started to compile this branch with tests and examples enabled. So far I haven't finished the whole process, but
|
The actual problem is in the ambiguity between Apart from that everything is fine. |
Fixed the style issues, fixing outofcore now. |
trans_filter_center->SetInput (polydata_); | ||
#else | ||
trans_filter_center->SetInputData (polydata_); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra indentation spaces here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@@ -598,7 +621,11 @@ pcl::visualization::ImageViewer::createLayer ( | |||
rect->set (0, 0, static_cast<float> (width), static_cast<float> (height)); | |||
l.actor->GetScene ()->AddItem (rect); | |||
} | |||
#if VTK_MAJOR_VERSION == 6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Earlier (line 45 of this file) a different comparison was used, >= 6
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Used <6 instead, it's a bit more consistent with the rest of the PR.
The style looks good to me now. The fact that the compilation error in 'test_outofcore' went unnoticed on Travis raises an interesting question. Now that we support two versions of vtk, how should the Travis tasks be organized? Do we want to compile/link/test against both versions? If so, how to minimize the extra burden that we put on Travis? |
I think it depends on what version of vtk is the default in the main platforms. Homebrew switched to vtk6 last year. Not sure about linux, but it looks like vtk6 hit Ubuntu for 14.04. |
Is it? According to launchpad it's still 5.8 and will be the same in the next release. On Arch the default is 5.10. |
The package is https://launchpad.net/ubuntu/+source/vtk6. I think they changed the name to have both versions at the same time. |
Fixed test outofcore. |
+1 for merging this. Regarding Travis, I'm not aware of any load problems we cause, so I would propose to test both builds. We could do the same for OpenNI[12], what do you think? |
I think openni 1 and 2 can coexist, it wouldn't require 2 builds for that, right? |
Okay, so I propose to merge this PR. Then we can discuss Travis-related questions in a separate issue. |
[Rebase] Make fixes for VTK 6
I needed to rebase the PR #218 to use it in the homebrew pcl recipe.