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

Build error when adding a new point type #22

Closed
henry0572 opened this issue Jul 6, 2020 · 2 comments
Closed

Build error when adding a new point type #22

henry0572 opened this issue Jul 6, 2020 · 2 comments

Comments

@henry0572
Copy link

henry0572 commented Jul 6, 2020

Last year, a per-point time stamp was added to velodyne ros drivers.

ros-drivers velodyne
Issue Add a per-point timestamping of data
ros-drivers/velodyne#281
PR Add per-point time field
ros-drivers/velodyne#290

I'd like to use this in ndt_omp as well, as it helps with distortion correction in combination with IMU.

I added a new point time PointXYZIT in reference to the issue below, but it doesn't work.

fast_gicp
Support for more pcl point types
koide3/fast_gicp#10

henry@ubuntu:~/catkin_ws$ catkin_make -j4

~~~
[100%] Linking CXX executable /home/henry/catkin_ws/devel/lib/ndt_omp/align
/usr/bin/ld: /home/henry/catkin_ws/devel/lib/libndt_omp.so: undefined reference to `pcl::KdTreeFLANN<PointXYZIT, flann::L2_Simple<float> >::nearestKSearch(PointXYZIT const&, int, std::vector<int, std::allocator<int> >&, std::vector<float, std::allocator<float> >&) const'
/usr/bin/ld: /home/henry/catkin_ws/devel/lib/libndt_omp.so: undefined reference to `pcl::KdTreeFLANN<PointXYZIT, flann::L2_Simple<float> >::setInputCloud(boost::shared_ptr<pcl::PointCloud<PointXYZIT> const> const&, boost::shared_ptr<std::vector<int, std::allocator<int> > const> const&)'
/usr/bin/ld: /home/henry/catkin_ws/devel/lib/libndt_omp.so: undefined reference to `pcl::KdTreeFLANN<PointXYZIT, flann::L2_Simple<float> >::radiusSearch(PointXYZIT const&, double, std::vector<int, std::allocator<int> >&, std::vector<float, std::allocator<float> >&, unsigned int) const'
/usr/bin/ld: /home/henry/catkin_ws/devel/lib/libndt_omp.so: undefined reference to `pcl::VoxelGrid<PointXYZIT>::applyFilter(pcl::PointCloud<PointXYZIT>&)'
/usr/bin/ld: /home/henry/catkin_ws/devel/lib/libndt_omp.so: undefined reference to `pcl::PCLBase<PointXYZIT>::setIndices(boost::shared_ptr<std::vector<int, std::allocator<int> > const> const&)'
/usr/bin/ld: /home/henry/catkin_ws/devel/lib/libndt_omp.so: undefined reference to `void pcl::getMinMax3D<PointXYZIT>(pcl::PointCloud<PointXYZIT>::ConstPtr const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, float, float, Eigen::Matrix<float, 4, 1, 0, 4, 1>&, Eigen::Matrix<float, 4, 1, 0, 4, 1>&, bool)'
/usr/bin/ld: /home/henry/catkin_ws/devel/lib/libndt_omp.so: undefined reference to `pcl::KdTreeFLANN<PointXYZIT, flann::L2_Simple<float> >::KdTreeFLANN(bool)'
/usr/bin/ld: /home/henry/catkin_ws/devel/lib/libndt_omp.so: undefined reference to `pcl::KdTreeFLANN<PointXYZIT, flann::L2_Simple<float> >::setEpsilon(float)'
/usr/bin/ld: /home/henry/catkin_ws/devel/lib/libndt_omp.so: undefined reference to `pcl::PCLBase<PointXYZIT>::setInputCloud(boost::shared_ptr<pcl::PointCloud<PointXYZIT> const> const&)'
/usr/bin/ld: /home/henry/catkin_ws/devel/lib/libndt_omp.so: undefined reference to `pcl::PCLBase<PointXYZIT>::setIndices(boost::shared_ptr<pcl::PointIndices const> const&)'
/usr/bin/ld: /home/henry/catkin_ws/devel/lib/libndt_omp.so: undefined reference to `pcl::PCLBase<PointXYZIT>::setIndices(unsigned long, unsigned long, unsigned long, unsigned long)'
/usr/bin/ld: /home/henry/catkin_ws/devel/lib/libndt_omp.so: undefined reference to `pcl::KdTreeFLANN<PointXYZIT, flann::L2_Simple<float> >::cleanup()'
/usr/bin/ld: /home/henry/catkin_ws/devel/lib/libndt_omp.so: undefined reference to `pcl::PCLBase<PointXYZIT>::PCLBase()'
/usr/bin/ld: /home/henry/catkin_ws/devel/lib/libndt_omp.so: undefined reference to `pcl::PCLBase<PointXYZIT>::setIndices(boost::shared_ptr<std::vector<int, std::allocator<int> > > const&)'
collect2: error: ld returned 1 exit status
make[2]: *** [ndt_omp/CMakeFiles/align.dir/build.make:390: /home/henry/catkin_ws/devel/lib/ndt_omp/align] エラー 1
make[1]: *** [CMakeFiles/Makefile2:4845: ndt_omp/CMakeFiles/align.dir/all] エラー 2
make: *** [Makefile:141: all] エラー 2
Invoking "make -j4" failed

Can you give me some advices on these result?
Thank you!

Customized ndt_omp
henry0572@de4d98b

@koide3
Copy link
Owner

koide3 commented Jul 6, 2020

@henry0572
Probably, you need to include implementation hpp files corresponding to the undefined references in voxel_grid_covariance_omp.cpp and ndt_omp.cpp (like following ones).

#include <pcl/impl/pcl_base.hpp>
#include <pcl/filters/impl/voxel_grid.hpp>
#include <pcl/kdtree/impl/kdtree_flann.hpp>

@henry0572
Copy link
Author

Thank you for your quick comment.
I was able to build it successfully.

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

2 participants