Skip to content
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

Merged
merged 4 commits into from
May 26, 2014
Merged

Conversation

fran6co
Copy link
Contributor

@fran6co fran6co commented Nov 14, 2013

I needed to rebase the PR #218 to use it in the homebrew pcl recipe.

@fran6co fran6co mentioned this pull request Nov 14, 2013
@richmattes
Copy link
Contributor

Thanks for going through the effort to rebase these patches! Two comments:

  1. There are still two hard-coded vtk libraries in PCLConfig.cmake.in. You can probably replace them with ${VTK_LIBRARIES} (or @VTK_LIBRARIES@ since it's an .in file)
  2. Did you try building/running the test suite? I seem to remember running into some vtk issues there too, but I won't be able to verify until tonight.

@fran6co
Copy link
Contributor Author

fran6co commented Nov 14, 2013

@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.

@richmattes
Copy link
Contributor

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.

@fran6co
Copy link
Contributor Author

fran6co commented Nov 14, 2013

@jpgr87 not sure if it works. I'm fixing my environment still =/

@fran6co
Copy link
Contributor Author

fran6co commented Nov 14, 2013

Uhm, I'm getting this error:

visualization/include/pcl/visualization/interactor.h:54:12: fatal error: 'vtkXRenderWindowInteractor.h' file not found
#  include <vtkXRenderWindowInteractor.h>

@nizar-sallem
Copy link
Contributor

@jspricke could we have a vtk6 branch on PCL so that more can participate in this ?

@jspricke
Copy link
Member

@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.

@nizar-sallem
Copy link
Contributor

@jspricke to whom should I send the PR exactly ? PCL or @fran6co or @jpgr87 it would be nice to have only one fork that gathers all.

@fran6co
Copy link
Contributor Author

fran6co commented Nov 15, 2013

You can commit directly to my vtk6-fixes branch and it's going to show up here.

@nizar-sallem
Copy link
Contributor

Thanks @fran6co

@nizar-sallem
Copy link
Contributor

Sorry the git refs got all mixed up (my fault). Anyway whenever we are done I will do the clean up.

@fran6co
Copy link
Contributor Author

fran6co commented Nov 19, 2013

I did put it back.

@nizar-sallem
Copy link
Contributor

Thanks

@nizar-sallem
Copy link
Contributor

On my side everything is fine I tested apps and visualization with built VTK-6.0

@richmattes
Copy link
Contributor

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)

@nizar-sallem
Copy link
Contributor

which unit test exactly ?

@richmattes
Copy link
Contributor

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.

@nizar-sallem
Copy link
Contributor

Thanks @jpgr87 if it is related to VTK-6.0 support post it here please :)

@fran6co
Copy link
Contributor Author

fran6co commented Nov 19, 2013

@nizar-sallem, I'm going to rebase this branch.

@nizar-sallem
Copy link
Contributor

@fran6co Thanks that cleaned it

@fran6co
Copy link
Contributor Author

fran6co commented Nov 19, 2013

Now it's failing with this error. Probably something is off with the include paths.

In file included from /tmp/pcl-Ou0c/macbuild/apps/include/pcl/apps/moc_openni_passthrough.cxx:9:
In file included from /tmp/pcl-Ou0c/macbuild/apps/include/pcl/apps/../../../../../apps/include/pcl/apps/openni_passthrough.h:42:
In file included from /tmp/pcl-Ou0c/apps/include/pcl/apps/openni_passthrough_qt.h:44:
/tmp/pcl-Ou0c/macbuild/apps/ui_openni_passthrough.h:21:10: fatal error: 'QVTKWidget.h' file not found
#include "QVTKWidget.h"

@richmattes
Copy link
Contributor

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.

@fran6co
Copy link
Contributor Author

fran6co commented Nov 19, 2013

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.

@nizar-sallem
Copy link
Contributor

Hi,
Try to find libvtkGUISupportQt, libvtkGUISupportQtOpenGL, libvtkGUISupportQtWebkit, libvtkRenderingQt and libvtkViewsQt on your system. If they are not all there then something is wron g with the brew formula.

@nizar-sallem
Copy link
Contributor

the surface/src/vtk_smoothing/vtk_utils.cpp looks fine in here.

@nizar-sallem
Copy link
Contributor

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.

@nizar-sallem
Copy link
Contributor

@fran6co Are we done here ?

@fran6co
Copy link
Contributor Author

fran6co commented Dec 5, 2013

Didn't test it yet. I'll give it a try one of these days.

@jspricke
Copy link
Member

I think we can go without the deprecation thing (it's obscure enough anyway ;) ). @fran6co can you adopt this to the PCL style guide (there are some missing brackets). Then I'm in favor of merging, or what do you think @taketwo?

@fran6co
Copy link
Contributor Author

fran6co commented May 24, 2014

It's going to take me a while to fix the style, could you pinpoint what brackets are missing?

@taketwo
Copy link
Member

taketwo commented May 24, 2014

Then I'm in favor of merging, or what do you think @taketwo?

I am no expert in vtk, but I can try if this will work on my system (Arch).

could you pinpoint what brackets are missing?

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.

@taketwo
Copy link
Member

taketwo commented May 24, 2014

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 test_outofcore target seems to fail due to some problems with vtkAtomicInt:

vtkAtomicInt.h:307:28: error: reference to ‘detail’ is ambiguous

@taketwo
Copy link
Member

taketwo commented May 24, 2014

The actual problem is in the ambiguity between pcl::detail namespace and detail namespace in vtk. This may be resolved by moving using namespace pcl; from line 58 to line 64 in 'test_outofcore.cpp'. The fact that OutofcoreOctreeBaseNode requires visualization/common seems a bit odd though.

Apart from that everything is fine.

@fran6co
Copy link
Contributor Author

fran6co commented May 25, 2014

Fixed the style issues, fixing outofcore now.

trans_filter_center->SetInput (polydata_);
#else
trans_filter_center->SetInputData (polydata_);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra indentation spaces here.

Copy link
Contributor Author

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
Copy link
Member

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.

Copy link
Contributor Author

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.

@taketwo
Copy link
Member

taketwo commented May 25, 2014

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?

@fran6co
Copy link
Contributor Author

fran6co commented May 25, 2014

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.

@taketwo
Copy link
Member

taketwo commented May 25, 2014

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.

@fran6co
Copy link
Contributor Author

fran6co commented May 25, 2014

The package is https://launchpad.net/ubuntu/+source/vtk6. I think they changed the name to have both versions at the same time.

@fran6co
Copy link
Contributor Author

fran6co commented May 25, 2014

Fixed test outofcore.

@jspricke
Copy link
Member

+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?

@fran6co
Copy link
Contributor Author

fran6co commented May 26, 2014

I think openni 1 and 2 can coexist, it wouldn't require 2 builds for that, right?

@taketwo
Copy link
Member

taketwo commented May 26, 2014

Okay, so I propose to merge this PR. Then we can discuss Travis-related questions in a separate issue.

jspricke added a commit that referenced this pull request May 26, 2014
[Rebase] Make fixes for VTK 6
@jspricke jspricke merged commit 6b53ae2 into PointCloudLibrary:master May 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.