Ask Your Question
0

Error in openni_grabber.cpp while installing ROS Groovy from source on Ubuntu 13.10

asked 2014-02-06 05:24:14 -0600

TSC gravatar image

updated 2014-02-17 05:36:51 -0600

Hi there,

When running the command ./src/catkin/bin/catkin_make_isolated --install I get the following error:

    Linking CXX executable ../../../bin/pcl_ply2obj
    [  4%] Built target pcl_ply2obj
    Linking CXX executable ../../../bin/pcl_ply2raw
    make[2]: ** [octree/CMakeFiles/pcl_octree.dir/src/octree_impl.cpp.o] Erro 1
    make[1]: ** [octree/CMakeFiles/pcl_octree.dir/all] Erro 2
    [  4%] Built target pcl_ply2raw
    Linking CXX executable ../../../bin/pcl_ply2ply
    [  4%] Built target pcl_ply2ply
    make: ** [all] Erro 2
    <== Failed to process package 'pcl': 
      Command '/home/nuno/ros_catkin_ws/install_isolated/env.sh make -j8 -l8' returned non-zero exit status 2

    Reproduce this error by running:
    ==> cd /home/nuno/ros_catkin_ws/build_isolated/pcl && /home/nuno/ros_catkin_ws/install_isolated/env.sh make -j8 -l8
Command failed, exiting.

I corrected the above error using the solution of the Eigen h file, now I get the following:

    /home/nuno/ros_catkin_ws_groovy/src/pcl/common/include/pcl/impl/point_types.hpp:143:9: note: attribute for ‘union pcl::_PointSurfel::<anonymous>’ must follow the ‘union’ keyword
   union { \
         ^
/home/nuno/ros_catkin_ws_groovy/src/pcl/common/include/pcl/impl/point_types.hpp:1264:5: note: in expansion of macro ‘PCL_ADD_NORMAL4D’
     PCL_ADD_NORMAL4D; // This adds the member normal[3] which can also be accessed using the point (which is float[4])
     ^
/home/nuno/ros_catkin_ws_groovy/src/pcl/io/src/openni_grabber.cpp: In member function ‘pcl::PointCloud<pcl::PointXYZ>::Ptr pcl::OpenNIGrabber::convertToXYZPointCloud(const boost::shared_ptr<openni_wrapper::DepthImage>&) const’:
/home/nuno/ros_catkin_ws_groovy/src/pcl/io/src/openni_grabber.cpp:576:63: error: no matching function for call to ‘boost::shared_array<short unsigned int>::shared_array(int)’
     static boost::shared_array<unsigned short> depth_buffer (0);
                                                               ^
/home/nuno/ros_catkin_ws_groovy/src/pcl/io/src/openni_grabber.cpp:576:63: note: candidates are:
In file included from /usr/include/boost/shared_array.hpp:17:0,
                 from /home/nuno/ros_catkin_ws_groovy/src/roscpp_serialization/include/ros/serialized_message.h:33,
                 from /home/nuno/ros_catkin_ws_groovy/src/roscpp_serialization/include/ros/serialization.h:36,
                 from /home/nuno/ros_catkin_ws_groovy/devel_isolated/std_msgs/include/std_msgs/Header.h:47,
                 from /home/nuno/ros_catkin_ws_groovy/src/pcl/common/include/pcl/point_cloud.h:45,
                 from /home/nuno/ros_catkin_ws_groovy/src/pcl/io/src/openni_grabber.cpp:42:
/usr/include/boost/smart_ptr/shared_array.hpp:126:5: note: template<class Y> boost::shared_array<T>::shared_array(const boost::shared_array<Y>&, boost::shared_array<T>::element_type*)
     shared_array( shared_array<Y> const & r, element_type * p ) BOOST_NOEXCEPT : px( p ), pn( r.pn )
     ^
/usr/include/boost/smart_ptr/shared_array.hpp:126:5: note:   template argument deduction/substitution failed:
/home/nuno/ros_catkin_ws_groovy/src/pcl/io/src/openni_grabber.cpp:576:63: note:   mismatched types ‘const boost::shared_array<T>’ and ‘int’
     static boost::shared_array<unsigned short> depth_buffer (0);
                                                               ^
In file included from /usr/include/boost/shared_array.hpp:17:0,
                 from /home/nuno/ros_catkin_ws_groovy/src/roscpp_serialization/include/ros/serialized_message.h:33,
                 from /home/nuno/ros_catkin_ws_groovy/src/roscpp_serialization/include/ros/serialization.h:36,
                 from /home/nuno/ros_catkin_ws_groovy/devel_isolated/std_msgs/include/std_msgs/Header.h:47,
                 from /home/nuno/ros_catkin_ws_groovy/src/pcl/common/include/pcl/point_cloud.h:45,
                 from /home/nuno/ros_catkin_ws_groovy/src/pcl/io/src/openni_grabber.cpp:42:
/usr/include/boost/smart_ptr/shared_array.hpp:111:5: note: template<class Y> boost::shared_array<T>::shared_array(const boost::shared_array<Y>&, typename boost::detail ...
(more)
edit retag flag offensive close merge delete

Comments

Showing the full error message when running "VERBOSE=1 catkin_make_isolated -j1" would help.

demmeln gravatar imagedemmeln ( 2014-02-11 01:15:22 -0600 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2014-02-16 09:05:27 -0600

demmeln gravatar image

It seems like you have a Eigen version installed that is too new for PCL. It seems in 3.2 the sqrt function moved from eigen::internal::sqrt to eigen::sqrt. See this question:

http://answers.ros.org/question/12891...

So you could either try to change the source of PCL or make sure it is using eigen 3.1 to compile.

edit flag offensive delete link more

Comments

I changed the question, cause the solution for the eigen.h error is given in this answer. But after that, It crashes in another error.

TSC gravatar imageTSC ( 2014-02-17 05:38:34 -0600 )edit

How exactly did you change the eigen file? What version are you using? Can you try using a version of Eigen that is known to work with PCL, like 3.0.5 or 3.1.0 as suggested in the answer I linked? I dont know if the new error is due to Eigen, but it makes things easier to start with validated deps.

demmeln gravatar imagedemmeln ( 2014-02-17 09:58:56 -0600 )edit

What I did was changing Eigen::internal::sqrt to pcl::sqrt and Eigen::internal::sin/cos to sin/cos, as suggested in a related post here in the forum. Anyway, how can I change the version of Eigen?

TSC gravatar imageTSC ( 2014-02-17 10:19:27 -0600 )edit

Not sure. I'm on a Mac so I have a hard time testing this. I guess Eigen is system installed?

demmeln gravatar imagedemmeln ( 2014-02-17 13:05:15 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2014-02-06 05:24:14 -0600

Seen: 537 times

Last updated: Feb 17 '14