0
$\begingroup$

Rosanswers logo

When I make(using rosmake) the PCL visualizer tutorial - (http://pointclouds.org/documentation/tutorials/pcl_visualizer.php#pcl-visualizer) I get this error-

/opt/ros/fuerte/include/pcl-1.5/pcl/visualization/common/common.h:39:24: fatal error: vtkCommand.h: No such file or directory

It seems that ros is unable to find vtk modules. Can anyone help?


Originally posted by gpsinghsandhu on ROS Answers with karma: 231 on 2012-07-21

Post score: 3


Original comments

Comment by gpsinghsandhu on 2012-07-24:
Yes I am using Fuerte on ubuntu precise The command returned---All system dependencies have been satisified I also checked for libvtk5-dev which is installed on my system. Is there a way to directly link libraries like libvtk5-dev using CMakeLists.txt which may help me. And thanks for your response

Comment by gpsinghsandhu on 2012-07-24:
Also i don't know how to comment joq's answers so i just commented here. No post a comment link on your answer

Comment by joq on 2012-07-25:
You can edit your own question, often a good idea.

$\endgroup$

3 Answers 3

0
$\begingroup$

Rosanswers logo

You appear to be using ROS Fuerte. What OS are you running?

On my Fuerte/Oneiric system, that header is defined in libvtk5-dev.

What does this return?

$ rosdep check visualization_common

EDIT: That tutorial is for standalone PCL, not for PCL with ROS. It does not say to build using rosmake, because that would not work. For that tutorial follow the directions for "Compiling and running the program".


Originally posted by joq with karma: 25443 on 2012-07-22

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by felix k on 2012-09-13:
I have the same problem and this returns "All system dependencies have been satisified."

$\endgroup$
0
$\begingroup$

Rosanswers logo

Ok I found the answer. I explicitly added the vtk modules and libraries to CMakeList and it worked fine. I added the two following lines at the end

include_directories(/usr/include/vtk-5.8)

target_link_libraries(pcl_viz ${PCL_LIBRARIES} libvtkCommon.so libvtkFiltering.so libvtkRendering.so)

here pcl_viz is my executable

I would prefer that ros take care of these things as in the standalone PCL


Originally posted by gpsinghsandhu with karma: 231 on 2012-07-25

This answer was ACCEPTED on the original site

Post score: 7


Original comments

Comment by joq on 2012-09-13:
That is not a good solution. As you say, ROS should take care of it properly. If it does not, please open a defect ticket.

Comment by gpsinghsandhu on 2012-09-16:
how exactly should I do that

Comment by KARTHIK MURUGAN on 2012-12-08:
hi gpsinghsandhu, i have the same problem. i tried adding to CMakeLists as u mentioned. i get an error :-Cannot specify link libraries for target "pcl_tutorial" which is not built by this project.In ur case pcl_viz is the name of your package or the node(program.cpp)??a detailed qn s my account,HELP

Comment by gpsinghsandhu on 2012-12-12:
please provide the link for the detailed question

Comment by KARTHIK MURUGAN on 2012-12-12:
here it is :-http://answers.ros.org/question/49978/package-using-pcl-make-error/

Comment by KARTHIK MURUGAN on 2012-12-12:
Please pour in ur suggestions for this another question at : http://answers.ros.org/question/50146/mapping-between-pointcloud-and-image/

Comment by Vittorio88 on 2013-08-18:
This fixes the issue for me perfectly! Thanks! This issue is still present in ROS Groovy on Ubuntu Raring 64bit.

$\endgroup$
0
$\begingroup$

Rosanswers logo

I had the same problem with visualization (ROS FUERTE, Ubuntu 12.04LTS). It seems to be some dependency missing with the ros-pcl version. What I did, I removed PCL from ros (sudo apt-get remove ros-fuerte-pcl) and downloaded the PCL version from the website (trunk, in my case) and build it with "USE_ROS true" (important to use USE_ROS, or you will get some reference errors. Dunno why)

Than I simply removed the pcl and ros_pcl from the manifest.xml and used the standard CMakeList.txt method to include PCL. In my case,

  find_package(PCL 1.5 REQUIRED COMPONENTS segmentation filters visualization)
  include_directories(${PCL_INCLUDE_DIRS})
  link_directories(${PCL_LIBRARY_DIRS})
  add_definitions(${PCL_DEFINITIONS})

and finally

  target_link_libraries(${PROJECT_NAME} ${PCL_LIBRARIES} )

Works perfectly, also with visualization.


Originally posted by Markus Eich with karma: 202 on 2012-10-30

This answer was NOT ACCEPTED on the original site

Post score: 2


Original comments

Comment by sai on 2013-02-16:
I was bale to build PCL in normal way. But how to build PCL from trunk with USE_ROS true ??

Comment by ctguell on 2013-10-14:
@Sai did you manage to find how to build with USE_ROS true?

Comment by sai on 2013-10-16:
Please look at this link. http://www.pcl-users.org/How-to-integrate-PCL-with-ROS-as-an-external-library-td4026185.html#a4026213

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.