ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
3

PCL Visualizer error

asked 2012-07-21 21:51:34 -0500

gpsinghsandhu gravatar image

updated 2012-08-16 03:09:32 -0500

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?

edit retag flag offensive close merge delete

Comments

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

gpsinghsandhu gravatar image gpsinghsandhu  ( 2012-07-24 20:58:46 -0500 )edit

Also i don't know how to comment joq's answers so i just commented here. No post a comment link on your answer

gpsinghsandhu gravatar image gpsinghsandhu  ( 2012-07-24 21:28:59 -0500 )edit

You can edit your own question, often a good idea.

joq gravatar image joq  ( 2012-07-25 01:19:19 -0500 )edit

3 Answers

Sort by ยป oldest newest most voted
7

answered 2012-07-25 00:33:17 -0500

gpsinghsandhu gravatar image

updated 2012-07-25 00:42:11 -0500

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

edit flag offensive delete link more

Comments

2

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.

joq gravatar image joq  ( 2012-09-13 08:54:58 -0500 )edit
2

how exactly should I do that

gpsinghsandhu gravatar image gpsinghsandhu  ( 2012-09-16 03:17:11 -0500 )edit
1

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

KARTHIK MURUGAN gravatar image KARTHIK MURUGAN  ( 2012-12-08 17:29:04 -0500 )edit

please provide the link for the detailed question

gpsinghsandhu gravatar image gpsinghsandhu  ( 2012-12-12 00:14:09 -0500 )edit
1

here it is :-http://answers.ros.org/question/49978/package-using-pcl-make-error/

KARTHIK MURUGAN gravatar image KARTHIK MURUGAN  ( 2012-12-12 16:17:25 -0500 )edit

Please pour in ur suggestions for this another question at : http://answers.ros.org/question/50146/mapping-between-pointcloud-and-image/

KARTHIK MURUGAN gravatar image KARTHIK MURUGAN  ( 2012-12-12 16:19:52 -0500 )edit

This fixes the issue for me perfectly! Thanks! This issue is still present in ROS Groovy on Ubuntu Raring 64bit.

Vittorio88 gravatar image Vittorio88  ( 2013-08-18 12:26:42 -0500 )edit
2

answered 2012-10-30 07:34:33 -0500

Markus Eich gravatar image

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.

edit flag offensive delete link more

Comments

1

I was bale to build PCL in normal way. But how to build PCL from trunk with USE_ROS true ??

sai gravatar image sai  ( 2013-02-16 22:52:59 -0500 )edit
1

@Sai did you manage to find how to build with USE_ROS true?

ctguell gravatar image ctguell  ( 2013-10-14 06:17:06 -0500 )edit
1

answered 2012-07-22 05:48:30 -0500

joq gravatar image

updated 2012-09-16 08:04:02 -0500

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

edit flag offensive delete link more

Comments

I have the same problem and this returns "All system dependencies have been satisified."

felix k gravatar image felix k  ( 2012-09-13 00:51:23 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2012-07-21 21:51:34 -0500

Seen: 6,599 times

Last updated: Oct 30 '12