紧急通知:禁止一切关于政治&VPN翻墙等话题,发现相关帖子会立马删除封号
小鱼 ROS 2 新书上线!点击链接查看, 新书配套视频点击链接查看。
提问前必看的发帖注意事项—— 提问前必看!不符合要求的问题拒绝回答!!
社区使用指南—如何添加标签修改密码
小鱼 ROS 2 新书上线!点击链接查看, 新书配套视频点击链接查看。
提问前必看的发帖注意事项—— 提问前必看!不符合要求的问题拒绝回答!!
社区使用指南—如何添加标签修改密码
在ROS2中添加FAST_LIO功能包时,报错,而且不会找报错的地方
-
In file included from /opt/ros/foxy/include/rclcpp/node_impl.hpp:40,
from /opt/ros/foxy/include/rclcpp/node.hpp:1224,
from /opt/ros/foxy/include/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/foxy/include/rclcpp/executors.hpp:22,
from /opt/ros/foxy/include/rclcpp/rclcpp.hpp:146,
from /home/ma/mid360/src/FAST_LIO_ROS2/src/laserMapping.cpp:46:
/opt/ros/foxy/include/rclcpp/create_service.hpp: In instantiation of ‘typename rclcpp::Service<ServiceT>::SharedPtr rclcpp::create_service(std::shared_ptrrclcpp::node_interfaces::NodeBaseInterface, std::shared_ptrrclcpp::node_interfaces::NodeServicesInterface, const string&, CallbackT&&, const rmw_qos_profile_t&, rclcpp::CallbackGroup::SharedPtr) [with ServiceT = std_srvs::srv::Trigger; CallbackT = 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> > >)>; typename rclcpp::Service<ServiceT>::SharedPtr = std::shared_ptr<rclcpp::Service<std_srvs::srv::Trigger> >; std::string = std::__cxx11::basic_string<char>; rmw_qos_profile_t = rmw_qos_profile_t; rclcpp::CallbackGroup::SharedPtr = std::shared_ptrrclcpp::CallbackGroup]’:
/opt/ros/foxy/include/rclcpp/node_impl.hpp:146:53: required from ‘typename rclcpp::Service<ServiceT>::SharedPtr rclcpp::Node::create_service(const string&, CallbackT&&, const rmw_qos_profile_t&, rclcpp::CallbackGroup::SharedPtr) [with ServiceT = std_srvs::srv::Trigger; CallbackT = 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> > >)>; typename rclcpp::Service<ServiceT>::SharedPtr = std::shared_ptr<rclcpp::Service<std_srvs::srv::Trigger> >; std::string = std::cxx11::basic_string<char>; rmw_qos_profile_t = rmw_qos_profile_t; rclcpp::CallbackGroup::SharedPtr = std::shared_ptrrclcpp::CallbackGroup]’
/home/ma/mid360/src/FAST_LIO_ROS2/src/laserMapping.cpp:960: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));
| ^~~~~~~~~~~~~~~~~~~~
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/ma/mid360/src/FAST_LIO_ROS2/src/laserMapping.cpp:46:
/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::Trigger_Request<std::allocator<void> > >, std::shared_ptr<std_srvs::srv::Trigger_Response<std::allocator<void> > >)> >::value, void>::type* <anonymous> > void rclcpp::AnyServiceCallback<ServiceT>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<typename ServiceT::Request>, std::shared_ptr<typename ServiceT::Response>)> >::value>::type* <anonymous> = <enumerator>; 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
| ^~~~~~~
/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<rmw_request_id_t>, std::shared_ptr<std_srvs::srv::Trigger_Request<std::allocator<void> > >, std::shared_ptr<std_srvs::srv::Trigger_Response<std::allocator<void> > >)> >::value, void>::type* <anonymous> > void rclcpp::AnyServiceCallback<ServiceT>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<rmw_request_id_t>, std::shared_ptr<typename ServiceT::Request>, std::shared_ptr<typename ServiceT::Response>)> >::value>::type* <anonymous> = <enumerator>; 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
| ^~~~~~~
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.0s, exited with code 2