Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Collapse
Brand Logo

ModalAI Forum

  1. ModalAI Support Forum
  2. Software Development
  3. GPS-denied Navigation (VIO)
  4. Visual position estimate and offboard control

Visual position estimate and offboard control

Scheduled Pinned Locked Moved GPS-denied Navigation (VIO)
6 Posts 2 Posters 625 Views 1 Watching
  • 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.
  • B Offline
    B Offline
    bschulzhf
    wrote on last edited by
    #1

    I am new to VOXL development and am working on an application that will provide a VISION_POSITION_ESTIMATE mavlink message to the autopilot and control the aircraft via OFFBOARD commands. The application will run on the VOXL. I am currently reading frames from the MPA, synchronizing with metadata from MPA, and computing a vision based position estimate. However, I am struggling with how to get that position estimate to the autopilot and how to configure the autopilot to receive them.

    • Do I use the mavlink_onboard pipe to send the mavlink offboard control commands (ex. SET_ATTITUDE_TARGET) and VISION_POSITION_ESTIMATE messages?
    • Are there instances where I should communicate over UDP with the autopilot or are all comms done through MPA?
    • Is there example code to follow with instructions on any internal routing or other setup?

    Thanks

    Eric KatzfeyE 1 Reply Last reply
    0
    • B bschulzhf

      I am new to VOXL development and am working on an application that will provide a VISION_POSITION_ESTIMATE mavlink message to the autopilot and control the aircraft via OFFBOARD commands. The application will run on the VOXL. I am currently reading frames from the MPA, synchronizing with metadata from MPA, and computing a vision based position estimate. However, I am struggling with how to get that position estimate to the autopilot and how to configure the autopilot to receive them.

      • Do I use the mavlink_onboard pipe to send the mavlink offboard control commands (ex. SET_ATTITUDE_TARGET) and VISION_POSITION_ESTIMATE messages?
      • Are there instances where I should communicate over UDP with the autopilot or are all comms done through MPA?
      • Is there example code to follow with instructions on any internal routing or other setup?

      Thanks

      Eric KatzfeyE Offline
      Eric KatzfeyE Offline
      Eric Katzfey
      ModalAI Team
      wrote on last edited by
      #2

      @bschulzhf Take a look at the voxl-vision-hub code. Specifically the vio manager: https://gitlab.com/voxl-public/voxl-sdk/services/voxl-vision-hub/-/blob/dev/src/vio_manager.c?ref_type=heads

      B 1 Reply Last reply
      0
      • Eric KatzfeyE Eric Katzfey

        @bschulzhf Take a look at the voxl-vision-hub code. Specifically the vio manager: https://gitlab.com/voxl-public/voxl-sdk/services/voxl-vision-hub/-/blob/dev/src/vio_manager.c?ref_type=heads

        B Offline
        B Offline
        bschulzhf
        wrote on last edited by
        #3

        I was able to get the visual odometry message updating the PX4 EKF2 and that seems like the better path. Just to make sure I've got this set up correctly, I put the application processor time (CLOCK_MONOTONIC) into the timestamp field and the mavlink server updates the message with the appropriate PX4 kernel time before forwarding it to PX4?

        Eric KatzfeyE 1 Reply Last reply
        0
        • B bschulzhf

          I was able to get the visual odometry message updating the PX4 EKF2 and that seems like the better path. Just to make sure I've got this set up correctly, I put the application processor time (CLOCK_MONOTONIC) into the timestamp field and the mavlink server updates the message with the appropriate PX4 kernel time before forwarding it to PX4?

          Eric KatzfeyE Offline
          Eric KatzfeyE Offline
          Eric Katzfey
          ModalAI Team
          wrote on last edited by
          #4

          @bschulzhf Sort of. The timestamp from voxl-vision-hub and voxl-mavlink-server is just the Linux processor monotonic time. But because voxl-mavlink-server has been responding to the time sync protocol messages from PX4 it allows PX4 itself to update the timestamp to PX4 time when it comes in.

          B 1 Reply Last reply
          0
          • Eric KatzfeyE Eric Katzfey

            @bschulzhf Sort of. The timestamp from voxl-vision-hub and voxl-mavlink-server is just the Linux processor monotonic time. But because voxl-mavlink-server has been responding to the time sync protocol messages from PX4 it allows PX4 itself to update the timestamp to PX4 time when it comes in.

            B Offline
            B Offline
            bschulzhf
            wrote last edited by
            #5

            To make sure I understand this, I still publish messages from the application processor with the application processor time and PX4 will correct it? Then do the PX4 messages coming out (like with attitude data) then have the timestamp correct relative to the application processor, or do I need to convert those timestamps?

            Eric KatzfeyE 1 Reply Last reply
            0
            • B bschulzhf

              To make sure I understand this, I still publish messages from the application processor with the application processor time and PX4 will correct it? Then do the PX4 messages coming out (like with attitude data) then have the timestamp correct relative to the application processor, or do I need to convert those timestamps?

              Eric KatzfeyE Offline
              Eric KatzfeyE Offline
              Eric Katzfey
              ModalAI Team
              wrote last edited by
              #6

              @bschulzhf PX4 will only correct incoming messages. Something external will have to also run TIMESYNC with PX4 to estimate the offset and correct and incoming PX4 message timestamps that it wants to align. voxl-mavlink-server does this for a few messages.

              1 Reply Last reply
              0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              ModalAI
              Categories Recent Tags ModalAI.com Docs
              © 2026 ModalAI® · Accelerating autonomy for smaller, smarter, safer drones · Powered by NodeBB
              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups