MATLAB Answers

Creating custom ROS2 Message in Simulink using ROS2 Foxy

조회 수: 81(최근 30일)
Harun Teper
Harun Teper 2021년 8월 5일
댓글: Cam Salzberger 2021년 10월 20일 20:14
Hello,
I am currently working on implementing a CACC-controller in ROS2 and I would like to use custom messages. However I run into some errors when I try to execute the ros2genmsg command.
I am using ROS2 Foxy on Ubuntu 20.04 and Matlab Release 2021a. I managed to make the DDS connection work by using Cyclone DDS and setting everything up with Python3.7 and cmake.
The current project code I am working on can be found here: https://github.com/HarunTeper/CMRCE
The message I want to generate can be found in the /src/ros_its_msgs/msg folder.
First before I start matlab, I execute the following command in terminal to have cmake support:
export LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libstdc++.so.6:/usr/lib/x86_64-linux-gnu/libcurl.so"
To generate the message, I use the following code, after I moved the ros_its_msgs folder to a "custom" folder on my drive:
clc; clear all;
pyenv('Version','/usr/bin/python3.7');
setenv('PATH', strcat('/usr/bin', pathsep, getenv('PATH')));
ros2genmsg("/home/harun/custom")
Then I get the following output and error:
ans =
PythonEnvironment with properties:
Version: "3.7"
Executable: "/usr/bin/python3.7"
Library: "libpython3.7m.so.1.0"
Home: "/usr"
Status: NotLoaded
ExecutionMode: InProcess
Identifying message files in folder '/home/harun/custom'..Done.
Validating message files in folder '/home/harun/custom'..Done.
[1/1] Generating MATLAB interfaces for custom message packages... Done.
Running colcon build in folder '/home/harun/custom/matlab_msg_gen/glnxa64'.
Build in progress. This may take several minutes...Error using ros.internal.ROSProjectBuilder/buildPackage (line 534)
Error building package: build log.
Error in ros2genmsg (line 241)
buildPackage(builder, [], ' --merge-install', colconMakeArgs); %other messages might need to be present in the same directory
Error in ros_cacc (line 25)
ros2genmsg("/home/harun/custom")
After looking at some other threads, I also took a look at the stderr.log file for further information:
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/harun/custom/matlab_msg_gen/glnxa64/src/ros_its_msgs/src/ros_its_msgs_PlatoonDist_message.cpp:22:
/opt/ros/foxy/include/rclcpp/subscription_factory.hpp: In instantiation of ‘rclcpp::SubscriptionFactory rclcpp::create_subscription_factory(CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr, std::shared_ptr<rclcpp::topic_statistics::SubscriptionTopicStatistics<CallbackMessageT> >) [with MessageT = ros_its_msgs::msg::PlatoonDist_<std::allocator<void> >; CallbackT = ROS2SubscriberImpl<RosMessageType, CommonType>::createSubscription(const string&, const rclcpp::QoS&, rclcpp::Node::SharedPtr, void*, SendDataToMATLABFunc_T, bool) [with RosMessageType = ros_its_msgs::msg::PlatoonDist_<std::allocator<void> >; CommonType = ros_its_msgs_msg_PlatoonDist_common; intptr_t = long int; std::string = std::__cxx11::basic_string<char>; rclcpp::Node::SharedPtr = std::shared_ptr<rclcpp::Node>; SendDataToMATLABFunc_T = bool (*)(void*, const std::vector<matlab::data::Array>&)]::<lambda(std::shared_ptr<ros_its_msgs::msg::PlatoonDist_<std::allocator<void> > >, const rmw_message_info_t&)>&; AllocatorT = std::allocator<void>; CallbackMessageT = ros_its_msgs::msg::PlatoonDist_<std::allocator<void> >; SubscriptionT = rclcpp::Subscription<ros_its_msgs::msg::PlatoonDist_<std::allocator<void> >, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<ros_its_msgs::msg::PlatoonDist_<std::allocator<void> >, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<ros_its_msgs::msg::PlatoonDist_<std::allocator<void> >, std::allocator<void> >; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<ros_its_msgs::msg::PlatoonDist_<std::allocator<void> >, std::allocator<void> > >]:
/opt/ros/foxy/include/rclcpp/create_subscription.hpp:144:63: required from ‘std::shared_ptr<SubscriptionT> rclcpp::create_subscription(NodeT&&, const string&, const rclcpp::QoS&, CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = ros_its_msgs::msg::PlatoonDist_<std::allocator<void> >; CallbackT = ROS2SubscriberImpl<RosMessageType, CommonType>::createSubscription(const string&, const rclcpp::QoS&, rclcpp::Node::SharedPtr, void*, SendDataToMATLABFunc_T, bool) [with RosMessageType = ros_its_msgs::msg::PlatoonDist_<std::allocator<void> >; CommonType = ros_its_msgs_msg_PlatoonDist_common; intptr_t = long int; std::string = std::__cxx11::basic_string<char>; rclcpp::Node::SharedPtr = std::shared_ptr<rclcpp::Node>; SendDataToMATLABFunc_T = bool (*)(void*, const std::vector<matlab::data::Array>&)]::<lambda(std::shared_ptr<ros_its_msgs::msg::PlatoonDist_<std::allocator<void> > >, const rmw_message_info_t&)>&; AllocatorT = std::allocator<void>; CallbackMessageT = ros_its_msgs::msg::PlatoonDist_<std::allocator<void> >; SubscriptionT = rclcpp::Subscription<ros_its_msgs::msg::PlatoonDist_<std::allocator<void> >, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<ros_its_msgs::msg::PlatoonDist_<std::allocator<void> >, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<ros_its_msgs::msg::PlatoonDist_<std::allocator<void> >, std::allocator<void> >; NodeT = rclcpp::Node&; std::string = std::__cxx11::basic_string<char>; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<ros_its_msgs::msg::PlatoonDist_<std::allocator<void> >, std::allocator<void> > >]
/opt/ros/foxy/include/rclcpp/node_impl.hpp:98:47: required from ‘std::shared_ptr<SubscriptionT> rclcpp::Node::create_subscription(const string&, const rclcpp::QoS&, CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = ros_its_msgs::msg::PlatoonDist_<std::allocator<void> >; CallbackT = ROS2SubscriberImpl<RosMessageType, CommonType>::createSubscription(const string&, const rclcpp::QoS&, rclcpp::Node::SharedPtr, void*, SendDataToMATLABFunc_T, bool) [with RosMessageType = ros_its_msgs::msg::PlatoonDist_<std::allocator<void> >; CommonType = ros_its_msgs_msg_PlatoonDist_common; intptr_t = long int; std::string = std::__cxx11::basic_string<char>; rclcpp::Node::SharedPtr = std::shared_ptr<rclcpp::Node>; SendDataToMATLABFunc_T = bool (*)(void*, const std::vector<matlab::data::Array>&)]::<lambda(std::shared_ptr<ros_its_msgs::msg::PlatoonDist_<std::allocator<void> > >, const rmw_message_info_t&)>&; AllocatorT = std::allocator<void>; CallbackMessageT = ros_its_msgs::msg::PlatoonDist_<std::allocator<void> >; SubscriptionT = rclcpp::Subscription<ros_its_msgs::msg::PlatoonDist_<std::allocator<void> >, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<ros_its_msgs::msg::PlatoonDist_<std::allocator<void> >, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<ros_its_msgs::msg::PlatoonDist_<std::allocator<void> >, std::allocator<void> >; std::string = std::__cxx11::basic_string<char>; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<ros_its_msgs::msg::PlatoonDist_<std::allocator<void> >, std::allocator<void> > >]
/usr/local/MATLAB/R2021a/toolbox/ros/include/ros2/ROS2PubSubTemplates.hpp:81:14: required from ‘intptr_t ROS2SubscriberImpl<RosMessageType, CommonType>::createSubscription(const string&, const rclcpp::QoS&, rclcpp::Node::SharedPtr, void*, SendDataToMATLABFunc_T, bool) [with RosMessageType = ros_its_msgs::msg::PlatoonDist_<std::allocator<void> >; CommonType = ros_its_msgs_msg_PlatoonDist_common; intptr_t = long int; std::string = std::__cxx11::basic_string<char>; rclcpp::Node::SharedPtr = std::shared_ptr<rclcpp::Node>; SendDataToMATLABFunc_T = bool (*)(void*, const std::vector<matlab::data::Array>&)]
/usr/local/MATLAB/R2021a/toolbox/ros/include/ros2/ROS2PubSubTemplates.hpp:61:22: required from here
/opt/ros/foxy/include/rclcpp/subscription_factory.hpp:97:3: error: no matching function for call to ‘rclcpp::AnySubscriptionCallback<ros_its_msgs::msg::PlatoonDist_<std::allocator<void> >, std::allocator<void> >::set(ROS2SubscriberImpl<RosMessageType, CommonType>::createSubscription(const string&, const rclcpp::QoS&, rclcpp::Node::SharedPtr, void*, SendDataToMATLABFunc_T, bool) [with RosMessageType = ros_its_msgs::msg::PlatoonDist_<std::allocator<void> >; CommonType = ros_its_msgs_msg_PlatoonDist_common; intptr_t = long int; std::string = std::__cxx11::basic_string<char>; rclcpp::Node::SharedPtr = std::shared_ptr<rclcpp::Node>; SendDataToMATLABFunc_T = bool (*)(void*, const std::vector<matlab::data::Array>&)]::<lambda(std::shared_ptr<ros_its_msgs::msg::PlatoonDist_<std::allocator<void> > >, const rmw_message_info_t&)>&)
97 | any_subscription_callback.set(std::forward<CallbackT>(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:25,
from /opt/ros/foxy/include/rclcpp/executors.hpp:21,
from /opt/ros/foxy/include/rclcpp/rclcpp.hpp:146,
from /home/harun/custom/matlab_msg_gen/glnxa64/src/ros_its_msgs/src/ros_its_msgs_PlatoonDist_message.cpp:22:
/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<ros_its_msgs::msg::PlatoonDist_<std::allocator<void> > >)> >::value, void>::type* <anonymous> > 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* <anonymous> = <enumerator>; MessageT = ros_its_msgs::msg::PlatoonDist_<std::allocator<void> >; Alloc = std::allocator<void>]
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<ros_its_msgs::msg::PlatoonDist_<std::allocator<void> > >, const rclcpp::MessageInfo&)> >::value, void>::type* <anonymous> > 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* <anonymous> = <enumerator>; MessageT = ros_its_msgs::msg::PlatoonDist_<std::allocator<void> >; Alloc = std::allocator<void>]
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:111:8: note: candidate: template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<const ros_its_msgs::msg::PlatoonDist_<std::allocator<void> > >)> >::value, void>::type* <anonymous> > 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 _Tp>)> >::value>::type* <anonymous> = <enumerator>; MessageT = ros_its_msgs::msg::PlatoonDist_<std::allocator<void> >; Alloc = std::allocator<void>]
111 | void set(CallbackT callback)
| ^~~
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:111:8: note: template argument deduction/substitution failed:
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:109:17: error: no type named ‘type’ in ‘struct std::enable_if<false, void>
109 | >::type * = nullptr
| ^~~~~~~
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:125:8: note: candidate: template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<const ros_its_msgs::msg::PlatoonDist_<std::allocator<void> > >, const rclcpp::MessageInfo&)> >::value, void>::type* <anonymous> > 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 _Tp>, const rclcpp::MessageInfo&)> >::value>::type* <anonymous> = <enumerator>; MessageT = ros_its_msgs::msg::PlatoonDist_<std::allocator<void> >; Alloc = std::allocator<void>]
125 | void set(CallbackT callback)
| ^~~
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:125:8: note: template argument deduction/substitution failed:
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:123:17: error: no type named ‘type’ in ‘struct std::enable_if<false, void>
123 | >::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<ros_its_msgs::msg::PlatoonDist_<std::allocator<void> >, std::default_delete<ros_its_msgs::msg::PlatoonDist_<std::allocator<void> > > >)> >::value, void>::type* <anonymous> > 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<MessageT>::allocator_type>::rebind_alloc<MessageT>, typename std::allocator<void>::rebind<_Tp1>::other>::value, std::default_delete<_Tp>, rclcpp::allocator::AllocatorDeleter<typename std::allocator_traits<_Alloc>::rebind_traits<MessageT>::allocator_type> >::type>)> >::value>::type* <anonymous> = <enumerator>; MessageT = ros_its_msgs::msg::PlatoonDist_<std::allocator<void> >; Alloc = std::allocator<void>]
139 | void set(CallbackT callback)
| ^~~
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:139:8: note: template argument deduction/substitution failed:
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/harun/custom/matlab_msg_gen/glnxa64/src/ros_its_msgs/src/ros_its_msgs_CAMMessage_message.cpp:22:
/opt/ros/foxy/include/rclcpp/subscription_factory.hpp: In instantiation of ‘rclcpp::SubscriptionFactory rclcpp::create_subscription_factory(CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr, std::shared_ptr<rclcpp::topic_statistics::SubscriptionTopicStatistics<CallbackMessageT> >) [with MessageT = ros_its_msgs::msg::CAMMessage_<std::allocator<void> >; CallbackT = ROS2SubscriberImpl<RosMessageType, CommonType>::createSubscription(const string&, const rclcpp::QoS&, rclcpp::Node::SharedPtr, void*, SendDataToMATLABFunc_T, bool) [with RosMessageType = ros_its_msgs::msg::CAMMessage_<std::allocator<void> >; CommonType = ros_its_msgs_msg_CAMMessage_common; intptr_t = long int; std::string = std::__cxx11::basic_string<char>; rclcpp::Node::SharedPtr = std::shared_ptr<rclcpp::Node>; SendDataToMATLABFunc_T = bool (*)(void*, const std::vector<matlab::data::Array>&)]::<lambda(std::shared_ptr<ros_its_msgs::msg::CAMMessage_<std::allocator<void> > >, const rmw_message_info_t&)>&; AllocatorT = std::allocator<void>; CallbackMessageT = ros_its_msgs::msg::CAMMessage_<std::allocator<void> >; SubscriptionT = rclcpp::Subscription<ros_its_msgs::msg::CAMMessage_<std::allocator<void> >, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<ros_its_msgs::msg::CAMMessage_<std::allocator<void> >, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<ros_its_msgs::msg::CAMMessage_<std::allocator<void> >, std::allocator<void> >; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<ros_its_msgs::msg::CAMMessage_<std::allocator<void> >, std::allocator<void> > >]:
/opt/ros/foxy/include/rclcpp/create_subscription.hpp:144:63: required from ‘std::shared_ptr<SubscriptionT> rclcpp::create_subscription(NodeT&&, const string&, const rclcpp::QoS&, CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = ros_its_msgs::msg::CAMMessage_<std::allocator<void> >; CallbackT = ROS2SubscriberImpl<RosMessageType, CommonType>::createSubscription(const string&, const rclcpp::QoS&, rclcpp::Node::SharedPtr, void*, SendDataToMATLABFunc_T, bool) [with RosMessageType = ros_its_msgs::msg::CAMMessage_<std::allocator<void> >; CommonType = ros_its_msgs_msg_CAMMessage_common; intptr_t = long int; std::string = std::__cxx11::basic_string<char>; rclcpp::Node::SharedPtr = std::shared_ptr<rclcpp::Node>; SendDataToMATLABFunc_T = bool (*)(void*, const std::vector<matlab::data::Array>&)]::<lambda(std::shared_ptr<ros_its_msgs::msg::CAMMessage_<std::allocator<void> > >, const rmw_message_info_t&)>&; AllocatorT = std::allocator<void>; CallbackMessageT = ros_its_msgs::msg::CAMMessage_<std::allocator<void> >; SubscriptionT = rclcpp::Subscription<ros_its_msgs::msg::CAMMessage_<std::allocator<void> >, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<ros_its_msgs::msg::CAMMessage_<std::allocator<void> >, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<ros_its_msgs::msg::CAMMessage_<std::allocator<void> >, std::allocator<void> >; NodeT = rclcpp::Node&; std::string = std::__cxx11::basic_string<char>; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<ros_its_msgs::msg::CAMMessage_<std::allocator<void> >, std::allocator<void> > >]
/opt/ros/foxy/include/rclcpp/node_impl.hpp:98:47: required from ‘std::shared_ptr<SubscriptionT> rclcpp::Node::create_subscription(const string&, const rclcpp::QoS&, CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = ros_its_msgs::msg::CAMMessage_<std::allocator<void> >; CallbackT = ROS2SubscriberImpl<RosMessageType, CommonType>::createSubscription(const string&, const rclcpp::QoS&, rclcpp::Node::SharedPtr, void*, SendDataToMATLABFunc_T, bool) [with RosMessageType = ros_its_msgs::msg::CAMMessage_<std::allocator<void> >; CommonType = ros_its_msgs_msg_CAMMessage_common; intptr_t = long int; std::string = std::__cxx11::basic_string<char>; rclcpp::Node::SharedPtr = std::shared_ptr<rclcpp::Node>; SendDataToMATLABFunc_T = bool (*)(void*, const std::vector<matlab::data::Array>&)]::<lambda(std::shared_ptr<ros_its_msgs::msg::CAMMessage_<std::allocator<void> > >, const rmw_message_info_t&)>&; AllocatorT = std::allocator<void>; CallbackMessageT = ros_its_msgs::msg::CAMMessage_<std::allocator<void> >; SubscriptionT = rclcpp::Subscription<ros_its_msgs::msg::CAMMessage_<std::allocator<void> >, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<ros_its_msgs::msg::CAMMessage_<std::allocator<void> >, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<ros_its_msgs::msg::CAMMessage_<std::allocator<void> >, std::allocator<void> >; std::string = std::__cxx11::basic_string<char>; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<ros_its_msgs::msg::CAMMessage_<std::allocator<void> >, std::allocator<void> > >]
/usr/local/MATLAB/R2021a/toolbox/ros/include/ros2/ROS2PubSubTemplates.hpp:81:14: required from ‘intptr_t ROS2SubscriberImpl<RosMessageType, CommonType>::createSubscription(const string&, const rclcpp::QoS&, rclcpp::Node::SharedPtr, void*, SendDataToMATLABFunc_T, bool) [with RosMessageType = ros_its_msgs::msg::CAMMessage_<std::allocator<void> >; CommonType = ros_its_msgs_msg_CAMMessage_common; intptr_t = long int; std::string = std::__cxx11::basic_string<char>; rclcpp::Node::SharedPtr = std::shared_ptr<rclcpp::Node>; SendDataToMATLABFunc_T = bool (*)(void*, const std::vector<matlab::data::Array>&)]
/usr/local/MATLAB/R2021a/toolbox/ros/include/ros2/ROS2PubSubTemplates.hpp:61:22: required from here
/opt/ros/foxy/include/rclcpp/subscription_factory.hpp:97:3: error: no matching function for call to ‘rclcpp::AnySubscriptionCallback<ros_its_msgs::msg::CAMMessage_<std::allocator<void> >, std::allocator<void> >::set(ROS2SubscriberImpl<RosMessageType, CommonType>::createSubscription(const string&, const rclcpp::QoS&, rclcpp::Node::SharedPtr, void*, SendDataToMATLABFunc_T, bool) [with RosMessageType = ros_its_msgs::msg::CAMMessage_<std::allocator<void> >; CommonType = ros_its_msgs_msg_CAMMessage_common; intptr_t = long int; std::string = std::__cxx11::basic_string<char>; rclcpp::Node::SharedPtr = std::shared_ptr<rclcpp::Node>; SendDataToMATLABFunc_T = bool (*)(void*, const std::vector<matlab::data::Array>&)]::<lambda(std::shared_ptr<ros_its_msgs::msg::CAMMessage_<std::allocator<void> > >, const rmw_message_info_t&)>&)
97 | any_subscription_callback.set(std::forward<CallbackT>(callback));
| ^~~~~~~~~~~~~~~~~~~~~~~~~
/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<ros_its_msgs::msg::PlatoonDist_<std::allocator<void> >, std::default_delete<ros_its_msgs::msg::PlatoonDist_<std::allocator<void> > > >, const rclcpp::MessageInfo&)> >::value, void>::type* <anonymous> > 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<MessageT>::allocator_type>::rebind_alloc<MessageT>, typename std::allocator<void>::rebind<_Tp1>::other>::value, std::default_delete<_Tp>, rclcpp::allocator::AllocatorDeleter<typename std::allocator_traits<_Alloc>::rebind_traits<MessageT>::allocator_type> >::type>, const rclcpp::MessageInfo&)> >::value>::type* <anonymous> = <enumerator>; MessageT = ros_its_msgs::msg::PlatoonDist_<std::allocator<void> >; Alloc = std::allocator<void>]
153 | void set(CallbackT callback)
| ^~~
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:153:8: note: template argument deduction/substitution failed:
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:25,
from /opt/ros/foxy/include/rclcpp/executors.hpp:21,
from /opt/ros/foxy/include/rclcpp/rclcpp.hpp:146,
from /home/harun/custom/matlab_msg_gen/glnxa64/src/ros_its_msgs/src/ros_its_msgs_CAMMessage_message.cpp:22:
/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<ros_its_msgs::msg::CAMMessage_<std::allocator<void> > >)> >::value, void>::type* <anonymous> > 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* <anonymous> = <enumerator>; MessageT = ros_its_msgs::msg::CAMMessage_<std::allocator<void> >; Alloc = std::allocator<void>]
83 | void set(CallbackT callback)
| ^~~
/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
| ^~~~~~~
/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<ros_its_msgs::msg::CAMMessage_<std::allocator<void> > >, const rclcpp::MessageInfo&)> >::value, void>::type* <anonymous> > 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* <anonymous> = <enumerator>; MessageT = ros_its_msgs::msg::CAMMessage_<std::allocator<void> >; Alloc = std::allocator<void>]
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:111:8: note: candidate: template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<const ros_its_msgs::msg::CAMMessage_<std::allocator<void> > >)> >::value, void>::type* <anonymous> > 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 _Tp>)> >::value>::type* <anonymous> = <enumerator>; MessageT = ros_its_msgs::msg::CAMMessage_<std::allocator<void> >; Alloc = std::allocator<void>]
111 | void set(CallbackT callback)
| ^~~
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:111:8: note: template argument deduction/substitution failed:
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:109:17: error: no type named ‘type’ in ‘struct std::enable_if<false, void>
109 | >::type * = nullptr
| ^~~~~~~
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:125:8: note: candidate: template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<const ros_its_msgs::msg::CAMMessage_<std::allocator<void> > >, const rclcpp::MessageInfo&)> >::value, void>::type* <anonymous> > 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 _Tp>, const rclcpp::MessageInfo&)> >::value>::type* <anonymous> = <enumerator>; MessageT = ros_its_msgs::msg::CAMMessage_<std::allocator<void> >; Alloc = std::allocator<void>]
125 | void set(CallbackT callback)
| ^~~
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:125:8: note: template argument deduction/substitution failed:
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:123:17: error: no type named ‘type’ in ‘struct std::enable_if<false, void>
123 | >::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<ros_its_msgs::msg::CAMMessage_<std::allocator<void> >, std::default_delete<ros_its_msgs::msg::CAMMessage_<std::allocator<void> > > >)> >::value, void>::type* <anonymous> > 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<MessageT>::allocator_type>::rebind_alloc<MessageT>, typename std::allocator<void>::rebind<_Tp1>::other>::value, std::default_delete<_Tp>, rclcpp::allocator::AllocatorDeleter<typename std::allocator_traits<_Alloc>::rebind_traits<MessageT>::allocator_type> >::type>)> >::value>::type* <anonymous> = <enumerator>; MessageT = ros_its_msgs::msg::CAMMessage_<std::allocator<void> >; Alloc = std::allocator<void>]
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<ros_its_msgs::msg::CAMMessage_<std::allocator<void> >, std::default_delete<ros_its_msgs::msg::CAMMessage_<std::allocator<void> > > >, const rclcpp::MessageInfo&)> >::value, void>::type* <anonymous> > 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<MessageT>::allocator_type>::rebind_alloc<MessageT>, typename std::allocator<void>::rebind<_Tp1>::other>::value, std::default_delete<_Tp>, rclcpp::allocator::AllocatorDeleter<typename std::allocator_traits<_Alloc>::rebind_traits<MessageT>::allocator_type> >::type>, const rclcpp::MessageInfo&)> >::value>::type* <anonymous> = <enumerator>; MessageT = ros_its_msgs::msg::CAMMessage_<std::allocator<void> >; Alloc = std::allocator<void>]
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/c++/9/future:48,
from /opt/ros/foxy/include/rclcpp/executors.hpp:18,
from /opt/ros/foxy/include/rclcpp/rclcpp.hpp:146,
from /home/harun/custom/matlab_msg_gen/glnxa64/src/ros_its_msgs/src/ros_its_msgs_PlatoonDist_message.cpp:22:
/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<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr, std::shared_ptr<rclcpp::topic_statistics::SubscriptionTopicStatistics<CallbackMessageT> >) [with MessageT = ros_its_msgs::msg::PlatoonDist_<std::allocator<void> >; CallbackT = ROS2SubscriberImpl<RosMessageType, CommonType>::createSubscription(const string&, const rclcpp::QoS&, rclcpp::Node::SharedPtr, void*, SendDataToMATLABFunc_T, bool) [with RosMessageType = ros_its_msgs::msg::PlatoonDist_<std::allocator<void> >; CommonType = ros_its_msgs_msg_PlatoonDist_common; intptr_t = long int; std::string = std::__cxx11::basic_string<char>; rclcpp::Node::SharedPtr = std::shared_ptr<rclcpp::Node>; SendDataToMATLABFunc_T = bool (*)(void*, const std::vector<matlab::data::Array>&)]::<lambda(std::shared_ptr<ros_its_msgs::msg::PlatoonDist_<std::allocator<void> > >, const rmw_message_info_t&)>&; AllocatorT = std::allocator<void>; CallbackMessageT = ros_its_msgs::msg::PlatoonDist_<std::allocator<void> >; SubscriptionT = rclcpp::Subscription<ros_its_msgs::msg::PlatoonDist_<std::allocator<void> >, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<ros_its_msgs::msg::PlatoonDist_<std::allocator<void> >, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<ros_its_msgs::msg::PlatoonDist_<std::allocator<void> >, std::allocator<void> >; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<ros_its_msgs::msg::PlatoonDist_<std::allocator<void> >, std::allocator<void> > >]::<lambda(rclcpp::node_interfaces::NodeBaseInterface*, const string&, const rclcpp::QoS&)>; <template-parameter-2-2> = void; <template-parameter-2-3> = void; _Res = std::shared_ptr<rclcpp::SubscriptionBase>; _ArgTypes = {rclcpp::node_interfaces::NodeBaseInterface*, const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, const rclcpp::QoS&}]’, declared using local type ‘rclcpp::create_subscription_factory(CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr, std::shared_ptr<rclcpp::topic_statistics::SubscriptionTopicStatistics<CallbackMessageT> >) [with MessageT = ros_its_msgs::msg::PlatoonDist_<std::allocator<void> >; CallbackT = ROS2SubscriberImpl<RosMessageType, CommonType>::createSubscription(const string&, const rclcpp::QoS&, rclcpp::Node::SharedPtr, void*, SendDataToMATLABFunc_T, bool) [with RosMessageType = ros_its_msgs::msg::PlatoonDist_<std::allocator<void> >; CommonType = ros_its_msgs_msg_PlatoonDist_common; intptr_t = long int; std::string = std::__cxx11::basic_string<char>; rclcpp::Node::SharedPtr = std::shared_ptr<rclcpp::Node>; SendDataToMATLABFunc_T = bool (*)(void*, const std::vector<matlab::data::Array>&)]::<lambda(std::shared_ptr<ros_its_msgs::msg::PlatoonDist_<std::allocator<void> > >, const rmw_message_info_t&)>&; AllocatorT = std::allocator<void>; CallbackMessageT = ros_its_msgs::msg::PlatoonDist_<std::allocator<void> >; SubscriptionT = rclcpp::Subscription<ros_its_msgs::msg::PlatoonDist_<std::allocator<void> >, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<ros_its_msgs::msg::PlatoonDist_<std::allocator<void> >, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<ros_its_msgs::msg::PlatoonDist_<std::allocator<void> >, std::allocator<void> >; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<ros_its_msgs::msg::PlatoonDist_<std::allocator<void> >, std::allocator<void> > >]::<lambda(rclcpp::node_interfaces::NodeBaseInterface*, const string&, const rclcpp::QoS&)>’, is used but never defined [-fpermissive]
667 | function<_Res(_ArgTypes...)>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
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/harun/custom/matlab_msg_gen/glnxa64/src/ros_its_msgs/src/ros_its_msgs_CAMMessage_message.cpp:22:
/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<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr, std::shared_ptr<rclcpp::topic_statistics::SubscriptionTopicStatistics<CallbackMessageT> >) [with MessageT = ros_its_msgs::msg::CAMMessage_<std::allocator<void> >; CallbackT = ROS2SubscriberImpl<RosMessageType, CommonType>::createSubscription(const string&, const rclcpp::QoS&, rclcpp::Node::SharedPtr, void*, SendDataToMATLABFunc_T, bool) [with RosMessageType = ros_its_msgs::msg::CAMMessage_<std::allocator<void> >; CommonType = ros_its_msgs_msg_CAMMessage_common; intptr_t = long int; std::string = std::__cxx11::basic_string<char>; rclcpp::Node::SharedPtr = std::shared_ptr<rclcpp::Node>; SendDataToMATLABFunc_T = bool (*)(void*, const std::vector<matlab::data::Array>&)]::<lambda(std::shared_ptr<ros_its_msgs::msg::CAMMessage_<std::allocator<void> > >, const rmw_message_info_t&)>&; AllocatorT = std::allocator<void>; CallbackMessageT = ros_its_msgs::msg::CAMMessage_<std::allocator<void> >; SubscriptionT = rclcpp::Subscription<ros_its_msgs::msg::CAMMessage_<std::allocator<void> >, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<ros_its_msgs::msg::CAMMessage_<std::allocator<void> >, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<ros_its_msgs::msg::CAMMessage_<std::allocator<void> >, std::allocator<void> >; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<ros_its_msgs::msg::CAMMessage_<std::allocator<void> >, std::allocator<void> > >]::<lambda(rclcpp::node_interfaces::NodeBaseInterface*, const string&, const rclcpp::QoS&)>; <template-parameter-2-2> = void; <template-parameter-2-3> = void; _Res = std::shared_ptr<rclcpp::SubscriptionBase>; _ArgTypes = {rclcpp::node_interfaces::NodeBaseInterface*, const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, const rclcpp::QoS&}]’, declared using local type ‘rclcpp::create_subscription_factory(CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr, std::shared_ptr<rclcpp::topic_statistics::SubscriptionTopicStatistics<CallbackMessageT> >) [with MessageT = ros_its_msgs::msg::CAMMessage_<std::allocator<void> >; CallbackT = ROS2SubscriberImpl<RosMessageType, CommonType>::createSubscription(const string&, const rclcpp::QoS&, rclcpp::Node::SharedPtr, void*, SendDataToMATLABFunc_T, bool) [with RosMessageType = ros_its_msgs::msg::CAMMessage_<std::allocator<void> >; CommonType = ros_its_msgs_msg_CAMMessage_common; intptr_t = long int; std::string = std::__cxx11::basic_string<char>; rclcpp::Node::SharedPtr = std::shared_ptr<rclcpp::Node>; SendDataToMATLABFunc_T = bool (*)(void*, const std::vector<matlab::data::Array>&)]::<lambda(std::shared_ptr<ros_its_msgs::msg::CAMMessage_<std::allocator<void> > >, const rmw_message_info_t&)>&; AllocatorT = std::allocator<void>; CallbackMessageT = ros_its_msgs::msg::CAMMessage_<std::allocator<void> >; SubscriptionT = rclcpp::Subscription<ros_its_msgs::msg::CAMMessage_<std::allocator<void> >, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<ros_its_msgs::msg::CAMMessage_<std::allocator<void> >, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<ros_its_msgs::msg::CAMMessage_<std::allocator<void> >, std::allocator<void> >; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<ros_its_msgs::msg::CAMMessage_<std::allocator<void> >, std::allocator<void> > >]::<lambda(rclcpp::node_interfaces::NodeBaseInterface*, const string&, const rclcpp::QoS&)>’, is used but never defined [-fpermissive]
667 | function<_Res(_ArgTypes...)>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/ros_its_msgs_matlab.dir/build.make:76: CMakeFiles/ros_its_msgs_matlab.dir/src/ros_its_msgs_PlatoonDist_message.cpp.o] Fehler 1
make[2]: *** Auf noch nicht beendete Prozesse wird gewartet …
make[2]: *** [CMakeFiles/ros_its_msgs_matlab.dir/build.make:63: CMakeFiles/ros_its_msgs_matlab.dir/src/ros_its_msgs_CAMMessage_message.cpp.o] Fehler 1
make[1]: *** [CMakeFiles/Makefile2:124: CMakeFiles/ros_its_msgs_matlab.dir/all] Fehler 2
make: *** [Makefile:141: all] Fehler 2
However at this point I don't know how to fix the issue. Does anyone have any ideas on how to proceed?
Best Regards
Harun Teper
  댓글 수: 2
Harun Teper
Harun Teper 2021년 8월 6일
Hello Cam,
thanks for your help. This is the output of my environment variables in my terminal, only including paths containing foxy:
AMENT_PREFIX_PATH=/opt/ros/foxy
PYTHONPATH=/opt/ros/foxy/lib/python3.8/site-packages
LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/gazebo-11/plugins:/opt/ros/foxy/opt/yaml_cpp_vendor/lib:/opt/ros/foxy/opt/rviz_ogre_vendor/lib:/opt/ros/foxy/lib/x86_64-linux-gnu:/opt/ros/foxy/lib
GAZEBO_MODEL_PATH=:/opt/ros/foxy/share/turtlebot3_gazebo/models:/home/harun/CMRCE/src/car_simulator/models
PATH=/home/harun/omnetpp-5.6.2/bin:/opt/ros/foxy/bin:/home/harun/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
ROS_DISTRO=foxy
For the matlab output I used the script from this thread (Stackoverflow URL) . I included the output containing ros, foxy and some others here:
AMENT_PREFIX_PATH=/opt/ros/foxy
GAZEBO_MODEL_PATH=:/opt/ros/foxy/share/turtlebot3_gazebo/models:/home/harun/CMRCE/src/car_simulator/models
LD_LIBRARY_PATH=/usr/local/MATLAB/R2021a/sys/os/glnxa64:/usr/local/MATLAB/R2021a/bin/glnxa64:/usr/local/MATLAB/R2021a/extern/lib/glnxa64:/usr/local/MATLAB/R2021a/cefclient/sys/os/glnxa64:/usr/local/MATLAB/R2021a/sys/java/jre/glnxa64/jre/lib/amd64/native_threads:/usr/local/MATLAB/R2021a/sys/java/jre/glnxa64/jre/lib/amd64/server:/usr/lib/x86_64-linux-gnu/gazebo-11/plugins:/opt/ros/foxy/opt/yaml_cpp_vendor/lib:/opt/ros/foxy/opt/rviz_ogre_vendor/lib:/opt/ros/foxy/lib/x86_64-linux-gnu:/opt/ros/foxy/lib
PATH=/home/harun/omnetpp-5.6.2/bin:/opt/ros/foxy/bin:/home/harun/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
PYTHONPATH=/opt/ros/foxy/lib/python3.8/site-packages
RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
ROS_DISTRO=foxy
ROS_LOCALHOST_ONLY=0
ROS_PYTHON_VERSION=3
ROS_VERSION=2
If you need any additional information please let me know.

댓글을 달려면 로그인하십시오.

채택된 답변

Cam Salzberger
Cam Salzberger 2021년 8월 9일
Hello Harun,
My money would be on this specific issue being cause by AMENT_PREFIX_PATH being checked for include files during the colcon build process. Unsetting that within MATLAB before running ros2genmsg would probably at least resolve this set of errors.
RMW_IMPLEMENTATION may cause an issue when it actually starts building, as it may try to link to rmw packages for Cyclone DDS, which aren't shipped with MATLAB's Dashing. To try to eliminate all problems from the get-go, it'd probably be easiest to start MATLAB from a terminal that hasn't sourced the Foxy setup script. Or temporarily remove it from your .bashrc file if it's in there, and see if that resolves the issue in one go.
-Cam
  댓글 수: 14
Cam Salzberger
Cam Salzberger 2021년 10월 20일 20:14
I appreciate the thought, but no acknowledgement is really necessary. We're just doing our best to help all users of MATLAB and ROS Toolbox!
Good luck with your work!
-Cam

댓글을 달려면 로그인하십시오.

추가 답변(0개)

제품


릴리스

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by