Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in argument of align function #25

Closed
AchmadFathoni opened this issue Apr 14, 2021 · 0 comments
Closed

Error in argument of align function #25

AchmadFathoni opened this issue Apr 14, 2021 · 0 comments

Comments

@AchmadFathoni
Copy link
Contributor

AchmadFathoni commented Apr 14, 2021

[ 83%] Building CXX object CMakeFiles/align.dir/apps/align.cpp.o
In file included from /usr/include/boost/smart_ptr/detail/sp_thread_sleep.hpp:22,
                 from /usr/include/boost/smart_ptr/detail/yield_k.hpp:23,
                 from /usr/include/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp:14,
                 from /usr/include/boost/smart_ptr/detail/spinlock.hpp:42,
                 from /usr/include/boost/smart_ptr/detail/spinlock_pool.hpp:25,
                 from /usr/include/boost/smart_ptr/shared_ptr.hpp:29,
                 from /usr/include/boost/shared_ptr.hpp:17,
                 from /opt/ros/noetic/include/ros/forwards.h:37,
                 from /opt/ros/noetic/include/ros/common.h:37,
                 from /opt/ros/noetic/include/ros/ros.h:43,
                 from /home/toni/.cache/yay/ros-noetic-ndt-omp-git/src/ros-noetic-ndt-omp-git/apps/align.cpp:2:
/usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
   36 | BOOST_PRAGMA_MESSAGE(
      | ^~~~~~~~~~~~~~~~~~~~
/home/toni/.cache/yay/ros-noetic-ndt-omp-git/src/ros-noetic-ndt-omp-git/apps/align.cpp: In function ‘int main(int, char**)’:
/home/toni/.cache/yay/ros-noetic-ndt-omp-git/src/ros-noetic-ndt-omp-git/apps/align.cpp:80:55: error: no matching function for call to ‘align(pclomp::GeneralizedIterativeClosestPoint<pcl::PointXYZ, pcl::PointXYZ>::Ptr&, pcl::PointCloud<pcl::PointXYZ>::Ptr&, pcl::PointCloud<pcl::PointXYZ>::Ptr&)’
   80 |   aligned = align(gicp_omp, target_cloud, source_cloud);
      |                                                       ^
/home/toni/.cache/yay/ros-noetic-ndt-omp-git/src/ros-noetic-ndt-omp-git/apps/align.cpp:15:37: note: candidate: ‘pcl::PointCloud<pcl::PointXYZ>::Ptr align(pcl::Registration<pcl::PointXYZ, pcl::PointXYZ>::Ptr, const Ptr&, const Ptr&)’
   15 | pcl::PointCloud<pcl::PointXYZ>::Ptr align(pcl::Registration<pcl::PointXYZ, pcl::PointXYZ>::Ptr registration, const pcl::PointCloud<pcl::PointXYZ>::Ptr& target_cloud, const pcl::PointCloud<pcl::PointXYZ>::Ptr& source_cloud ) {
      |                                     ^~~~~
/home/toni/.cache/yay/ros-noetic-ndt-omp-git/src/ros-noetic-ndt-omp-git/apps/align.cpp:15:96: note:   no known conversion for argument 1 from ‘pclomp::GeneralizedIterativeClosestPoint<pcl::PointXYZ, pcl::PointXYZ>::Ptr’ {aka ‘boost::shared_ptr<pclomp::GeneralizedIterativeClosestPoint<pcl::PointXYZ, pcl::PointXYZ> >’} to ‘pcl::Registration<pcl::PointXYZ, pcl::PointXYZ>::Ptr’ {aka ‘std::shared_ptr<pcl::Registration<pcl::PointXYZ, pcl::PointXYZ> >’}
   15 | pcl::PointCloud<pcl::PointXYZ>::Ptr align(pcl::Registration<pcl::PointXYZ, pcl::PointXYZ>::Ptr registration, const pcl::PointCloud<pcl::PointXYZ>::Ptr& target_cloud, const pcl::PointCloud<pcl::PointXYZ>::Ptr& source_cloud ) {
      |                                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
In file included from /usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp:35,
                 from /usr/include/boost/smart_ptr/detail/shared_count.hpp:27,
                 from /usr/include/boost/smart_ptr/shared_ptr.hpp:17,
                 from /usr/include/boost/shared_ptr.hpp:17,
                 from /opt/ros/noetic/include/ros/forwards.h:37,
                 from /opt/ros/noetic/include/ros/common.h:37,
                 from /opt/ros/noetic/include/ros/ros.h:43,
                 from /home/toni/.cache/yay/ros-noetic-ndt-omp-git/src/ros-noetic-ndt-omp-git/apps/align.cpp:2:
/usr/include/c++/10.2.0/memory:123:1: note: candidate: ‘void* std::align(std::size_t, std::size_t, void*&, std::size_t&)’
  123 | align(size_t __align, size_t __size, void*& __ptr, size_t& __space) noexcept
      | ^~~~~
/usr/include/c++/10.2.0/memory:123:1: note:   candidate expects 4 arguments, 3 provided
/home/toni/.cache/yay/ros-noetic-ndt-omp-git/src/ros-noetic-ndt-omp-git/apps/align.cpp:103:58: error: no matching function for call to ‘align(pclomp::NormalDistributionsTransform<pcl::PointXYZ, pcl::PointXYZ>::Ptr&, pcl::PointCloud<pcl::PointXYZ>::Ptr&, pcl::PointCloud<pcl::PointXYZ>::Ptr&)’
  103 |       aligned = align(ndt_omp, target_cloud, source_cloud);
      |                                                          ^
/home/toni/.cache/yay/ros-noetic-ndt-omp-git/src/ros-noetic-ndt-omp-git/apps/align.cpp:15:37: note: candidate: ‘pcl::PointCloud<pcl::PointXYZ>::Ptr align(pcl::Registration<pcl::PointXYZ, pcl::PointXYZ>::Ptr, const Ptr&, const Ptr&)’
   15 | pcl::PointCloud<pcl::PointXYZ>::Ptr align(pcl::Registration<pcl::PointXYZ, pcl::PointXYZ>::Ptr registration, const pcl::PointCloud<pcl::PointXYZ>::Ptr& target_cloud, const pcl::PointCloud<pcl::PointXYZ>::Ptr& source_cloud ) {
      |                                     ^~~~~
/home/toni/.cache/yay/ros-noetic-ndt-omp-git/src/ros-noetic-ndt-omp-git/apps/align.cpp:15:96: note:   no known conversion for argument 1 from ‘pclomp::NormalDistributionsTransform<pcl::PointXYZ, pcl::PointXYZ>::Ptr’ {aka ‘boost::shared_ptr<pclomp::NormalDistributionsTransform<pcl::PointXYZ, pcl::PointXYZ> >’} to ‘pcl::Registration<pcl::PointXYZ, pcl::PointXYZ>::Ptr’ {aka ‘std::shared_ptr<pcl::Registration<pcl::PointXYZ, pcl::PointXYZ> >’}
   15 | pcl::PointCloud<pcl::PointXYZ>::Ptr align(pcl::Registration<pcl::PointXYZ, pcl::PointXYZ>::Ptr registration, const pcl::PointCloud<pcl::PointXYZ>::Ptr& target_cloud, const pcl::PointCloud<pcl::PointXYZ>::Ptr& source_cloud ) {
      |                                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
In file included from /usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp:35,
                 from /usr/include/boost/smart_ptr/detail/shared_count.hpp:27,
                 from /usr/include/boost/smart_ptr/shared_ptr.hpp:17,
                 from /usr/include/boost/shared_ptr.hpp:17,
                 from /opt/ros/noetic/include/ros/forwards.h:37,
                 from /opt/ros/noetic/include/ros/common.h:37,
                 from /opt/ros/noetic/include/ros/ros.h:43,
                 from /home/toni/.cache/yay/ros-noetic-ndt-omp-git/src/ros-noetic-ndt-omp-git/apps/align.cpp:2:
/usr/include/c++/10.2.0/memory:123:1: note: candidate: ‘void* std::align(std::size_t, std::size_t, void*&, std::size_t&)’
  123 | align(size_t __align, size_t __size, void*& __ptr, size_t& __space) noexcept
      | ^~~~~
/usr/include/c++/10.2.0/memory:123:1: note:   candidate expects 4 arguments, 3 provided
make[2]: *** [CMakeFiles/align.dir/build.make:76: CMakeFiles/align.dir/apps/align.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:607: CMakeFiles/align.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

#26 should fix this. This project use c++14, but why use boost::shared_ptr when std::shared_str exist since c++11?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant