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

Installation of tabletop_object detector package along with perception_pcl_unstable

asked 2012-01-09 05:45:23 -0600

karthik gravatar image

updated 2012-01-11 05:39:22 -0600

Hi, I have perception_pcl_unstable package in use. Now i downloaded the package tabletop_object_detector from http://www.ros.org/wiki/tabletop_object_detector. I am getting this dependency error on Eigen as below. I know that CMakeLists.txt has to be updated to fetch the /usr/include/eigen3 as the Eigen directories. But unable to solve this issue.

/ros_workspace/perception_pcl_unstable/pcl/include/pcl-1.4/pcl/pcl_base.h:44:27: fatal error: Eigen/StdVector: No such file or directory

I have check the cmake in pcl and it says that the Eigen is found at (/usr/include/eigen3) which looks fine. Can somebody tell me what i am missing here.

Thanks, Karthik


Was able to solve the above issue with the addition of following lines in the CMakeLists.txt

find_package(Eigen REQUIRED)
include_directories(${PCL_INCLUDE_DIRS})
include_directories(${EIGEN_INCLUDE_DIRS})
add_definitions(-DEIGEN_USE_NEW_STDVECTOR
               -DEIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET)

But ended up getting the below error

  [ 85%] Building CXX object CMakeFiles/segment_object_in_hand.dir/src/segment_object_in_hand.o
  Linking CXX executable ../bin/segment_object_in_hand


    /usr/bin/ld: warning: libtinyxml.so.2.5.3, needed by /opt/ros/electric/stacks/nodelet_core/nodelet/lib/libnodeletlib.so, may conflict with libtinyxml.so.2.6.2
      CMakeFiles/segment_object_in_hand.dir/src/segment_object_in_hand.o: In function `tabletop_object_detector::ObjectInHandSegmenter::segmentObject(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, sensor_msgs::PointCloud2_<std::allocator<void> >&)':
      /workspace/karthik/RRC/ros_workspace/wg-ros-pkg/tabletop_object_detector/src/segment_object_in_hand.cpp:224: undefined reference to `pcl::EuclideanClusterExtraction<pcl::PointXYZ>::extract(std::vector<pcl::PointIndices_<std::allocator<void> >, std::allocator<pcl::PointIndices_<std::allocator<void> > > >&)'
      collect2: ld returned 1 exit status

Then i added few more link libraries in the CMakeLists.txt and got the below error.

{-------------------------------------------------------------------------------
  /usr/local/lib/libpcl_apps.so: undefined reference to `pcl::ConvexHull<pcl::PointXYZ>::reconstruct(pcl::PointCloud<pcl::PointXYZ>&, std::vector<pcl::Vertices, std::allocator<pcl::Vertices> >&)'
  /usr/local/lib/libpcl_apps.so: undefined reference to `pcl::ExtractPolygonalPrismData<pcl::PointXYZRGBNormal>::segment(pcl::PointIndices&)'
  /usr/local/lib/libpcl_apps.so: undefined reference to `pcl::ConvexHull<pcl::PointWithRange>::performReconstruction(pcl::PolygonMesh&)'
  /usr/local/lib/libpcl_apps.so: undefined reference to `pcl::SACSegmentation<pcl::InterestPoint>::segment(pcl::PointIndices&, pcl::ModelCoefficients&)'
  /usr/local/lib/libpcl_apps.so: undefined reference to `pcl::ConvexHull<pcl::PointXYZ>::performReconstruction(std::vector<pcl::Vertices, std::allocator<pcl::Vertices> >&)'
  /usr/local/lib/libpcl_apps.so: undefined reference to `pcl::EuclideanClusterExtraction<pcl::PointWithViewpoint>::extract(std::vector<pcl::PointIndices, std::allocator<pcl::PointIndices> >&)'
  /usr/local/lib/libpcl_apps.so: undefined reference to `pcl::ConvexHull<pcl::PointXYZRGB>::performReconstruction(std::vector<pcl::Vertices, std::allocator<pcl::Vertices> >&)'
  /usr/local/lib/libpcl_apps.so: undefined reference to `pcl::SACSegmentation<pcl::PointNormal>::segment(pcl::PointIndices&, pcl::ModelCoefficients&)'
  /usr/local/lib/libpcl_apps.so: undefined reference to `pcl::ConvexHull<pcl::PointXYZRGBNormal>::reconstruct(pcl::PointCloud<pcl::PointXYZRGBNormal>&, std::vector<pcl::Vertices, std::allocator<pcl::Vertices> >&)'
  /usr/local/lib/libpcl_apps.so: undefined reference to `pcl::EuclideanClusterExtraction<pcl::PointXYZHSV>::extract(std::vector<pcl::PointIndices, std::allocator<pcl::PointIndices> >&)'
  /usr/local/lib/libpcl_apps.so: undefined reference to `pcl::ConvexHull<pcl::PointXYZL>::performReconstruction(std::vector<pcl::Vertices, std::allocator<pcl::Vertices> >&)'
  /usr/local/lib/libpcl_apps.so: undefined reference to `pcl::EuclideanClusterExtraction<pcl::InterestPoint>::extract(std::vector<pcl::PointIndices ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2012-01-11 07:04:29 -0600

karthik gravatar image

Hi, Few changes to be done in the following files to make it work

a)CMakeLists.txt should have the following lines in this place just above the rosbuild_genmsg().

#Eigen required    
find_package(Eigen REQUIRED)
include_directories(${EIGEN_INCLUDE_DIRS})

This solves the above Eigen/StdVector issue.

b)segment_object_in_hand.cpp should have the following changes done to be done search for

typedef pcl::KdTree<Point>::Ptr KdTreePtr;

and change it to search namespace as the unstable version supports it

typedef pcl::search::KdTree<Point>::Ptr KdTreePtr;

Hence change the below line to

clusters_tree_ = boost::make_shared<pcl::KdTreeFLANN<Point> >();

to

clusters_tree_ = boost::make_shared<pcl::search::KdTree<Point> >();

c)Finally do similar changes to the tabletop_segmentation.cpp

change

typedef pcl::KdTree<Point>::Ptr KdTreePtr;

to

typedef pcl::search::KdTree<Point>::Ptr KdTreePtr;

and change

normals_tree_ = boost::make_shared<pcl::KdTreeFLANN<Point> >();
clusters_tree_ = boost::make_shared<pcl::KdTreeFLANN<Point> >();

to

normals_tree_ = boost::make_shared<pcl::search::KdTree<Point> >();
clusters_tree_ = boost::make_shared<pcl::search::KdTree<Point> >();

Now compile the whole package and hopefully it should get compiled without any error. :)

Hope this helps!

Thanks, Karthik

edit flag offensive delete link more

Comments

Editing the CMakeLists.txt as mentioned here should be done to the original file that comes with the package not with the one that is in the question of this thread.
karthik gravatar image karthik  ( 2012-01-11 07:26:44 -0600 )edit

Question Tools

Stats

Asked: 2012-01-09 05:45:23 -0600

Seen: 1,486 times

Last updated: Jan 11 '12