MasteringOpenCV / code

Code for the book "Mastering OpenCV with Practical Computer Vision Projects" by Packt Publishing 2012.
Other
2.71k stars 1.64k forks source link

Build error for Chapter 4 code (Visualization.cpp) #68

Open amiltonwong opened 8 years ago

amiltonwong commented 8 years ago

Dear all, I have troubles in building chapter 4 code (Visualization.cpp)

/root/opencv_ws/Chapter4_StructureFromMotion/Visualization.cpp:97:2: error: ‘toROSMsg’ is not a member of ‘pcl’ pcl::toROSMsg(mesh_cld,pm.cloud); ^

The detailed error can be viewed here: https://gist.github.com/amiltonwong/72745b90a2d5e70a7e47

My system is ubuntu 14.04, CUDA 7.5, opencv 2.4.8, and ROS Indigo installed.

The error seems come from : toROSMsg

Could someone suggest me how to fix it?

THX~ Milton

fabiopoiesi commented 6 years ago

With pcl-1.8, toROSMsg is deprecated, but the library provides functions to handle this.

Just add #include <pcl/ros/conversions.h> to Visualization.cpp.