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

About vtk8.1 #1

Closed
qcyay opened this issue Aug 14, 2018 · 7 comments
Closed

About vtk8.1 #1

qcyay opened this issue Aug 14, 2018 · 7 comments

Comments

@qcyay
Copy link

qcyay commented Aug 14, 2018

Hey,great job!I have a little question to ask you.When I made it,there was a problem:fatal error:QVTKWidget.h.I found that the vtk8.1 I installed could not install QVTKWidget.h.It seems that I can't find the way to find the vtk8.1 version that satisfy your need.Do you know why,or can you give me a good suggestion for installing a suitable VTK environment?I am very anxious to wait for your reply.Thank you.

@springzfx
Copy link
Owner

springzfx commented Aug 14, 2018

You can download vtk and then follow the vtk build documents to build it.
After that, add following example code to you .bashrc , so your cmake can find it:

#VTK8
export VTK_ROOT="/home/fancy/program/vtk-8.1/shared-release"
export PATH=$VTK_ROOT/bin:$PATH
export LD_LIBRARY_PATH=$VTK_ROOT/lib:$LD_LIBRARY_PATH
export CPLUS_INCLUDE_PATH="$VTK_ROOT/include:$CPLUS_INCLUDE_PATH"
export CMAKE_PREFIX_PATH="$VTK_ROOT/lib/cmake/vtk-8.1:$CMAKE_PREFIX_PATH"

#PCL1.8
export PCL_ROOT="/home/fancy/program/pcl-1.8/shared-release"
export PATH=$PCL_ROOT/bin:$PATH
export LD_LIBRARY_PATH=$PCL_ROOT/lib:$LD_LIBRARY_PATH
export CPLUS_INCLUDE_PATH="$PCL_ROOT/include:$CPLUS_INCLUDE_PATH"
export CMAKE_PREFIX_PATH="$PCL_ROOT/share/pcl-1.8:$CMAKE_PREFIX_PATH"

@qcyay
Copy link
Author

qcyay commented Aug 22, 2018

I am very glad to have your guidance. I checked my VTK installation, compiled and installed using qt, and I copied your sample code to a file, but the problem is still unsolved.
The process of cmake can be implemented smoothly, but the following warning
In file included from /usr/local/include/vtk-8.1/vtkObject.h:46:0,
from /usr/local/include/vtk-8.1/vtkPoints.h:27,
from /usr/include/pcl-1.8/pcl/visualization/point_cloud_geometry_handlers.h:49,
from /usr/include/pcl-1.8/pcl/visualization/point_cloud_handlers.h:41,
from /usr/include/pcl-1.8/pcl/visualization/common/actor_map.h:40,
from /usr/include/pcl-1.8/pcl/visualization/pcl_visualizer.h:48,
from /home/qcyay/下载/point-cloud-annotation-tool-master/pcl/visualization/pcl_visualizer_extented.h:4,
from /home/qcyay/下载/point-cloud-annotation-tool-master/common.h:4,
from /home/qcyay/下载/point-cloud-annotation-tool-master/visualizer.h:4,
from /home/qcyay/下载/point-cloud-annotation-tool-master/main.cpp:1:
/usr/local/include/vtk-8.1/vtkMapper.h:218:3: note: declared here
VTK_LEGACY(void ImmediateModeRenderingOff());
^
In file included from /usr/include/pcl-1.8/pcl/visualization/pcl_visualizer.h:2352:0,
from /home/qcyay/下载/point-cloud-annotation-tool-master/pcl/visualization/pcl_visualizer_extented.h:4,
from /home/qcyay/下载/point-cloud-annotation-tool-master/common.h:4,
from /home/qcyay/下载/point-cloud-annotation-tool-master/visualizer.h:4,
from /home/qcyay/下载/point-cloud-annotation-tool-master/main.cpp:1:
/usr/include/pcl-1.8/pcl/visualization/impl/pcl_visualizer.hpp:1545:64: warning: ‘void vtkMapper::ImmediateModeRenderingOff()’ is deprecated [-Wdeprecated-declarations]
am_it->second.actor->GetMapper ()->ImmediateModeRenderingOff ();
appears repeatedly in the process of make. Finally, the executable file segment error can not be executed.
In addition, before cmake, I found that there were no references to QVTKWidget.h in the project, and the header file QVTKWidget.h was not imported into the system when vtk8.1.1 was installed. I added it to the project and found that the header file named vtkGUISupportQtModule.h in QVTKWidget.h was being maintained, so I deleted the references, and I didn't know if it was relevant. As I am a novice, I am not very understanding. If you can, I hope you can answer it. Thank you.

@springzfx
Copy link
Owner

  1. Ignore the warning
  2. Avoid chinese in your path
  3. QVTKWidget.h is part of VTK, maybe you need to check your cmake variable using ccmake or gui.
  4. QVTKWidget is used in file *.ui.
  5. Please post the error detail

@qcyay
Copy link
Author

qcyay commented Aug 23, 2018

The error is when I execute the executable file named point_cloud_annotation_tool,there is a segmentation fault(the core has been dumped).I'm sorry for disturbing you again.

@springzfx
Copy link
Owner

This kinds of error message is not enough to identify where the problem is. Try using some debug tool to find out the error origin.

@oscarlorente
Copy link

oscarlorente commented Dec 16, 2020

@springzfx Hi, I'm also facing a segmentation fault (core dumped) error. The problem occurs when creating an instance of the "Visualizer" class. Specifically, in viewer.reset(new PCLViewer("",false)); inside the method Visualizer::initialize() (in visualizer.cpp). Any clues on how to solve it? I guess it's worth saying that I've also faced some errors when building the project (related to QT and VTK) that I thought were already solved. I don't know if they are somehow related to this segmentation fault...

@ta984ia
Copy link

ta984ia commented Feb 3, 2021

I am also getting a segmentation fault in Ubuntu 18.04. Is their a solution?

Output of debugger:

Thread 1 "point_cloud_ann" received signal SIGSEGV, Segmentation fault.
0x00007ffff2d114b3 in vtkAlgorithm::GetExecutive() ()
from /home/teroot/VTK-8.1.0/build/lib/libvtkCommonExecutionModel-8.1.so.1
(gdb) bt
#0 0x00007ffff2d114b3 in vtkAlgorithm::GetExecutive() ()
at /home/teroot/VTK-8.1.0/build/lib/libvtkCommonExecutionModel-8.1.so.1
#1 0x00007ffff2d11791 in vtkAlgorithm::SetInputConnection(int, vtkAlgorithmOutput*) [clone .part.50] ()
at /home/teroot/VTK-8.1.0/build/lib/libvtkCommonExecutionModel-8.1.so.1
#2 0x00007ffff311c363 in vtkInteractorStyle::vtkInteractorStyle() ()
at /home/teroot/VTK-8.1.0/build/lib/libvtkRenderingCore-8.1.so.1
#3 0x00007ffff3d1dd39 in vtkInteractorStyleTrackballCamera::vtkInteractorStyleTrackballCamera() ()
at /home/teroot/VTK-8.1.0/build/lib/libvtkInteractionStyle-8.1.so.1
#4 0x00007ffff3d16bee in vtkInteractorStyleRubberBandPick::vtkInteractorStyleRubberBandPick() ()
at /home/teroot/VTK-8.1.0/build/lib/libvtkInteractionStyle-8.1.so.1
#5 0x00007ffff623613c in pcl::visualization::PCLVisualizerInteractorStyle::PCLVisualizerInteractorStyle() ()
at /usr/lib/x86_64-linux-gnu/libpcl_visualization.so.1.8

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

No branches or pull requests

4 participants