error: no matching function for call to -- ROS (C++)

63 views Asked by At

I'm currently making my end-of-master project in ROS (C++). I'm doing an algorithm for climbing slopes with a robot. When I use catkin_make, I receive this:

error: no matching function for call to ‘boost::shared_ptr\<pcl::PointCloud\<pcl::PointXYZ\> \>::shared_ptr(const boost::shared_ptr\<const pcl::PointCloud\<pcl::PointXYZ\> \>&)’
this_type(r).swap(\*this);
^
/usr/include/boost/smart_ptr/shared_ptr.hpp:572:5: note: candidate: template\<class Y\> boost::shared_ptr\<T\>::shared_ptr(boost::shared_ptr\<Y\>&&, typename boost::detail::sp_enable_if_convertible\<Y, T\>::type)
shared_ptr( shared_ptr\<Y\> && r, typename boost::detail::sp_enable_if_convertible\<Y,T\>::type = boost::detail::sp_empty() )


/usr/include/boost/smart_ptr/shared_ptr.hpp:572:5: note:   template argument deduction/substitution failed:
/usr/include/boost/smart_ptr/shared_ptr.hpp:511:9: note:   types ‘boost::shared_ptr\<X\>’ and ‘const boost::shared_ptr\<const pcl::PointCloud\<pcl::PointXYZ\> \>’ have incompatible cv-qualifiers
this_type(r).swap(\*this);
 ^
/usr/include/boost/smart_ptr/shared_ptr.hpp:563:5: note: candidate: boost::shared_ptr\<T\>::shared_ptr(boost::shared_ptr\<T\>&&) \[with T = pcl::PointCloud\<pcl::PointXYZ\>\]
shared_ptr( shared_ptr && r ) BOOST_NOEXCEPT : px( r.px ), pn()

And the message is even longer with more notes and two more errors, how could i solve it?

Thanks.

I think it could be for using const pointers but I'm not sure.

0

There are 0 answers