Ericsii / FAST_LIO_ROS2

ROS2 version of FAST_LIO2. Welcome to the technical communication discord server discord: https://discord.gg/U3B65MGH8m
GNU General Public License v2.0
125 stars 26 forks source link

在foxy下编译问题 #12

Closed Yoyo-yi closed 2 months ago

Yoyo-yi commented 3 months ago

请问在foxy上编译,有以下报错是为什么呀? /home/nav_ros2/src/slam/FAST_LIO_ROS2/src/laserMapping.cpp:944:181: required from here /opt/ros/foxy/include/rclcpp/create_service.hpp:43:3: error: no matching function for call to ‘rclcpp::AnyServiceCallback::set(std::_Bind<void (LaserMappingNode::(LaserMappingNode, std::_Placeholder<1>, std::_Placeholder<2>))(std::shared_ptr<const std_srvs::srv::TriggerRequest<std::allocator > >, std::shared_ptr<std_srvs::srv::TriggerResponse<std::allocator > >)>)’ 43 | any_service_callback.set(std::forward(callback)); | ^~~~~~~~ In file included from /opt/ros/foxy/include/rclcpp/service.hpp:28, from /opt/ros/foxy/include/rclcpp/callback_group.hpp:25, from /opt/ros/foxy/include/rclcpp/any_executable.hpp:20, from /opt/ros/foxy/include/rclcpp/memory_strategy.hpp:24, from /opt/ros/foxy/include/rclcpp/memory_strategies.hpp:18, from /opt/ros/foxy/include/rclcpp/executor_options.hpp:20, from /opt/ros/foxy/include/rclcpp/executor.hpp:33, from /opt/ros/foxy/include/rclcpp/executors/multi_threaded_executor.hpp:26, from /opt/ros/foxy/include/rclcpp/executors.hpp:21, from /opt/ros/foxy/include/rclcpp/rclcpp.hpp:146, from /home/nav_ros2/src/slam/FAST_LIO_ROS2/src/laserMapping.cpp:45 /opt/ros/foxy/include/rclcpp/any_service_callback.hpp:67:8: note: candidate: ‘template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<std_srvs::srv::TriggerRequest<std::allocator > >, std::shared_ptr<std_srvs::srv::TriggerResponse<std::allocator > >)> >::value, void>::type > void rclcpp::AnyServiceCallback::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr, std::shared_ptr)> >::value>::type = ; ServiceT = std_srvs::srv::Trigger]’ 67 | void set(CallbackT callback) | ^~~ /opt/ros/foxy/include/rclcpp/any_service_callback.hpp:67:8: note: template argument deduction/substitution failed: /opt/ros/foxy/include/rclcpp/any_service_callback.hpp:65:17: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’ 65 | >::type * = nullptr

Ericsii commented 3 months ago

目前当前仓库没有支持foxy,如果要在foxy下编译可以试试这个PR的代码:https://github.com/hku-mars/FAST_LIO/pull/307

Yoyo-yi commented 3 months ago

目前当前仓库没有支持foxy,如果要在foxy下编译可以试试这个PR的代码:hku-mars#307

感谢感谢,我试试!