ModalAI Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Subscribe to voxl_mpa_to_ros topics

    Ask your questions right here!
    ros
    2
    5
    563
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Isabella YuI
      Isabella Yu
      last edited by Isabella Yu

      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 build gives a not found error.

      1 Reply Last reply Reply Quote 0
      • ?
        A Former User
        last edited by

        @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)
        Isabella YuI 1 Reply Last reply Reply Quote 0
        • Isabella YuI
          Isabella Yu
          last edited by

          Thanks! I'll try this out

          1 Reply Last reply Reply Quote 0
          • Isabella YuI
            Isabella Yu @Guest
            last edited by

            @Matt-Turi how would I manually start /run/mpa/tflite_data? I switched to a different m500 and started voxl-tflite-server, but there appears to be no /run/mpa/tflite_data pipe, only the /run/mpa/tflite pipe. The model I'm using is the default MobileNetV2 object detection model for VOXL, and I reset the drone to factory defaults using voxl-configure-tflite

            1 Reply Last reply Reply Quote 0
            • ?
              A Former User
              last edited by

              @Isabella-Yu,

              If there is no tflite_data pipe, 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!

              1 Reply Last reply Reply Quote 1
              • First post
                Last post
              Powered by NodeBB | Contributors