Subscribe to voxl_mpa_to_ros topics
- 
					
					
					
					
 I'm writing a C++ ros node to do 3D object detection using AiDetectionMsg and the pointcloud generated from the stereo camera. How would I subscribe to the AiDetection topic in my code? I couldn't find the topic name via rostopic list. I tried doing#include <voxl_mpa_to_ros/AiDetection.h>but running catkin buildgives a not found error.
- 
					
					
					
					
 @Isabella-Yu said in Subscribe to voxl_mpa_to_ros topics: #include <voxl_mpa_to_ros/AiDetection.h> The topic name for AiDetectionMsgs is tflite_data, and should be published by voxl_mpa_to_ros automatically if voxl-tflite-server is running and publishing to the pipe at/run/mpa/tflite_data.For a custom ROS node using the AiDetectionMsg, you will have to manually copy the AiDetection.msg file that lives here and use catkin to generate the associated header file. This tutorial http://wiki.ros.org/ROS/Tutorials/WritingPublisherSubscriber(c++) covers this fairly well, but the main two additions to your CMakeLists will be adding these lines: add_message_files( DIRECTORY msg FILES AiDetection.msg ) generate_messages()Then, when you need to include this message within your project, the syntax is simply: #include <project_name/AiDetection.h> // where project_name is as whatever you define in your CMakeLists, i.e. // project(voxl_mpa_to_ros)
- 
					
					
					
					
 Thanks! I'll try this out 
- 
					
					
					
					
 @Matt-Turi how would I manually start /run/mpa/tflite_data? I switched to a different m500 and startedvoxl-tflite-server, but there appears to be no/run/mpa/tflite_datapipe, only the/run/mpa/tflitepipe. The model I'm using is the default MobileNetV2 object detection model for VOXL, and I reset the drone to factory defaults usingvoxl-configure-tflite
- 
					
					
					
					
 If there is no tflite_datapipe, you may be using a version of voxl-tflite-server that does not have the ai_detection_t added yet. This feature was added in v0.2.0, so make sure you are using the latest available version!