请问在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
请问在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));
| ^ > >, 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
~~~~~~~ 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