voxl mpa to ros melodic voxl2 aidetection message header file missing
-
Missing Aidetection.h file from rosmelodic mpatoros in voxl2. Upon checking /opt/ros/include/ directory I found that there are no Aidetection.h header files?
________________________________________________________________________________________________________________________________________________________________________________________ Errors << tflite_prop_detection:make /home/root/catkin_ws/logs/tflite_prop_detection/build.make.001.log /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:51:34: error: 'voxl_mpa_to_ros' does not name a type void aidectionCallback(const voxl_mpa_to_ros::AiDetection::ConstPtr& msg) { ^~~~~~~~~~~~~~~ /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:51:62: error: expected unqualified-id before '::' token void aidectionCallback(const voxl_mpa_to_ros::AiDetection::ConstPtr& msg) { ^~ /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:51:62: error: expected ')' before '::' token /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:51:51: error: expected ';' at end of member declaration void aidectionCallback(const voxl_mpa_to_ros::AiDetection::ConstPtr& msg) { ^~~~~~~~~~~ /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:51:64: error: 'ConstPtr' in namespace '::' does not name a type void aidectionCallback(const voxl_mpa_to_ros::AiDetection::ConstPtr& msg) { ^~~~~~~~ /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp: In constructor 'TFLitePropDetectionNode::TFLitePropDetectionNode()': /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:30:109: error: no matching function for call to 'ros::NodeHandle::subscribe(const char [13], int, void (TFLitePropDetectionNode::*)(...), TFLitePropDetectionNode*)' sub_tflite_data_ = nh.subscribe("/tflite_data", 1, &TFLitePropDetectionNode::aidectionCallback, this); ^ In file included from /opt/ros/melodic/include/ros/ros.h:45:0, from /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:13: /opt/ros/melodic/include/ros/node_handle.h:402:14: note: candidate: template<class M, class T> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (T::*)(M), T*, const ros::TransportHints&) Subscriber subscribe(const std::string& topic, uint32_t queue_size, void(T::*fp)(M), T* obj, ^~~~~~~~~ /opt/ros/melodic/include/ros/node_handle.h:402:14: note: template argument deduction/substitution failed: /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:30:109: note: candidate expects 2 arguments, 1 provided sub_tflite_data_ = nh.subscribe("/tflite_data", 1, &TFLitePropDetectionNode::aidectionCallback, this); ^ In file included from /opt/ros/melodic/include/ros/ros.h:45:0, from /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:13: /opt/ros/melodic/include/ros/node_handle.h:413:14: note: candidate: template<class M, class T> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (T::*)(M) const, T*, const ros::TransportHints&) Subscriber subscribe(const std::string& topic, uint32_t queue_size, void(T::*fp)(M) const, T* obj, ^~~~~~~~~ /opt/ros/melodic/include/ros/node_handle.h:413:14: note: template argument deduction/substitution failed: /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:30:109: note: types 'void (T::)(M) const' and 'void (TFLitePropDetectionNode::)(...)' have incompatible cv-qualifiers sub_tflite_data_ = nh.subscribe("/tflite_data", 1, &TFLitePropDetectionNode::aidectionCallback, this); ^ In file included from /opt/ros/melodic/include/ros/ros.h:45:0, from /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:13: /opt/ros/melodic/include/ros/node_handle.h:465:14: note: candidate: template<class M, class T> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (T::*)(const boost::shared_ptr<const M>&), T*, const ros::TransportHints&) Subscriber subscribe(const std::string& topic, uint32_t queue_size, ^~~~~~~~~ /opt/ros/melodic/include/ros/node_handle.h:465:14: note: template argument deduction/substitution failed: /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:30:109: note: candidate expects 2 arguments, 1 provided sub_tflite_data_ = nh.subscribe("/tflite_data", 1, &TFLitePropDetectionNode::aidectionCallback, this); ^ In file included from /opt/ros/melodic/include/ros/ros.h:45:0, from /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:13: /opt/ros/melodic/include/ros/node_handle.h:475:14: note: candidate: template<class M, class T> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (T::*)(const boost::shared_ptr<const M>&) const, T*, const ros::TransportHints&) Subscriber subscribe(const std::string& topic, uint32_t queue_size, ^~~~~~~~~ /opt/ros/melodic/include/ros/node_handle.h:475:14: note: template argument deduction/substitution failed: /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:30:109: note: types 'void (T::)(const boost::shared_ptr<const M>&) const' and 'void (TFLitePropDetectionNode::)(...)' have incompatible cv-qualifiers sub_tflite_data_ = nh.subscribe("/tflite_data", 1, &TFLitePropDetectionNode::aidectionCallback, this); ^ In file included from /opt/ros/melodic/include/ros/ros.h:45:0, from /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:13: /opt/ros/melodic/include/ros/node_handle.h:529:14: note: candidate: template<class M, class T> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (T::*)(M), const boost::shared_ptr<U>&, const ros::TransportHints&) Subscriber subscribe(const std::string& topic, uint32_t queue_size, void(T::*fp)(M), ^~~~~~~~~ /opt/ros/melodic/include/ros/node_handle.h:529:14: note: template argument deduction/substitution failed: /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:30:109: note: candidate expects 2 arguments, 1 provided sub_tflite_data_ = nh.subscribe("/tflite_data", 1, &TFLitePropDetectionNode::aidectionCallback, this); ^ In file included from /opt/ros/melodic/include/ros/ros.h:45:0, from /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:13: /opt/ros/melodic/include/ros/node_handle.h:540:14: note: candidate: template<class M, class T> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (T::*)(M) const, const boost::shared_ptr<U>&, const ros::TransportHints&) Subscriber subscribe(const std::string& topic, uint32_t queue_size, void(T::*fp)(M) const, ^~~~~~~~~ /opt/ros/melodic/include/ros/node_handle.h:540:14: note: template argument deduction/substitution failed: /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:30:109: note: types 'void (T::)(M) const' and 'void (TFLitePropDetectionNode::)(...)' have incompatible cv-qualifiers sub_tflite_data_ = nh.subscribe("/tflite_data", 1, &TFLitePropDetectionNode::aidectionCallback, this); ^ In file included from /opt/ros/melodic/include/ros/ros.h:45:0, from /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:13: /opt/ros/melodic/include/ros/node_handle.h:594:14: note: candidate: template<class M, class T> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (T::*)(const boost::shared_ptr<const M>&), const boost::shared_ptr<U>&, const ros::TransportHints&) Subscriber subscribe(const std::string& topic, uint32_t queue_size, ^~~~~~~~~ /opt/ros/melodic/include/ros/node_handle.h:594:14: note: template argument deduction/substitution failed: /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:30:109: note: candidate expects 2 arguments, 1 provided sub_tflite_data_ = nh.subscribe("/tflite_data", 1, &TFLitePropDetectionNode::aidectionCallback, this); ^ In file included from /opt/ros/melodic/include/ros/ros.h:45:0, from /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:13: /opt/ros/melodic/include/ros/node_handle.h:605:14: note: candidate: template<class M, class T> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (T::*)(const boost::shared_ptr<const M>&) const, const boost::shared_ptr<U>&, const ros::TransportHints&) Subscriber subscribe(const std::string& topic, uint32_t queue_size, ^~~~~~~~~ /opt/ros/melodic/include/ros/node_handle.h:605:14: note: template argument deduction/substitution failed: /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:30:109: note: types 'void (T::)(const boost::shared_ptr<const M>&) const' and 'void (TFLitePropDetectionNode::)(...)' have incompatible cv-qualifiers sub_tflite_data_ = nh.subscribe("/tflite_data", 1, &TFLitePropDetectionNode::aidectionCallback, this); ^ In file included from /opt/ros/melodic/include/ros/ros.h:45:0, from /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:13: /opt/ros/melodic/include/ros/node_handle.h:656:14: note: candidate: template<class M> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (*)(M), const ros::TransportHints&) Subscriber subscribe(const std::string& topic, uint32_t queue_size, void(*fp)(M), const TransportHints& transport_hints = TransportHints()) ^~~~~~~~~ /opt/ros/melodic/include/ros/node_handle.h:656:14: note: template argument deduction/substitution failed: /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:30:109: note: mismatched types 'void (*)(M)' and 'void (TFLitePropDetectionNode::*)(...)' sub_tflite_data_ = nh.subscribe("/tflite_data", 1, &TFLitePropDetectionNode::aidectionCallback, this); ^ In file included from /opt/ros/melodic/include/ros/ros.h:45:0, from /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:13: /opt/ros/melodic/include/ros/node_handle.h:704:14: note: candidate: template<class M> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (*)(const boost::shared_ptr<const M>&), const ros::TransportHints&) Subscriber subscribe(const std::string& topic, uint32_t queue_size, void(*fp)(const boost::shared_ptr<M const>&), const TransportHints& transport_hints = TransportHints()) ^~~~~~~~~ /opt/ros/melodic/include/ros/node_handle.h:704:14: note: template argument deduction/substitution failed: /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:30:109: note: mismatched types 'void (*)(const boost::shared_ptr<const M>&)' and 'void (TFLitePropDetectionNode::*)(...)' sub_tflite_data_ = nh.subscribe("/tflite_data", 1, &TFLitePropDetectionNode::aidectionCallback, this); ^ In file included from /opt/ros/melodic/include/ros/ros.h:45:0, from /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:13: /opt/ros/melodic/include/ros/node_handle.h:750:14: note: candidate: template<class M> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, const boost::function<void(const boost::shared_ptr<const M>&)>&, const VoidConstPtr&, const ros::TransportHints&) Subscriber subscribe(const std::string& topic, uint32_t queue_size, const boost::function<void (const boost::shared_ptr<M const>&)>& callback, ^~~~~~~~~ /opt/ros/melodic/include/ros/node_handle.h:750:14: note: template argument deduction/substitution failed: /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:30:109: note: mismatched types 'const boost::function<void(const boost::shared_ptr<const M>&)>' and 'void (TFLitePropDetectionNode::*)(...)' sub_tflite_data_ = nh.subscribe("/tflite_data", 1, &TFLitePropDetectionNode::aidectionCallback, this); ^ In file included from /opt/ros/melodic/include/ros/ros.h:45:0, from /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:13: /opt/ros/melodic/include/ros/node_handle.h:799:14: note: candidate: template<class M, class C> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, const boost::function<void(C)>&, const VoidConstPtr&, const ros::TransportHints&) Subscriber subscribe(const std::string& topic, uint32_t queue_size, const boost::function<void (C)>& callback, ^~~~~~~~~ /opt/ros/melodic/include/ros/node_handle.h:799:14: note: template argument deduction/substitution failed: /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:30:109: note: mismatched types 'const boost::function<void(C)>' and 'void (TFLitePropDetectionNode::*)(...)' sub_tflite_data_ = nh.subscribe("/tflite_data", 1, &TFLitePropDetectionNode::aidectionCallback, this); ^ In file included from /opt/ros/melodic/include/ros/ros.h:45:0, from /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:13: /opt/ros/melodic/include/ros/node_handle.h:836:14: note: candidate: ros::Subscriber ros::NodeHandle::subscribe(ros::SubscribeOptions&) Subscriber subscribe(SubscribeOptions& ops); ^~~~~~~~~ /opt/ros/melodic/include/ros/node_handle.h:836:14: note: candidate expects 1 argument, 4 provided make[2]: *** [CMakeFiles/tflite_prop_detection_cpp.dir/src/tflite_prop_detection_cpp_node.cpp.o] Error 1 make[1]: *** [CMakeFiles/tflite_prop_detection_cpp.dir/all] Error 2 make: *** [all] Error 2 cd /home/root/catkin_ws/build/tflite_prop_detection; catkin build --get-env tflite_prop_detection | catkin env -si /usr/bin/make --jobserver-fds=3,4 -j; cd - ........................................................................................................................................................................................ Failed << tflite_prop_detection:make [ Exited with code 2 ] Failed <<< tflite_prop_detection [ 6.8 seconds ] [build] Summary: 4 of 5 packages succeeded. [build] Ignored: None. [build] Warnings: None. [build] Abandoned: None. [build] Failed: 1 packages failed.
-
@Darshit-Desai multiple questions here - why are you compiling from source and not just doing a
sudo apt-get install voxl-mpa-to-ros
- should be in the voxl-suite part of the 1.2 release.How are you installing everything? The voxl2 inately does not have ros melodic on there, so my installation steps were:
- Install ros melodic following the instructions here: https://wiki.ros.org/melodic/Installation/Ubuntu
- Installing ros mpa to ros via
wget http://voxl-packages.modalai.com/dists/qrb5165/dev/binary-arm64/voxl-mpa-to-ros_0.3.7-202310131817_arm64.deb
-->sudo dpkg -i voxl-mpa-to-ros_0.3.7-202310131817_arm64.deb
- Running
source /opt/ros/melodic/setup.bash
- Running
roslaunch voxl_mpa_to_ros voxl_mpa_to_ros.launch
This will have no issues running tflite server. In the meantime I will check building from source. Also something to note @Darshit-Desai --> ros1 will no longer be receiving support, I suggest moving over to ros2!!
Hopefully this helps
-
Hi @Zachary-Lowell-0 , actually there is one thing I want to clarify I am not building the source here, but I am simply including the rosidl generated header file of the AIDetection message. Ideally and message if it is installed in the /opt/{ROS_DISTRO} system it should have header files folder inside that path, for example std_msgs has a header file inside the path /opt/{ROS_DISTRO}/include/std_msgs/std_msgs.h I was just trying to include that file.
About installation:
I install melodic from ros docs
The voxl_mpa_to_ros I assume is already there in the SDK 1.1.2 update. so I donot need to install it explicitly
Once I install ros I can use roslaunch to launch voxl_mpa_to_ros as you showedMy problem is when I include this AIDetection message in my other nodes which subscribe to tflite_data topic it doesn't parse it in the /opt folder and its not even there
You can check the following link of my code to understand what I am trying to do:
https://github.com/darshit-desai/Project_LegionAir/blob/master/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp#L17C1-L17C41 -
@Moderator @Zachary-Lowell-0 there is a similar issue with trying to include the message type AIDetection.h in ROS2 mpatoros2.