2024年4月24日
ROS2编译FAST_LIO出错
/home/robot/dev_ws/src/FAST_LIO/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<std_srvs::srv::Trigger>::set(std::_Bind<void (LaserMappingNode::*(LaserMappingNode*, std::_Placeholder<1>, std::_Placeholder<2>))(std::shared_ptr<const std_srvs::srv::Trigger_Request_<std::allocator<void> > >, std::shared_ptr<std_srvs::srv::Trigger_Response_<std::allocator<void> > >)>)’ 43 | any_service_callback.set(std::forward<CallbackT>(callback)); | ^~~~~~~~~~~~~~~~~~~~
/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
/opt/ros/foxy/include/rclcpp/any_service_callback.hpp:79:17: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’ 79 | >::type * = nullptr
解决办法:升级到Ubuntu22.04 ro2-humble