RRL-ALeRT / alert_ros2

0 stars 0 forks source link

Can't colcon build package #1

Closed KoaBou closed 1 year ago

KoaBou commented 1 year ago

Hi, I'm a fresher and I don't know why I can't build this package. Here is my terminal ntnguyen@trunkngin:~/dev_ws$ colcon build [0.385s] WARNING:colcon.colcon_core.package_selection:Some selected packages are already built in one or more underlay workspaces: 'turtlesim' is in: /home/ntnguyen/dev_ws/install/turtlesim, /opt/ros/foxy If a package in a merged underlay workspace is overridden and it installs headers, then all packages in the overlay must sort their include directories by workspace order. Failure to do so may result in build failures or undefined behavior at run time. If the overridden package is used by another package in any underlay, then the overriding package in the overlay must be API and ABI compatible or undefined behavior at run time may occur.

If you understand the risks and want to override a package anyways, add the following to the command line: --allow-overriding turtlesim

This may be promoted to an error in a future release of colcon-override-check. Starting >>> hector_map_tools Starting >>> hector_nav_msgs Starting >>> world_info_msgs Starting >>> apriltag Starting >>> apriltag_msgs Starting >>> hector_imu_attitude_to_tf Starting >>> basic_mobile_robot Starting >>> cpp_pubsub Starting >>> hector_imu_tools Starting >>> hector_marker_drawing
Starting >>> my_package Starting >>> my_py_package Finished <<< my_package [0.93s]
Starting >>> turtlesim Finished <<< basic_mobile_robot [1.03s] Finished <<< hector_map_tools [1.16s]
Starting >>> hector_compressed_map_transport Finished <<< cpp_pubsub [1.18s]
Finished <<< hector_marker_drawing [1.21s]
Finished <<< apriltag [1.32s] Finished <<< world_info_msgs [1.36s] Finished <<< apriltag_msgs [1.40s]
Starting >>> apriltag_ros Finished <<< hector_nav_msgs [1.79s]
Starting >>> hector_geotiff Starting >>> hector_mapping
Starting >>> hector_trajectory_server Finished <<< my_py_package [1.89s]
Finished <<< turtlesim [1.66s]
--- stderr: hector_imu_attitude_to_tf
In file included from /usr/include/c++/9/ext/alloc_traits.h:36, from /usr/include/c++/9/bits/stl_construct.h:61, from /usr/include/c++/9/memory:64, from /opt/ros/foxy/include/rclcpp/rclcpp.hpp:144, from /home/ntnguyen/dev_ws/src/hector_slam_ros2/hector_imu_attitude_to_tf/src/imu_attitude_to_tf_node.cpp:30: /usr/include/c++/9/bits/alloc_traits.h: In instantiation of ‘struct std::allocator_traits<std::allocator<const sensormsgs::msg::Imu<std::allocator >&> >’: /opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:47:9: required from ‘class rclcpp::message_memory_strategy::MessageMemoryStrategy<const sensormsgs::msg::Imu<std::allocator >&, std::allocator >’ /opt/ros/foxy/include/rclcpp/node_impl.hpp:91:1: required by substitution of ‘template<class MessageT, class CallbackT, class AllocatorT, class CallbackMessageT, class SubscriptionT, class MessageMemoryStrategyT> std::shared_ptr rclcpp::Node::create_subscription(const string&, const rclcpp::QoS&, CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = sensormsgs::msg::Imu<std::allocator >; CallbackT = void (&)(const sensormsgs::msg::Imu<std::allocator >&); AllocatorT = std::allocator; CallbackMessageT = const sensormsgs::msg::Imu<std::allocator >&; SubscriptionT = rclcpp::Subscription<const sensormsgs::msg::Imu<std::allocator >&, std::allocator, rclcpp::message_memory_strategy::MessageMemoryStrategy<const sensormsgs::msg::Imu<std::allocator >&, std::allocator > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<const sensormsgs::msg::Imu<std::allocator >&, std::allocator >]’ /home/ntnguyen/dev_ws/src/hector_slam_ros2/hector_imu_attitude_to_tf/src/imu_attitude_to_tf_node.cpp:85:105: required from here /usr/include/c++/9/bits/alloc_traits.h:399:13: error: forming pointer to reference type ‘const sensormsgs::msg::Imu<std::allocator >&’ 399 | using pointer = _Tp; | ^~~ /usr/include/c++/9/bits/alloc_traits.h:402:13: error: forming pointer to reference type ‘const sensormsgs::msg::Imu<std::allocator >&’ 402 | using const_pointer = const _Tp; | ^~~~~ In file included from /usr/include/c++/9/memory:80, from /opt/ros/foxy/include/rclcpp/rclcpp.hpp:144, from /home/ntnguyen/dev_ws/src/hector_slam_ros2/hector_imu_attitude_to_tf/src/imu_attitude_to_tf_node.cpp:30: /usr/include/c++/9/bits/unique_ptr.h: In instantiation of ‘struct std::default_delete<const sensormsgs::msg::Imu<std::allocator >&>’: /opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:119:18: required from ‘class rclcpp::message_memory_strategy::MessageMemoryStrategy<const sensormsgs::msg::Imu<std::allocator >&, std::allocator >’ /opt/ros/foxy/include/rclcpp/node_impl.hpp:91:1: required by substitution of ‘template<class MessageT, class CallbackT, class AllocatorT, class CallbackMessageT, class SubscriptionT, class MessageMemoryStrategyT> std::shared_ptr rclcpp::Node::create_subscription(const string&, const rclcpp::QoS&, CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = sensormsgs::msg::Imu<std::allocator >; CallbackT = void (&)(const sensormsgs::msg::Imu<std::allocator >&); AllocatorT = std::allocator; CallbackMessageT = const sensormsgs::msg::Imu<std::allocator >&; SubscriptionT = rclcpp::Subscription<const sensormsgs::msg::Imu<std::allocator >&, std::allocator, rclcpp::message_memory_strategy::MessageMemoryStrategy<const sensormsgs::msg::Imu<std::allocator >&, std::allocator > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<const sensormsgs::msg::Imu<std::allocator >&, std::allocator >]’ /home/ntnguyen/dev_ws/src/hector_slam_ros2/hector_imu_attitude_to_tf/src/imu_attitude_to_tf_node.cpp:85:105: required from here /usr/include/c++/9/bits/unique_ptr.h:71:9: error: forming pointer to reference type ‘const sensormsgs::msg::Imu<std::allocator >&’ 71 | default_delete(const default_delete<_Up>&) noexcept { } | ^~~~~~ /usr/include/c++/9/bits/unique_ptr.h:75:7: error: forming pointer to reference type ‘const sensormsgs::msg::Imu<std::allocator >&’ 75 | operator()(_Tp ptr) const | ^~~~ In file included from /opt/ros/foxy/include/rclcpp/subscription_base.hpp:29, from /opt/ros/foxy/include/rclcpp/callback_group.hpp:26, 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/ntnguyen/dev_ws/src/hector_slam_ros2/hector_imu_attitude_to_tf/src/imu_attitude_to_tf_node.cpp:30: /opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp: In instantiation of ‘class rclcpp::AnySubscriptionCallback<const sensormsgs::msg::Imu<std::allocator >&, std::allocator >’: /opt/ros/foxy/include/rclcpp/subscription_factory.hpp:96:57: required from ‘rclcpp::SubscriptionFactory rclcpp::create_subscription_factory(CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator&, typename MessageMemoryStrategyT::SharedPtr, std::shared_ptr<rclcpp::topic_statistics::SubscriptionTopicStatistics >) [with MessageT = sensormsgs::msg::Imu<std::allocator >; CallbackT = void (&)(const sensormsgs::msg::Imu<std::allocator >&); AllocatorT = std::allocator; CallbackMessageT = const sensormsgs::msg::Imu<std::allocator >&; SubscriptionT = rclcpp::Subscription<const sensormsgs::msg::Imu<std::allocator >&, std::allocator, rclcpp::message_memory_strategy::MessageMemoryStrategy<const sensormsgs::msg::Imu<std::allocator >&, std::allocator > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<const sensormsgs::msg::Imu<std::allocator >&, std::allocator >; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<const sensormsgs::msg::Imu<std::allocator >&, std::allocator > >]’ /opt/ros/foxy/include/rclcpp/create_subscription.hpp:144:63: required from ‘std::shared_ptr rclcpp::create_subscription(NodeT&&, const string&, const rclcpp::QoS&, CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = sensormsgs::msg::Imu<std::allocator >; CallbackT = void (&)(const sensormsgs::msg::Imu<std::allocator >&); AllocatorT = std::allocator; CallbackMessageT = const sensormsgs::msg::Imu<std::allocator >&; SubscriptionT = rclcpp::Subscription<const sensormsgs::msg::Imu<std::allocator >&, std::allocator, rclcpp::message_memory_strategy::MessageMemoryStrategy<const sensormsgs::msg::Imu<std::allocator >&, std::allocator > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<const sensormsgs::msg::Imu<std::allocator >&, std::allocator >; NodeT = rclcpp::Node&; std::string = std::cxx11::basic_string; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<const sensormsgs::msg::Imu<std::allocator >&, std::allocator > >]’ /opt/ros/foxy/include/rclcpp/node_impl.hpp:98:47: required from ‘std::shared_ptr rclcpp::Node::create_subscription(const string&, const rclcpp::QoS&, CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = sensormsgs::msg::Imu<std::allocator >; CallbackT = void (&)(const sensormsgs::msg::Imu<std::allocator >&); AllocatorT = std::allocator; CallbackMessageT = const sensormsgs::msg::Imu<std::allocator >&; SubscriptionT = rclcpp::Subscription<const sensormsgs::msg::Imu<std::allocator >&, std::allocator, rclcpp::message_memory_strategy::MessageMemoryStrategy<const sensormsgs::msg::Imu<std::allocator >&, std::allocator > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<const sensormsgs::msg::Imu<std::allocator >&, std::allocator >; std::string = std::__cxx11::basic_string; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<const sensormsgs::msg::Imu<std::allocator >&, std::allocator > >]’ /home/ntnguyen/dev_ws/src/hector_slam_ros2/hector_imu_attitude_to_tf/src/imu_attitude_to_tf_node.cpp:85:105: required from here /opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:111:8: error: ‘template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<const sensormsgs::msg::Imu<std::allocator >&>)> >::value, void>::type > void rclcpp::AnySubscriptionCallback<MessageT, Alloc>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr)> >::value>::type = ; MessageT = const sensormsgs::msg::Imu<std::allocator >&; Alloc = std::allocator]’ cannot be overloaded with ‘template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<const sensormsgs::msg::Imu<std::allocator >&>)> >::value, void>::type > void rclcpp::AnySubscriptionCallback<MessageT, Alloc>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<_Tp>)> >::value>::type = ; MessageT = const sensormsgs::msg::Imu<std::allocator >&; Alloc = std::allocator]’ 111 | void set(CallbackT callback) | ^~~ /opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:83:8: note: previous declaration ‘template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<const sensormsgs::msg::Imu<std::allocator >&>)> >::value, void>::type > void rclcpp::AnySubscriptionCallback<MessageT, Alloc>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<_Tp>)> >::value>::type = ; MessageT = const sensormsgs::msg::Imu<std::allocator >&; Alloc = std::allocator]’ 83 | void set(CallbackT callback) | ^~~ /opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:125:8: error: ‘template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<const sensormsgs::msg::Imu<std::allocator >&>, const rclcpp::MessageInfo&)> >::value, void>::type > void rclcpp::AnySubscriptionCallback<MessageT, Alloc>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr, const rclcpp::MessageInfo&)> >::value>::type = ; MessageT = const sensormsgs::msg::Imu<std::allocator >&; Alloc = std::allocator]’ cannot be overloaded with ‘template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<const sensormsgs::msg::Imu<std::allocator >&>, const rclcpp::MessageInfo&)> >::value, void>::type > void rclcpp::AnySubscriptionCallback<MessageT, Alloc>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<_Tp>, const rclcpp::MessageInfo&)> >::value>::type = ; MessageT = const sensormsgs::msg::Imu<std::allocator >&; Alloc = std::allocator]’ 125 | void set(CallbackT callback) | ^~~ /opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:97:8: note: previous declaration ‘template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<const sensormsgs::msg::Imu<std::allocator >&>, const rclcpp::MessageInfo&)> >::value, void>::type > void rclcpp::AnySubscriptionCallback<MessageT, Alloc>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<_Tp>, const rclcpp::MessageInfo&)> >::value>::type = ; MessageT = const sensormsgs::msg::Imu<std::allocator >&; Alloc = std::allocator]’ 97 | void set(CallbackT callback) | ^~~ In file included from /opt/ros/foxy/include/rclcpp/node_interfaces/node_topics_interface.hpp:32, from /opt/ros/foxy/include/rclcpp/node.hpp:55, 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/ntnguyen/dev_ws/src/hector_slam_ros2/hector_imu_attitude_to_tf/src/imu_attitude_to_tf_node.cpp:30: /opt/ros/foxy/include/rclcpp/subscription_factory.hpp: In instantiation of ‘rclcpp::SubscriptionFactory rclcpp::create_subscription_factory(CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator&, typename MessageMemoryStrategyT::SharedPtr, std::shared_ptr<rclcpp::topic_statistics::SubscriptionTopicStatistics >) [with MessageT = sensormsgs::msg::Imu<std::allocator >; CallbackT = void (&)(const sensormsgs::msg::Imu<std::allocator >&); AllocatorT = std::allocator; CallbackMessageT = const sensormsgs::msg::Imu<std::allocator >&; SubscriptionT = rclcpp::Subscription<const sensormsgs::msg::Imu<std::allocator >&, std::allocator, rclcpp::message_memory_strategy::MessageMemoryStrategy<const sensormsgs::msg::Imu<std::allocator >&, std::allocator > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<const sensormsgs::msg::Imu<std::allocator >&, std::allocator >; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<const sensormsgs::msg::Imu<std::allocator >&, std::allocator > >]’: /opt/ros/foxy/include/rclcpp/create_subscription.hpp:144:63: required from ‘std::shared_ptr rclcpp::create_subscription(NodeT&&, const string&, const rclcpp::QoS&, CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = sensormsgs::msg::Imu<std::allocator >; CallbackT = void (&)(const sensormsgs::msg::Imu<std::allocator >&); AllocatorT = std::allocator; CallbackMessageT = const sensormsgs::msg::Imu<std::allocator >&; SubscriptionT = rclcpp::Subscription<const sensormsgs::msg::Imu<std::allocator >&, std::allocator, rclcpp::message_memory_strategy::MessageMemoryStrategy<const sensormsgs::msg::Imu<std::allocator >&, std::allocator > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<const sensormsgs::msg::Imu<std::allocator >&, std::allocator >; NodeT = rclcpp::Node&; std::string = std::__cxx11::basic_string; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<const sensormsgs::msg::Imu<std::allocator >&, std::allocator > >]’ /opt/ros/foxy/include/rclcpp/node_impl.hpp:98:47: required from ‘std::shared_ptr rclcpp::Node::create_subscription(const string&, const rclcpp::QoS&, CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = sensormsgs::msg::Imu<std::allocator >; CallbackT = void (&)(const sensormsgs::msg::Imu<std::allocator >&); AllocatorT = std::allocator; CallbackMessageT = const sensormsgs::msg::Imu<std::allocator >&; SubscriptionT = rclcpp::Subscription<const sensormsgs::msg::Imu<std::allocator >&, std::allocator, rclcpp::message_memory_strategy::MessageMemoryStrategy<const sensormsgs::msg::Imu<std::allocator >&, std::allocator > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<const sensormsgs::msg::Imu<std::allocator >&, std::allocator >; std::string = std::__cxx11::basic_string; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<const sensormsgs::msg::Imu<std::allocator >&, std::allocator > >]’ /home/ntnguyen/dev_ws/src/hector_slam_ros2/hector_imu_attitude_to_tf/src/imu_attitude_to_tf_node.cpp:85:105: required from here /opt/ros/foxy/include/rclcpp/subscription_factory.hpp:97:3: error: no matching function for call to ‘rclcpp::AnySubscriptionCallback<const sensormsgs::msg::Imu<std::allocator >&, std::allocator >::set(void (&)(const sensormsgs::msg::Imu<std::allocator >&))’ 97 | any_subscription_callback.set(std::forward(callback)); | ^~~~~~~~~ In file included from /opt/ros/foxy/include/rclcpp/subscription_base.hpp:29, from /opt/ros/foxy/include/rclcpp/callback_group.hpp:26, 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/ntnguyen/dev_ws/src/hector_slam_ros2/hector_imu_attitude_to_tf/src/imu_attitude_to_tf_node.cpp:30: /opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:83:8: note: candidate: ‘template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<const sensormsgs::msg::Imu<std::allocator >&>)> >::value, void>::type > void rclcpp::AnySubscriptionCallback<MessageT, Alloc>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<_Tp>)> >::value>::type = ; MessageT = const sensormsgs::msg::Imu<std::allocator >&; Alloc = std::allocator]’ 83 | void set(CallbackT callback) | ^~~ /opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:83:8: note: template argument deduction/substitution failed: /opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:81:17: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’ 81 | >::type = nullptr | ^~~ /opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:97:8: note: candidate: ‘template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<const sensormsgs::msg::Imu<std::allocator >&>, const rclcpp::MessageInfo&)> >::value, void>::type > void rclcpp::AnySubscriptionCallback<MessageT, Alloc>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<_Tp>, const rclcpp::MessageInfo&)> >::value>::type = ; MessageT = const sensormsgs::msg::Imu<std::allocator >&; Alloc = std::allocator]’ 97 | void set(CallbackT callback) | ^~~ /opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:97:8: note: template argument deduction/substitution failed: /opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:95:17: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’ 95 | >::type = nullptr | ^~~ /opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:139:8: note: candidate: ‘template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::unique_ptr<const sensormsgs::msg::Imu<std::allocator >&, std::default_delete<const sensormsgs::msg::Imu<std::allocator >&> >)> >::value, void>::type > void rclcpp::AnySubscriptionCallback<MessageT, Alloc>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::unique_ptr<MessageT, typename std::conditional<std::is_same<typename std::allocator_traits<typename std::allocator_traits<_Alloc>::rebind_traits::allocator_type>::rebind_alloc, typename std::allocator::rebind<_Tp1>::other>::value, std::default_delete<_Tp>, rclcpp::allocator::AllocatorDeleter<typename std::allocator_traits<_Alloc>::rebind_traits::allocator_type> >::type>)> >::value>::type = ; MessageT = const sensormsgs::msg::Imu<std::allocator >&; Alloc = std::allocator]’ 139 | void set(CallbackT callback) | ^~~ /opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:139:8: note: template argument deduction/substitution failed: /opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:137:17: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’ 137 | >::type = nullptr | ^~~ /opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:153:8: note: candidate: ‘template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::unique_ptr<const sensormsgs::msg::Imu<std::allocator >&, std::default_delete<const sensormsgs::msg::Imu<std::allocator >&> >, const rclcpp::MessageInfo&)> >::value, void>::type > void rclcpp::AnySubscriptionCallback<MessageT, Alloc>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::unique_ptr<MessageT, typename std::conditional<std::is_same<typename std::allocator_traits<typename std::allocator_traits<_Alloc>::rebind_traits::allocator_type>::rebind_alloc, typename std::allocator::rebind<_Tp1>::other>::value, std::default_delete<_Tp>, rclcpp::allocator::AllocatorDeleter<typename std::allocator_traits<_Alloc>::rebind_traits::allocator_type> >::type>, const rclcpp::MessageInfo&)> >::value>::type = ; MessageT = const sensormsgs::msg::Imu<std::allocator >&; Alloc = std::allocator]’ 153 | void set(CallbackT callback) | ^~~ /opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:153:8: note: template argument deduction/substitution failed: /opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:151:17: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’ 151 | >::type = nullptr | ^~~ In file included from /usr/include/x86_64-linux-gnu/c++/9/bits/c++allocator.h:33, from /usr/include/c++/9/bits/allocator.h:46, from /usr/include/c++/9/memory:63, from /opt/ros/foxy/include/rclcpp/rclcpp.hpp:144, from /home/ntnguyen/dev_ws/src/hector_slam_ros2/hector_imu_attitude_to_tf/src/imu_attitude_to_tf_node.cpp:30: /usr/include/c++/9/ext/new_allocator.h: In instantiation of ‘class gnu_cxx::new_allocator<const sensormsgs::msg::Imu<std::allocator >&>’: /usr/include/c++/9/bits/allocator.h:111:11: required from ‘class std::allocator<const sensormsgs::msg::Imu<std::allocator >&>’ /usr/include/c++/9/bits/shared_ptr_base.h:1365:63: required by substitution of ‘template struct std::__shared_ptr<std::allocator<const sensormsgs::msg::Imu<std::allocator >&>, gnu_cxx::_S_atomic>::has_esft_base<_Yp, std::__void_t<decltype (enable_shared_from_this_base(declval<const std::__shared_count<__gnu_cxx::_S_atomic>&>(), declval<_Yp>()))> > [with _Yp = std::allocator<const sensormsgs::msg::Imu<std::allocator >&>]’ /usr/include/c++/9/bits/shared_ptr_base.h:1387:21: required by substitution of ‘template<class _Yp, class _Yp2> typename std::enable_if<(! std::shared_ptr<std::allocator<const sensormsgs::msg::Imu<std::allocator >&>, __gnu_cxx::_S_atomic>::has_esft_base<_Yp2, void>::value), void>::type std::shared_ptr<std::allocator<const sensormsgs::msg::Imu<std::allocator >&>, gnu_cxx::_S_atomic>::_M_enable_shared_from_this_with<_Yp, _Yp2>(_Yp*) [with _Yp = std::allocator<const sensormsgs::msg::Imu<std::allocator >&>; _Yp2 = std::allocator<const sensormsgs::msg::Imu<std::allocator >&>]’ /usr/include/c++/9/bits/shared_ptr_base.h:1345:4: required from ‘std::shared_ptr<_Tp, _Lp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<std::allocator<const sensormsgs::msg::Imu<std::allocator >&> >; _Args = {std::allocator&}; _Tp = std::allocator<const sensormsgs::msg::Imu<std::allocator >&>; gnu_cxx::_Lock_policy _Lp = gnu_cxx::_S_atomic]’ /usr/include/c++/9/bits/shared_ptr.h:359:59: required from ‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<std::allocator<const sensormsgs::msg::Imu<std::allocator >&> >; _Args = {std::allocator&}; _Tp = std::allocator<const sensormsgs::msg::Imu<std::allocator >&>]’ /usr/include/c++/9/bits/shared_ptr.h:701:14: [ skipping 7 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ] /usr/include/c++/9/bits/shared_ptr_base.h:1344:71: required from ‘std::shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<rclcpp::message_memory_strategy::MessageMemoryStrategy<const sensormsgs::msg::Imu<std::allocator >&, std::allocator > >; _Args = {std::shared_ptr<std::allocator >}; _Tp = rclcpp::message_memory_strategy::MessageMemoryStrategy<const sensormsgs::msg::Imu<std::allocator >&, std::allocator >; gnu_cxx::_Lock_policy _Lp = gnu_cxx::_S_atomic]’ /usr/include/c++/9/bits/shared_ptr.h:359:59: required from ‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<rclcpp::message_memory_strategy::MessageMemoryStrategy<const sensormsgs::msg::Imu<std::allocator >&, std::allocator > >; _Args = {std::shared_ptr<std::allocator >}; _Tp = rclcpp::message_memory_strategy::MessageMemoryStrategy<const sensormsgs::msg::Imu<std::allocator >&, std::allocator >]’ /usr/include/c++/9/bits/shared_ptr.h:701:14: required from ‘std::shared_ptr<_Tp> std::allocate_shared(const _Alloc&, _Args&& ...) [with _Tp = rclcpp::message_memory_strategy::MessageMemoryStrategy<const sensormsgs::msg::Imu<std::allocator >&, std::allocator >; _Alloc = std::allocator<rclcpp::message_memory_strategy::MessageMemoryStrategy<const sensormsgs::msg::Imu<std::allocator >&, std::allocator > >; _Args = {std::shared_ptr<std::allocator >}]’ /usr/include/c++/9/bits/shared_ptr.h:717:39: required from ‘std::shared_ptr<_Tp> std::make_shared(_Args&& ...) [with _Tp = rclcpp::message_memory_strategy::MessageMemoryStrategy<const sensormsgs::msg::Imu<std::allocator >&, std::allocator >; _Args = {std::shared_ptr<std::allocator >}]’ /opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:80:68: required from ‘static rclcpp::message_memory_strategy::MessageMemoryStrategy<MessageT, Alloc>::SharedPtr rclcpp::message_memory_strategy::MessageMemoryStrategy<MessageT, Alloc>::create_default() [with MessageT = const sensormsgs::msg::Imu<std::allocator >&; Alloc = std::allocator; rclcpp::message_memory_strategy::MessageMemoryStrategy<MessageT, Alloc>::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<const sensormsgs::msg::Imu<std::allocator >&, std::allocator > >]’ /opt/ros/foxy/include/rclcpp/node.hpp:220:45: required from here /usr/include/c++/9/ext/new_allocator.h:63:26: error: forming pointer to reference type ‘const sensormsgs::msg::Imu<std::allocator >&’ 63 | typedef _Tp pointer; | ^~~ /usr/include/c++/9/ext/new_allocator.h:64:26: error: forming pointer to reference type ‘const sensormsgs::msg::Imu<std::allocator >&’ 64 | typedef const _Tp const_pointer; | ^~~~~ In file included from /usr/include/c++/9/memory:63, from /opt/ros/foxy/include/rclcpp/rclcpp.hpp:144, from /home/ntnguyen/dev_ws/src/hector_slam_ros2/hector_imu_attitude_to_tf/src/imu_attitude_to_tf_node.cpp:30: /usr/include/c++/9/bits/allocator.h: In instantiation of ‘class std::allocator<const sensormsgs::msg::Imu<std::allocator >&>’: /usr/include/c++/9/bits/shared_ptr_base.h:1365:63: required by substitution of ‘template struct std::shared_ptr<std::allocator<const sensormsgs::msg::Imu<std::allocator >&>, gnu_cxx::_S_atomic>::__has_esft_base<_Yp, std::void_t<decltype (enable_shared_from_this_base(declval<const std::shared_count<__gnu_cxx::_S_atomic>&>(), declval<_Yp>()))> > [with _Yp = std::allocator<const sensormsgs::msg::Imu<std::allocator >&>]’ /usr/include/c++/9/bits/shared_ptr_base.h:1387:21: required by substitution of ‘template<class _Yp, class _Yp2> typename std::enable_if<(! std::shared_ptr<std::allocator<const sensormsgs::msg::Imu<std::allocator >&>, __gnu_cxx::_S_atomic>::has_esft_base<_Yp2, void>::value), void>::type std::__shared_ptr<std::allocator<const sensormsgs::msg::Imu<std::allocator >&>, __gnu_cxx::_S_atomic>::_M_enable_shared_from_this_with<_Yp, _Yp2>(_Yp) [with _Yp = std::allocator<const sensormsgs::msg::Imu<std::allocator >&>; _Yp2 = std::allocator<const sensormsgs::msg::Imu<std::allocator >&>]’ /usr/include/c++/9/bits/shared_ptr_base.h:1345:4: required from ‘std::shared_ptr<_Tp, _Lp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<std::allocator<const sensormsgs::msg::Imu<std::allocator >&> >; _Args = {std::allocator&}; _Tp = std::allocator<const sensormsgs::msg::Imu<std::allocator >&>; gnu_cxx::_Lock_policy _Lp = gnu_cxx::_S_atomic]’ /usr/include/c++/9/bits/shared_ptr.h:359:59: required from ‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<std::allocator<const sensormsgs::msg::Imu<std::allocator >&> >; _Args = {std::allocator&}; _Tp = std::allocator<const sensormsgs::msg::Imu<std::allocator >&>]’ /usr/include/c++/9/bits/shared_ptr.h:701:14: required from ‘std::shared_ptr<_Tp> std::allocate_shared(const _Alloc&, _Args&& ...) [with _Tp = std::allocator<const sensormsgs::msg::Imu<std::allocator >&>; _Alloc = std::allocator<std::allocator<const sensormsgs::msg::Imu<std::allocator >&> >; _Args = {std::allocator&}]’ /usr/include/c++/9/bits/shared_ptr.h:717:39: [ skipping 6 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ] /usr/include/c++/9/bits/shared_ptr_base.h:1344:71: required from ‘std::shared_ptr<_Tp, _Lp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<rclcpp::message_memory_strategy::MessageMemoryStrategy<const sensormsgs::msg::Imu<std::allocator >&, std::allocator > >; _Args = {std::shared_ptr<std::allocator >}; _Tp = rclcpp::message_memory_strategy::MessageMemoryStrategy<const sensormsgs::msg::Imu<std::allocator >&, std::allocator >; gnu_cxx::_Lock_policy _Lp = gnu_cxx::_S_atomic]’ /usr/include/c++/9/bits/shared_ptr.h:359:59: required from ‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<rclcpp::message_memory_strategy::MessageMemoryStrategy<const sensormsgs::msg::Imu<std::allocator >&, std::allocator > >; _Args = {std::shared_ptr<std::allocator >}; _Tp = rclcpp::message_memory_strategy::MessageMemoryStrategy<const sensormsgs::msg::Imu<std::allocator >&, std::allocator >]’ /usr/include/c++/9/bits/shared_ptr.h:701:14: required from ‘std::shared_ptr<_Tp> std::allocate_shared(const _Alloc&, _Args&& ...) [with _Tp = rclcpp::message_memory_strategy::MessageMemoryStrategy<const sensormsgs::msg::Imu<std::allocator >&, std::allocator >; _Alloc = std::allocator<rclcpp::message_memory_strategy::MessageMemoryStrategy<const sensormsgs::msg::Imu<std::allocator >&, std::allocator > >; _Args = {std::shared_ptr<std::allocator >}]’ /usr/include/c++/9/bits/shared_ptr.h:717:39: required from ‘std::shared_ptr<_Tp> std::make_shared(_Args&& ...) [with _Tp = rclcpp::message_memory_strategy::MessageMemoryStrategy<const sensormsgs::msg::Imu<std::allocator >&, std::allocator >; _Args = {std::shared_ptr<std::allocator >}]’ /opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:80:68: required from ‘static rclcpp::message_memory_strategy::MessageMemoryStrategy<MessageT, Alloc>::SharedPtr rclcpp::message_memory_strategy::MessageMemoryStrategy<MessageT, Alloc>::create_default() [with MessageT = const sensormsgs::msg::Imu<std::allocator >&; Alloc = std::allocator; rclcpp::message_memory_strategy::MessageMemoryStrategy<MessageT, Alloc>::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<const sensormsgs::msg::Imu<std::allocator >&, std::allocator > >]’ /opt/ros/foxy/include/rclcpp/node.hpp:220:45: required from here /usr/include/c++/9/bits/allocator.h:116:26: error: forming pointer to reference type ‘const sensormsgs::msg::Imu<std::allocator >&’ 116 | typedef _Tp pointer; | ^~~ /usr/include/c++/9/bits/allocator.h:117:26: error: forming pointer to reference type ‘const sensormsgs::msg::Imu<std::allocator >&’ 117 | typedef const _Tp const_pointer; | ^~~~~ In file included from /usr/include/c++/9/bits/shared_ptr.h:52, from /usr/include/c++/9/memory:81, from /opt/ros/foxy/include/rclcpp/rclcpp.hpp:144, from /home/ntnguyen/dev_ws/src/hector_slam_ros2/hector_imu_attitude_to_tf/src/imu_attitude_to_tf_node.cpp:30: /usr/include/c++/9/bits/shared_ptr_base.h: In instantiation of ‘class std::shared_ptr_access<const sensormsgs::msg::Imu<std::allocator >&, gnu_cxx::_S_atomic, false, false>’: /usr/include/c++/9/bits/shared_ptr_base.h:1080:11: required from ‘class std::shared_ptr<const sensormsgs::msg::Imu<std::allocator >&, gnu_cxx::_S_atomic>’ /opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:85:37: recursively required from ‘std::shared_ptr<_Tp> rclcpp::message_memory_strategy::MessageMemoryStrategy<MessageT, Alloc>::borrow_message() [with MessageT = const sensormsgs::msg::Imu<std::allocator >&; Alloc = std::allocator]’ /opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:85:37: required from here /usr/include/c++/9/bits/shared_ptr_base.h:1012:7: error: forming pointer to reference type ‘std::shared_ptr_access<const sensormsgs::msg::Imu<std::allocator >&, gnu_cxx::_S_atomic, false, false>::element_type’ {aka ‘const sensormsgs::msg::Imu<std::allocator >&’} 1012 | operator->() const noexcept | ^~~~ /usr/include/c++/9/bits/shared_ptr_base.h:1020:7: error: forming pointer to reference type ‘std::shared_ptr_access<const sensormsgs::msg::Imu<std::allocator >&, gnu_cxx::_S_atomic, false, false>::element_type’ {aka ‘const sensormsgs::msg::Imu<std::allocator >&’} 1020 | _M_get() const noexcept | ^~ /usr/include/c++/9/bits/shared_ptr_base.h: In instantiation of ‘class std::shared_ptr<const sensormsgs::msg::Imu<std::allocator >&, gnu_cxx::_S_atomic>’: /opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:85:37: recursively required from ‘std::shared_ptr<_Tp> rclcpp::message_memory_strategy::MessageMemoryStrategy<MessageT, Alloc>::borrow_message() [with MessageT = const sensormsgs::msg::Imu<std::allocator >&; Alloc = std::allocator]’ /opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:85:37: required from here /usr/include/c++/9/bits/shared_ptr_base.h:1094:8: error: forming pointer to reference type ‘const sensormsgs::msg::Imu<std::allocator >&’ 1094 | using _Compatible = typename | ^~~ /usr/include/c++/9/bits/shared_ptr_base.h:1104:8: error: forming pointer to reference type ‘const sensormsgs::msg::Imu<std::allocator >&’ 1104 | using _UniqCompatible = typename enable_if<and_< | ^~~~~~~ /usr/include/c++/9/bits/shared_ptr_base.h:1162:2: error: forming pointer to reference type ‘std::__shared_ptr<const sensormsgs::msg::Imu<std::allocator >&, gnu_cxx::_S_atomic>::element_type’ {aka ‘const sensormsgs::msg::Imu<std::allocator >&’} 1162 | shared_ptr(const __shared_ptr<_Yp, _Lp>& r, | ^~~~ /usr/include/c++/9/bits/shared_ptr_base.h: In substitution of ‘template<class _Tp, gnu_cxx::_Lock_policy _Lp> template<class _Yp, class _Res> using _Compatible = typename std::enable_if<std::sp_compatible_with<_Yp, _Tp>::value, _Res>::type [with _Yp = _Yp; _Res = void; _Tp = const sensormsgs::msg::Imu<std::allocator >&; gnu_cxx::_Lock_policy _Lp = gnu_cxx::_S_atomic]’: /usr/include/c++/9/bits/shared_ptr_base.h:1172:2: required from ‘class std::shared_ptr<const sensormsgs::msg::Imu<std::allocator >&, gnu_cxx::_S_atomic>’ /opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:85:37: recursively required from ‘std::shared_ptr<_Tp> rclcpp::message_memory_strategy::MessageMemoryStrategy<MessageT, Alloc>::borrow_message() [with MessageT = const sensormsgs::msg::Imu<std::allocator >&; Alloc = std::allocator]’ /opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:85:37: required from here /usr/include/c++/9/bits/shared_ptr_base.h:1094:8: error: forming pointer to reference type ‘const sensormsgs::msg::Imu<std::allocator >&’ 1094 | using _Compatible = typename | ^~~ /usr/include/c++/9/bits/shared_ptr_base.h: In substitution of ‘template<class _Tp, gnu_cxx::_Lock_policy _Lp> template<class _Yp, class _Del, class _Res, class _Ptr> using _UniqCompatible = typename std::enable_if<std::_and<std::sp_compatible_with<_Yp, _Tp>, std::is_convertible<_Ptr, typename std::remove_extent<_Up>::type> >::value, _Res>::type [with _Yp = _Yp; _Del = _Del; _Res = void; _Ptr = typename std::unique_ptr<_Tp, _Dp>::pointer; _Tp = const sensormsgs::msg::Imu<std::allocator >&; gnu_cxx::_Lock_policy _Lp = gnu_cxx::_S_atomic]’: /usr/include/c++/9/bits/shared_ptr_base.h:1203:2: required from ‘class std::shared_ptr<const sensormsgs::msg::Imu<std::allocator >&, gnu_cxx::_S_atomic>’ /opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:85:37: recursively required from ‘std::shared_ptr<_Tp> rclcpp::message_memory_strategy::MessageMemoryStrategy<MessageT, Alloc>::borrow_message() [with MessageT = const sensormsgs::msg::Imu<std::allocator >&; Alloc = std::allocator]’ /opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:85:37: required from here /usr/include/c++/9/bits/shared_ptr_base.h:1104:8: error: forming pointer to reference type ‘const sensormsgs::msg::Imu<std::allocator >&’ 1104 | using _UniqCompatible = typename enable_if<and_< | ^~~~~~~ /usr/include/c++/9/bits/shared_ptr_base.h: In instantiation of ‘class std::shared_ptr<const sensormsgs::msg::Imu<std::allocator >&, gnu_cxx::_S_atomic>’: /opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:85:37: recursively required from ‘std::shared_ptr<_Tp> rclcpp::message_memory_strategy::MessageMemoryStrategy<MessageT, Alloc>::borrow_message() [with MessageT = const sensormsgs::msg::Imu<std::allocator >&; Alloc = std::allocator]’ /opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:85:37: required from here /usr/include/c++/9/bits/shared_ptr_base.h:1219:2: error: forming pointer to reference type ‘const sensormsgs::msg::Imu<std::allocator >&’ 1219 | shared_ptr(unique_ptr<_Tp1, _Del>&& r, sp_array_delete) | ^~~~ /usr/include/c++/9/bits/shared_ptr_base.h:1309:7: error: forming pointer to reference type ‘std::shared_ptr<const sensormsgs::msg::Imu<std::allocator >&, gnu_cxx::_S_atomic>::element_type’ {aka ‘const sensormsgs::msg::Imu<std::allocator >&’} 1309 | get() const noexcept | ^~~ /usr/include/c++/9/bits/shared_ptr_base.h:1404:24: error: forming pointer to reference type ‘std::shared_ptr<const sensormsgs::msg::Imu<std::allocator >&, gnu_cxx::_S_atomic>::element_type’ {aka ‘const sensormsgs::msg::Imu<std::allocator >&’} 1404 | element_type _M_ptr; // Contained pointer. | ^~ In file included from /usr/include/c++/9/memory:81, from /opt/ros/foxy/include/rclcpp/rclcpp.hpp:144, from /home/ntnguyen/dev_ws/src/hector_slam_ros2/hector_imu_attitude_to_tf/src/imu_attitude_to_tf_node.cpp:30: /usr/include/c++/9/bits/shared_ptr.h: In instantiation of ‘class std::shared_ptr<const sensormsgs::msg::Imu<std::allocator >&>’: /opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:85:37: recursively required from ‘std::shared_ptr<_Tp> rclcpp::message_memory_strategy::MessageMemoryStrategy<MessageT, Alloc>::borrow_message() [with MessageT = const sensormsgs::msg::Imu<std::allocator >&; Alloc = std::allocator]’ /opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:85:37: required from here /usr/include/c++/9/bits/shared_ptr.h:234:2: error: forming pointer to reference type ‘std::shared_ptr<const sensormsgs::msg::Imu<std::allocator >&>::element_type’ {aka ‘const sensormsgs::msg::Imu<std::allocator >&’} 234 | shared_ptr(const shared_ptr<_Yp>& r, element_type* p) noexcept | ^~~~~~ In file included from /usr/include/c++/9/bits/shared_ptr.h:52, from /usr/include/c++/9/memory:81, from /opt/ros/foxy/include/rclcpp/rclcpp.hpp:144, from /home/ntnguyen/dev_ws/src/hector_slam_ros2/hector_imu_attitude_to_tf/src/imu_attitude_to_tf_node.cpp:30: /usr/include/c++/9/bits/shared_ptr_base.h: In instantiation of ‘constexpr std::shared_ptr<_Tp, _Lp>::shared_ptr() [with _Tp = const sensormsgs::msg::Imu<std::allocator >&; gnu_cxx::_Lock_policy _Lp = gnu_cxx::_S_atomic]’: /usr/include/c++/9/bits/shared_ptr_base.h:1287:9: required from ‘void std::shared_ptr<_Tp, _Lp>::reset() [with _Tp = const sensormsgs::msg::Imu<std::allocator >&; gnu_cxx::_Lock_policy _Lp = gnu_cxx::_S_atomic]’ /opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:109:5: required from ‘void rclcpp::message_memory_strategy::MessageMemoryStrategy<MessageT, Alloc>::return_message(std::shared_ptr<_Tp>&) [with MessageT = const sensormsgs::msg::Imu<std::allocator >&; Alloc = std::allocator]’ /opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:107:16: required from here /usr/include/c++/9/bits/shared_ptr_base.h:1119:32: error: using invalid field ‘std::shared_ptr<_Tp, _Lp>::_M_ptr’ 1119 | : _M_ptr(0), _M_refcount() | ^ /usr/include/c++/9/bits/shared_ptr_base.h: In instantiation of ‘void std::shared_ptr<_Tp, _Lp>::swap(std::shared_ptr<_Tp, _Lp>&) [with _Tp = const sensormsgs::msg::Imu<std::allocator >&; gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’: /usr/include/c++/9/bits/shared_ptr_base.h:1287:24: required from ‘void std::shared_ptr<_Tp, _Lp>::reset() [with _Tp = const sensormsgs::msg::Imu<std::allocator >&; gnu_cxx::_Lock_policy _Lp = gnu_cxx::_S_atomic]’ /opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:109:5: required from ‘void rclcpp::message_memory_strategy::MessageMemoryStrategy<MessageT, Alloc>::return_message(std::shared_ptr<_Tp>&) [with MessageT = const sensormsgs::msg::Imu<std::allocator >&; Alloc = std::allocator]’ /opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:107:16: required from here /usr/include/c++/9/bits/shared_ptr_base.h:1326:12: error: using invalid field ‘std::shared_ptr<_Tp, _Lp>::_M_ptr’ 1326 | std::swap(_M_ptr, other._M_ptr); | ^~ /usr/include/c++/9/bits/shared_ptr_base.h:1326:28: error: ‘class std::shared_ptr<const sensormsgs::msg::Imu<std::allocator >&, gnu_cxx::_S_atomic>’ has no member named ‘_M_ptr’ 1326 | std::swap(_M_ptr, other._M_ptr); | ~~^~~~ In file included from /usr/include/c++/9/future:48, from /opt/ros/foxy/include/rclcpp/executors.hpp:18, from /opt/ros/foxy/include/rclcpp/rclcpp.hpp:146, from /home/ntnguyen/dev_ws/src/hector_slam_ros2/hector_imu_attitude_to_tf/src/imu_attitude_to_tf_node.cpp:30: /usr/include/c++/9/bits/std_function.h:667:7: error: ‘std::function<_Res(_ArgTypes ...)>::function(_Functor) [with _Functor = rclcpp::create_subscription_factory(CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator&, typename MessageMemoryStrategyT::SharedPtr, std::shared_ptr<rclcpp::topic_statistics::SubscriptionTopicStatistics >) [with MessageT = sensormsgs::msg::Imu<std::allocator >; CallbackT = void (&)(const sensormsgs::msg::Imu<std::allocator >&); AllocatorT = std::allocator; CallbackMessageT = const sensormsgs::msg::Imu<std::allocator >&; SubscriptionT = rclcpp::Subscription<const sensormsgs::msg::Imu<std::allocator >&, std::allocator, rclcpp::message_memory_strategy::MessageMemoryStrategy<const sensormsgs::msg::Imu<std::allocator >&, std::allocator > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<const sensormsgs::msg::Imu<std::allocator >&, std::allocator >; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<const sensormsgs::msg::Imu<std::allocator >&, std::allocator > >]::<lambda(rclcpp::node_interfaces::NodeBaseInterface, const string&, const rclcpp::QoS&)>; = void; = void; _Res = std::shared_ptr; _ArgTypes = {rclcpp::node_interfaces::NodeBaseInterface, const std::cxx11::basic_string<char, std::char_traits, std::allocator >&, const rclcpp::QoS&}]’, declared using local type ‘rclcpp::create_subscription_factory(CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator&, typename MessageMemoryStrategyT::SharedPtr, std::shared_ptr<rclcpp::topic_statistics::SubscriptionTopicStatistics >) [with MessageT = sensormsgs::msg::Imu<std::allocator >; CallbackT = void (&)(const sensormsgs::msg::Imu<std::allocator >&); AllocatorT = std::allocator; CallbackMessageT = const sensormsgs::msg::Imu<std::allocator >&; SubscriptionT = rclcpp::Subscription<const sensormsgs::msg::Imu<std::allocator >&, std::allocator, rclcpp::message_memory_strategy::MessageMemoryStrategy<const sensormsgs::msg::Imu<std::allocator >&, std::allocator > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<const sensormsgs::msg::Imu<std::allocator >&, std::allocator >; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<const sensormsgs::msg::Imu<std::allocator >&, std::allocator > >]::<lambda(rclcpp::node_interfaces::NodeBaseInterface*, const string&, const rclcpp::QoS&)>’, is used but never defined [-fpermissive] 667 | function<_Res(_ArgTypes...)>:: | ^~~~~~~~ make[2]: [CMakeFiles/imu_attitude_to_tf_node.dir/build.make:63: CMakeFiles/imu_attitude_to_tf_node.dir/src/imu_attitude_to_tf_node.cpp.o] Error 1 make[1]: [CMakeFiles/Makefile2:78: CMakeFiles/imu_attitude_to_tf_node.dir/all] Error 2 make: *** [Makefile:141: all] Error 2

Failed <<< hector_imu_attitude_to_tf [4.00s, exited with code 2] Aborted <<< apriltag_ros [3.07s]
Aborted <<< hector_imu_tools [4.85s]
Aborted <<< hector_trajectory_server [4.00s]
Aborted <<< hector_geotiff [4.53s]
Aborted <<< hector_compressed_map_transport [5.14s] Aborted <<< hector_mapping [10.1s]

Summary: 11 packages finished [12.1s] 1 package failed: hector_imu_attitude_to_tf 6 packages aborted: apriltag_ros hector_compressed_map_transport hector_geotiff hector_imu_tools hector_mapping hector_trajectory_server 6 packages had stderr output: hector_compressed_map_transport hector_geotiff hector_imu_attitude_to_tf hector_imu_tools hector_mapping hector_trajectory_server 2 packages not processed

skpawar1305 commented 1 year ago

delete turtlesim from dev_ws/src folder, or any subfolder or sudo apt remove ros-foxy-turtlesim it says you're trying to build that package even though you've it

KoaBou commented 1 year ago

Thanks but I think it just warns that I'm trying to override turtlesim and the problem actually is from the rclcpp library

KoaBou commented 1 year ago

oh, I see it looks like the problem is in the sensor_msg library. I tried adding ::SharePtr behind them and I built some packages successfully

skpawar1305 commented 1 year ago

oh, I see it looks like the problem is in the sensor_msg library. I tried adding ::SharePtr behind them and I built some packages successfully

btw, we use humble and the packages always build for us..

KoaBou commented 1 year ago

Maybe I try to fit it with foxy or switch my project to Humble :(

KoaBou commented 1 year ago

Thanks for your time