hku-mars / FAST_LIO

A computationally efficient and robust LiDAR-inertial odometry (LIO) package
GNU General Public License v2.0
2.79k stars 939 forks source link

error for rclcpp::AnyServiceCallback #328

Closed bird-sheep closed 5 months ago

bird-sheep commented 6 months ago

I build the project for ros2 foxy and the error occured:

/opt/ros/foxy/include/rclcpp/create_service.hpp:43:3: error: no matching function for call to ‘rclcpp::AnyServiceCallback

It shows require from FAST_LIO/src/laserMapping.cpp:945:181

the code is :

"""cpp map_savesrv = this->create_service("map_save", std::bind(&LaserMappingNode::map_save_callback, this, std::placeholders::_1, std::placeholders::_2)); """

after the first error,the followings are:

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

the picture of error is bottom: image