vision_opencv install/build error
I have been trying to install the ROS package 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<image_geometry::PinholeCameraModel::Cache>’ and ‘std::shared_ptr<image_geometry::PinholeCameraModel::Cache>’)
cache_ = std::make_shared<Cache>();
^
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<T>& boost::shared_ptr<T>::operator=(const boost::shared_ptr<T>&) [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<image_geometry::PinholeCameraModel::Cache>’ to ‘const boost::shared_ptr<image_geometry::PinholeCameraModel::Cache>&’
/usr/include/boost/smart_ptr/shared_ptr.hpp:509:18: note: candidate: template<class Y> boost::shared_ptr<T>& boost::shared_ptr<T>::operator=(const boost::shared_ptr<Y>&) [with Y = Y; T = image_geometry::PinholeCameraModel::Cache]
shared_ptr & operator=(shared_ptr<Y> 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<image_geometry::PinholeCameraModel::Cache>’ is not derived from ‘const boost::shared_ptr<X>’
cache_ = std::make_shared<Cache>();
^
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<class Y> boost::shared_ptr<T>& boost::shared_ptr<T>::operator=(std::auto_ptr<_Up>&) [with Y = Y; T = image_geometry::PinholeCameraModel::Cache]
shared_ptr & operator=( std::auto_ptr<Y> & r ...
Which version of ROS are you using ?
As mentioned in the question, I am using ROS Kinetic and OpenCV 3.2