pcl_apps
pcl_apps copied to clipboard
Colcon build error
Error while building the pcl_apps using colcon
I have cloned the source code and added the dependency repos message_synchroniser and then tried to build the work space using colcon build and there are some build error, and it failed.
Environment (please complete the following information):
- OS: [Ubuntu]
- ROS2 foxy
- Version [e.g. 0.0.1]
To Reproduce Steps to reproduce the behavior:
- mkdir PCL_Nodes && git clone https://github.com/OUXT-Polaris/pcl_apps.git
- git clone https://github.com/OUXT-Polaris/message_synchronizer.git
- colcon build
xxxx@xxxxxx-GP75-Leopard-10SFK:~/PCL_Nodes$ colcon build
Starting >>> message_synchronizer
Starting >>> pcl_apps_msgs
Finished <<< message_synchronizer [0.08s]
Finished <<< pcl_apps_msgs [0.23s]
Starting >>> pcl_apps --- stderr: pcl_apps
/home/xxxx/PCL_Nodes/pcl_apps/src/filter/crop_hull_filter/crop_hull_filter_component.cpp: In member function ‘void pcl_apps::CropHullFilterComponent::callback(sensor_msgs::msg::PointCloud2_<std::allocator>::ConstSharedPtr, pcl_apps_msgs::msg::PolygonArray_<std::allocator >::ConstSharedPtr)’: /home/xxxx/PCL_Nodes/pcl_apps/src/filter/crop_hull_filter/crop_hull_filter_component.cpp:68:31: error: cannot convert ‘boost::shared_ptr<pcl::PointCloudpcl::PointXYZI >’ to ‘const PointCloudConstPtr&’ {aka ‘const std::shared_ptr<const pcl::PointCloudpcl::PointXYZI >&’} 68 | convex_hull.setInputCloud(hull_cloud); | ^~~~~~~~~~ | | | boost::shared_ptr<pcl::PointCloudpcl::PointXYZI > In file included from /usr/local/include/pcl-1.12/pcl/surface/reconstruction.h:42, from /usr/local/include/pcl-1.12/pcl/surface/convex_hull.h:48, from /home/xxxx/PCL_Nodes/pcl_apps/src/filter/crop_hull_filter/crop_hull_filter_component.cpp:17: /usr/local/include/pcl-1.12/pcl/pcl_base.h:92:48: note: initializing argument 1 of ‘void pcl::PCLBase<PointT>::setInputCloud(const PointCloudConstPtr&) [with PointT = pcl::PointXYZI; pcl::PCLBase<PointT>::PointCloudConstPtr = std::shared_ptr<const pcl::PointCloudpcl::PointXYZI >]’ 92 | setInputCloud (const PointCloudConstPtr &cloud); | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~ /home/xxxx/PCL_Nodes/pcl_apps/src/filter/crop_hull_filter/crop_hull_filter_component.cpp:71:25: error: cannot convert ‘boost::shared_ptr<pcl::PointCloudpcl::PointXYZI >’ to ‘pcl::CropHullpcl::PointXYZI::PointCloudPtr’ {aka ‘std::shared_ptr<pcl::PointCloudpcl::PointXYZI >’} 71 | filter.setHullCloud(hull_points); | ^~~~~~~~~~~ | | | boost::shared_ptr<pcl::PointCloudpcl::PointXYZI > In file included from /home/xxxx/PCL_Nodes/pcl_apps/include/pcl_apps/filter/crop_hull_filter/crop_hull_filter_component.hpp:59, from /home/xxxx/PCL_Nodes/pcl_apps/src/filter/crop_hull_filter/crop_hull_filter_component.cpp:20: /usr/local/include/pcl-1.12/pcl/filters/crop_hull.h:98:35: note: initializing argument 1 of ‘void pcl::CropHull<PointT>::setHullCloud(pcl::CropHull<PointT>::PointCloudPtr) [with PointT = pcl::PointXYZI; pcl::CropHull<PointT>::PointCloudPtr = std::shared_ptr<pcl::PointCloudpcl::PointXYZI >]’ 98 | setHullCloud (PointCloudPtr points) | ~~~~~~~~~~~~~~^~~~~~ /home/xxxx/PCL_Nodes/pcl_apps/src/matching/ndt_matching/ndt_matching_component.cpp: In lambda function: /home/xxxx/PCL_Nodes/pcl_apps/src/matching/ndt_matching/ndt_matching_component.cpp:139:25: error: cannot convert ‘boost::shared_ptr<pcl::PointCloudpcl::PointXYZ >’ to ‘const PointCloudTargetConstPtr&’ {aka ‘const std::shared_ptr<const pcl::PointCloudpcl::PointXYZ >&’} 139 | ndt_.setInputTarget(reference_cloud_); | ^~~~~~~~~~~~~~~~ | | | boost::shared_ptr<pcl::PointCloudpcl::PointXYZ > In file included from /home/xxxx/PCL_Nodes/pcl_apps/include/pcl_apps/matching/ndt_matching/ndt_matching_component.hpp:71, from /home/xxxx/PCL_Nodes/pcl_apps/src/matching/ndt_matching/ndt_matching_component.cpp:15: /usr/local/include/pcl-1.12/pcl/registration/ndt.h:108:50: note: initializing argument 1 of ‘void pcl::NormalDistributionsTransform<PointSource, PointTarget>::setInputTarget(const PointCloudTargetConstPtr&) [with PointSource = pcl::PointXYZ; PointTarget = pcl::PointXYZ; pcl::NormalDistributionsTransform<PointSource, PointTarget>::PointCloudTargetConstPtr = std::shared_ptr<const pcl::PointCloudpcl::PointXYZ >]’ 108 | setInputTarget(const PointCloudTargetConstPtr& cloud) override | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~ /home/xxxx/PCL_Nodes/pcl_apps/src/matching/ndt_matching/ndt_matching_component.cpp: In lambda function: /home/xxxx/PCL_Nodes/pcl_apps/src/matching/ndt_matching/ndt_matching_component.cpp:156:24: error: cannot convert ‘boost::shared_ptr<pcl::PointCloudpcl::PointXYZ >’ to ‘pcl::PointCloudpcl::PointXYZ::Ptr’ {aka ‘std::shared_ptr<pcl::PointCloudpcl::PointXYZ >’} 156 | updateRelativePose(input_cloud, msg->header.stamp); | ^~~~~~~~~~~ | | | boost::shared_ptr<pcl::PointCloudpcl::PointXYZ > In file included from /home/xxxx/PCL_Nodes/pcl_apps/src/matching/ndt_matching/ndt_matching_component.cpp:15: /home/xxxx/PCL_Nodes/pcl_apps/include/pcl_apps/matching/ndt_matching/ndt_matching_component.hpp:107:63: note: initializing argument 1 of ‘void pcl_apps::NdtMatchingComponent::updateRelativePose(pcl::PointCloudpcl::PointXYZ::Ptr, rclcpp::Time)’ 107 | void updateRelativePose(pcl::PointCloudpcl::PointXYZ::Ptr input_cloud, rclcpp::Time stamp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~ make[2]: *** [src/filter/CMakeFiles/crop_hull_filter_component.dir/build.make:76: src/filter/CMakeFiles/crop_hull_filter_component.dir/crop_hull_filter/crop_hull_filter_component.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:454: src/filter/CMakeFiles/crop_hull_filter_component.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... make[2]: *** [src/matching/CMakeFiles/ndt_matching_component.dir/build.make:76: src/matching/CMakeFiles/ndt_matching_component.dir/ndt_matching/ndt_matching_component.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:610: src/matching/CMakeFiles/ndt_matching_component.dir/all] Error 2 make: *** [Makefile:146: all] Error 2
Failed <<< pcl_apps [9.52s, exited with code 2]
Summary: 2 packages finished [9.83s] 1 package failed: pcl_apps 1 package had stderr output: pcl_apps
@MedisettiRameshNaidu Sorry for my late reply. Which version of pcl are you using?