I have been trying to [install the ROS package](http://wiki.ros.org/vision_opencv) called `vision_opencv`, in order to run some OpenCV 3.2 code with ROS Kinetic on a Parrot 1.0 AR Drone. I tried the install by executing `git clone https://github.com/ros-perception/vision_opencv` within my `~/catkin_ws/src` directory. Then, I ran `catkin_make` in `~/catkin_ws` but received the following error:
.....(some terminal ouput intentionally left blank)......
[ 96%] Built target ardronelib
[ 97%] Built target ardrone_driver
/home/robotics/catkin_ws/src/vision_opencv/image_geometry/src/pinhole_camera_model.cpp: In member function ‘bool image_geometry::PinholeCameraModel::fromCameraInfo(const CameraInfo&)’:
/home/robotics/catkin_ws/src/vision_opencv/image_geometry/src/pinhole_camera_model.cpp:87:12: error: no match for ‘operator=’ (operand types are ‘boost::shared_ptr’ and ‘std::shared_ptr’)
cache_ = std::make_shared();
^
In file included from /usr/include/boost/shared_ptr.hpp:17:0,
from /usr/include/boost/format/alt_sstream.hpp:21,
from /usr/include/boost/format/internals.hpp:23,
from /usr/include/boost/format.hpp:38,
from /usr/include/boost/math/policies/error_handling.hpp:31,
from /usr/include/boost/math/special_functions/round.hpp:14,
from /opt/ros/kinetic/include/ros/time.h:58,
from /opt/ros/kinetic/include/ros/serialization.h:34,
from /opt/ros/kinetic/include/sensor_msgs/CameraInfo.h:14,
from /opt/ros/kinetic/include/image_geometry/pinhole_camera_model.h:4,
from /home/robotics/catkin_ws/src/vision_opencv/image_geometry/src/pinhole_camera_model.cpp:3:
/usr/include/boost/smart_ptr/shared_ptr.hpp:500:18: note: candidate: boost::shared_ptr& boost::shared_ptr::operator=(const boost::shared_ptr&) [with T = image_geometry::PinholeCameraModel::Cache]
shared_ptr & operator=( shared_ptr const & r ) BOOST_NOEXCEPT
^
/usr/include/boost/smart_ptr/shared_ptr.hpp:500:18: note: no known conversion for argument 1 from ‘std::shared_ptr’ to ‘const boost::shared_ptr&’
/usr/include/boost/smart_ptr/shared_ptr.hpp:509:18: note: candidate: template boost::shared_ptr& boost::shared_ptr::operator=(const boost::shared_ptr&) [with Y = Y; T = image_geometry::PinholeCameraModel::Cache]
shared_ptr & operator=(shared_ptr const & r) BOOST_NOEXCEPT
^
/usr/include/boost/smart_ptr/shared_ptr.hpp:509:18: note: template argument deduction/substitution failed:
/home/robotics/catkin_ws/src/vision_opencv/image_geometry/src/pinhole_camera_model.cpp:87:12: note: ‘std::shared_ptr’ is not derived from ‘const boost::shared_ptr’
cache_ = std::make_shared();
^
In file included from /usr/include/boost/shared_ptr.hpp:17:0,
from /usr/include/boost/format/alt_sstream.hpp:21,
from /usr/include/boost/format/internals.hpp:23,
from /usr/include/boost/format.hpp:38,
from /usr/include/boost/math/policies/error_handling.hpp:31,
from /usr/include/boost/math/special_functions/round.hpp:14,
from /opt/ros/kinetic/include/ros/time.h:58,
from /opt/ros/kinetic/include/ros/serialization.h:34,
from /opt/ros/kinetic/include/sensor_msgs/CameraInfo.h:14,
from /opt/ros/kinetic/include/image_geometry/pinhole_camera_model.h:4,
from /home/robotics/catkin_ws/src/vision_opencv/image_geometry/src/pinhole_camera_model.cpp:3:
/usr/include/boost/smart_ptr/shared_ptr.hpp:520:18: note: candidate: template boost::shared_ptr& boost::shared_ptr::operator=(std::auto_ptr<_Up>&) [with Y = Y; T = image_geometry::PinholeCameraModel::Cache]
shared_ptr & operator=( std::auto_ptr& r )
^
/usr/include/boost/smart_ptr/shared_ptr.hpp:520:18: note: template argument deduction/substitution failed:
/home/robotics/catkin_ws/src/vision_opencv/image_geometry/src/pinhole_camera_model.cpp:87:12: note: ‘std::shared_ptr’ is not derived from ‘std::auto_ptr’
cache_ = std::make_shared();
^
In file included from /usr/include/boost/shared_ptr.hpp:17:0,
from /usr/include/boost/format/alt_sstream.hpp:21,
from /usr/include/boost/format/internals.hpp:23,
from /usr/include/boost/format.hpp:38,
from /usr/include/boost/math/policies/error_handling.hpp:31,
from /usr/include/boost/math/special_functions/round.hpp:14,
from /opt/ros/kinetic/include/ros/time.h:58,
from /opt/ros/kinetic/include/ros/serialization.h:34,
from /opt/ros/kinetic/include/sensor_msgs/CameraInfo.h:14,
from /opt/ros/kinetic/include/image_geometry/pinhole_camera_model.h:4,
from /home/robotics/catkin_ws/src/vision_opencv/image_geometry/src/pinhole_camera_model.cpp:3:
/usr/include/boost/smart_ptr/shared_ptr.hpp:529:18: note: candidate: template boost::shared_ptr& boost::shared_ptr::operator=(std::auto_ptr<_Up>&&) [with Y = Y; T = image_geometry::PinholeCameraModel::Cache]
shared_ptr & operator=( std::auto_ptr&& r )
^
/usr/include/boost/smart_ptr/shared_ptr.hpp:529:18: note: template argument deduction/substitution failed:
/home/robotics/catkin_ws/src/vision_opencv/image_geometry/src/pinhole_camera_model.cpp:87:12: note: ‘std::shared_ptr’ is not derived from ‘std::auto_ptr’
cache_ = std::make_shared();
^
In file included from /usr/include/boost/shared_ptr.hpp:17:0,
from /usr/include/boost/format/alt_sstream.hpp:21,
from /usr/include/boost/format/internals.hpp:23,
from /usr/include/boost/format.hpp:38,
from /usr/include/boost/math/policies/error_handling.hpp:31,
from /usr/include/boost/math/special_functions/round.hpp:14,
from /opt/ros/kinetic/include/ros/time.h:58,
from /opt/ros/kinetic/include/ros/serialization.h:34,
from /opt/ros/kinetic/include/sensor_msgs/CameraInfo.h:14,
from /opt/ros/kinetic/include/image_geometry/pinhole_camera_model.h:4,
from /home/robotics/catkin_ws/src/vision_opencv/image_geometry/src/pinhole_camera_model.cpp:3:
/usr/include/boost/smart_ptr/shared_ptr.hpp:551:18: note: candidate: template boost::shared_ptr& boost::shared_ptr::operator=(std::unique_ptr<_Up, _Ep>&&) [with Y = Y; D = D; T = image_geometry::PinholeCameraModel::Cache]
shared_ptr & operator=( std::unique_ptr&& r )
^
/usr/include/boost/smart_ptr/shared_ptr.hpp:551:18: note: template argument deduction/substitution failed:
/home/robotics/catkin_ws/src/vision_opencv/image_geometry/src/pinhole_camera_model.cpp:87:12: note: ‘std::shared_ptr’ is not derived from ‘std::unique_ptr<_Tp, _Dp>’
cache_ = std::make_shared();
^
In file included from /usr/include/boost/shared_ptr.hpp:17:0,
from /usr/include/boost/format/alt_sstream.hpp:21,
from /usr/include/boost/format/internals.hpp:23,
from /usr/include/boost/format.hpp:38,
from /usr/include/boost/math/policies/error_handling.hpp:31,
from /usr/include/boost/math/special_functions/round.hpp:14,
from /opt/ros/kinetic/include/ros/time.h:58,
from /opt/ros/kinetic/include/ros/serialization.h:34,
from /opt/ros/kinetic/include/sensor_msgs/CameraInfo.h:14,
from /opt/ros/kinetic/include/image_geometry/pinhole_camera_model.h:4,
from /home/robotics/catkin_ws/src/vision_opencv/image_geometry/src/pinhole_camera_model.cpp:3:
/usr/include/boost/smart_ptr/shared_ptr.hpp:587:18: note: candidate: boost::shared_ptr& boost::shared_ptr::operator=(boost::shared_ptr&&) [with T = image_geometry::PinholeCameraModel::Cache]
shared_ptr & operator=( shared_ptr && r ) BOOST_NOEXCEPT
^
/usr/include/boost/smart_ptr/shared_ptr.hpp:587:18: note: no known conversion for argument 1 from ‘std::shared_ptr’ to ‘boost::shared_ptr&&’
/usr/include/boost/smart_ptr/shared_ptr.hpp:594:18: note: candidate: template boost::shared_ptr& boost::shared_ptr::operator=(boost::shared_ptr&&) [with Y = Y; T = image_geometry::PinholeCameraModel::Cache]
shared_ptr & operator=( shared_ptr&& r ) BOOST_NOEXCEPT
^
/usr/include/boost/smart_ptr/shared_ptr.hpp:594:18: note: template argument deduction/substitution failed:
/home/robotics/catkin_ws/src/vision_opencv/image_geometry/src/pinhole_camera_model.cpp:87:12: note: ‘std::shared_ptr’ is not derived from ‘boost::shared_ptr’
cache_ = std::make_shared();
^
In file included from /usr/include/boost/shared_ptr.hpp:17:0,
from /usr/include/boost/format/alt_sstream.hpp:21,
from /usr/include/boost/format/internals.hpp:23,
from /usr/include/boost/format.hpp:38,
from /usr/include/boost/math/policies/error_handling.hpp:31,
from /usr/include/boost/math/special_functions/round.hpp:14,
from /opt/ros/kinetic/include/ros/time.h:58,
from /opt/ros/kinetic/include/ros/serialization.h:34,
from /opt/ros/kinetic/include/sensor_msgs/CameraInfo.h:14,
from /opt/ros/kinetic/include/image_geometry/pinhole_camera_model.h:4,
from /home/robotics/catkin_ws/src/vision_opencv/image_geometry/src/pinhole_camera_model.cpp:3:
/usr/include/boost/smart_ptr/shared_ptr.hpp:604:18: note: candidate: boost::shared_ptr& boost::shared_ptr::operator=(boost::detail::sp_nullptr_t) [with T = image_geometry::PinholeCameraModel::Cache; boost::detail::sp_nullptr_t = std::nullptr_t]
shared_ptr & operator=( boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT // never throws
^
/usr/include/boost/smart_ptr/shared_ptr.hpp:604:18: note: no known conversion for argument 1 from ‘std::shared_ptr’ to ‘boost::detail::sp_nullptr_t {aka std::nullptr_t}’
vision_opencv/image_geometry/CMakeFiles/image_geometry.dir/build.make:62: recipe for target 'vision_opencv/image_geometry/CMakeFiles/image_geometry.dir/src/pinhole_camera_model.cpp.o' failed
make[2]: *** [vision_opencv/image_geometry/CMakeFiles/image_geometry.dir/src/pinhole_camera_model.cpp.o] Error 1
CMakeFiles/Makefile2:2116: recipe for target 'vision_opencv/image_geometry/CMakeFiles/image_geometry.dir/all' failed
make[1]: *** [vision_opencv/image_geometry/CMakeFiles/image_geometry.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 98%] Linking CXX shared library /home/robotics/catkin_ws/devel/lib/python2.7/dist-packages/cv_bridge/boost/cv_bridge_boost.so
[ 98%] Built target cv_bridge_boost
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j8 -l8" failed
robotics@robotics-2:~/catkin_ws$
Based on the ouptut it seems there is an issue with the `/home/robotics/catkin_ws/src/vision_opencv/image_geometry/src/pinhole_camera_model.cpp` file, but I am unable to figure out how to fix it. I do not know if the way I cloned the package resulted in the error or if it's something with my computer. Any help is greatly appreciated.
↧