Closed Rorschach7771 closed 1 month ago
Failed <<< fast_lio [24.4s, exited with code 2]
Summary: 1 package finished [27.1s] 1 package failed: fast_lio 2 packages had stderr output: fast_lio livox_ros_driver2
foxy中service的callback函数没法使用std::bind传入,可以使用原仓库的这个PR版本支持foxy https://github.com/hku-mars/FAST_LIO/pull/334
在编译之前以及source过livox的驱动了,报错信息如下 /home/mio-3012/ws_livox/src/FAST_LIO/src/laserMapping.cpp:945: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
| ^, 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, std::shared_ptr)> >::value>::type = ; ServiceT = std_srvs::srv::Trigger]’
81 | void set(CallbackT callback)
| ^~~
/opt/ros/foxy/include/rclcpp/any_service_callback.hpp:81:8: note: template argument deduction/substitution failed:
/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
| ^
~~~~~~~ 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/mio-3012/ws_livox/src/FAST_LIO/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~~ /opt/ros/foxy/include/rclcpp/any_service_callback.hpp:81:8: note: candidate: ‘template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr~~ make[2]: [CMakeFiles/fastlio_mapping.dir/build.make:63:CMakeFiles/fastlio_mapping.dir/src/laserMapping.cpp.o] 错误 1 make[1]: [CMakeFiles/Makefile2:124:CMakeFiles/fastlio_mapping.dir/all] 错误 2 make: *** [Makefile:141:all] 错误 2Failed <<< fast_lio [24.4s, exited with code 2]
Summary: 1 package finished [27.1s] 1 package failed: fast_lio 2 packages had stderr output: fast_lio livox_ros_driver2