introlab / rtabmap_ros

RTAB-Map's ROS package.
http://wiki.ros.org/rtabmap_ros
BSD 3-Clause "New" or "Revised" License
916 stars 549 forks source link

ROS2 Rtabmap_viz build error #1144

Open Dragonrock opened 2 months ago

Dragonrock commented 2 months ago

I had to rebuild rtabmap from source in my system after some changes and I can do all packages except rtabmap_viz where I get the following kind of errors, one being:

/opt/ros/humble/include/rclcpp/rclcpp/client.hpp: In instantiation of ‘std::optional<std::variant<std::promise<typename ServiceT::Response::SharedPtr>, std::tuple<std::function<void(std::shared_future<typename ServiceT::Response::SharedPtr>)>, std::shared_future<typename ServiceT::Response::SharedPtr>, std::promise<typename ServiceT::Response::SharedPtr> >, std::tuple<std::function<void(std::shared_future<std::pair<typename ServiceT::Request::SharedPtr, typename ServiceT::Response::SharedPtr> >)>, typename ServiceT::Request::SharedPtr, std::shared_future<std::pair<typename ServiceT::Request::SharedPtr, typename ServiceT::Response::SharedPtr> >, std::promise<std::pair<typename ServiceT::Request::SharedPtr, typename ServiceT::Response::SharedPtr> > > > > rclcpp::Client<ServiceT>::get_and_erase_pending_request(int64_t) [with ServiceT = std_srvs::srv::Empty; typename ServiceT::Response::SharedPtr = std::shared_ptr<std_srvs::srv::Empty_Response_<std::allocator<void> > >; typename ServiceT::Request::SharedPtr = std::shared_ptr<std_srvs::srv::Empty_Request_<std::allocator<void> > >; int64_t = long int]’:
/opt/ros/humble/include/rclcpp/rclcpp/client.hpp:551:38:   required from ‘void rclcpp::Client<ServiceT>::handle_response(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<void>) [with ServiceT = std_srvs::srv::Empty]’
/home/@@@@@@/ros2_ws/src/rtabmap_ros/rtabmap_viz/src/GuiWrapper.cpp:1238:1:   required from here
/opt/ros/humble/include/rclcpp/rclcpp/client.hpp:821:12: error: could not convert ‘value’ from ‘std::variant<std::promise<std::shared_ptr<std_srvs::srv::Empty_Response_<std::allocator<void> > > >, std::tuple<std::function<void(std::shared_future<std::shared_ptr<std_srvs::srv::Empty_Response_<std::allocator<void> > > >)>, std::shared_future<std::shared_ptr<std_srvs::srv::Empty_Response_<std::allocator<void> > > >, std::promise<std::shared_ptr<std_srvs::srv::Empty_Response_<std::allocator<void> > > > >, std::tuple<std::function<void(std::shared_future<std::pair<std::shared_ptr<std_srvs::srv::Empty_Request_<std::allocator<void> > >, std::shared_ptr<std_srvs::srv::Empty_Response_<std::allocator<void> > > > >)>, std::shared_ptr<std_srvs::srv::Empty_Request_<std::allocator<void> > >, std::shared_future<std::pair<std::shared_ptr<std_srvs::srv::Empty_Request_<std::allocator<void> > >, std::shared_ptr<std_srvs::srv::Empty_Response_<std::allocator<void> > > > >, std::promise<std::pair<std::shared_ptr<std_srvs::srv::Empty_Request_<std::allocator<void> > >, std::shared_ptr<std_srvs::srv::Empty_Response_<std::allocator<void> > > > > > >’ to ‘std::optional<std::variant<std::promise<std::shared_ptr<std_srvs::srv::Empty_Response_<std::allocator<void> > > >, std::tuple<std::function<void(std::shared_future<std::shared_ptr<std_srvs::srv::Empty_Response_<std::allocator<void> > > >)>, std::shared_future<std::shared_ptr<std_srvs::srv::Empty_Response_<std::allocator<void> > > >, std::promise<std::shared_ptr<std_srvs::srv::Empty_Response_<std::allocator<void> > > > >, std::tuple<std::function<void(std::shared_future<std::pair<std::shared_ptr<std_srvs::srv::Empty_Request_<std::allocator<void> > >, std::shared_ptr<std_srvs::srv::Empty_Response_<std::allocator<void> > > > >)>, std::shared_ptr<std_srvs::srv::Empty_Request_<std::allocator<void> > >, std::shared_future<std::pair<std::shared_ptr<std_srvs::srv::Empty_Request_<std::allocator<void> > >, std::shared_ptr<std_srvs::srv::Empty_Response_<std::allocator<void> > > > >, std::promise<std::pair<std::shared_ptr<std_srvs::srv::Empty_Request_<std::allocator<void> > >, std::shared_ptr<std_srvs::srv::Empty_Response_<std::allocator<void> > > > > > > >’
gmake[2]: *** [CMakeFiles/rtabmap_viz.dir/build.make:90: CMakeFiles/rtabmap_viz.dir/src/GuiWrapper.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:137: CMakeFiles/rtabmap_viz.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2
---
Failed   <<< rtabmap_viz [25.6s, exited with code 2]
matlabbe commented 2 months ago

It looks like a rclcpp related issue.