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

ModalAI Forum

  1. ModalAI Support Forum
  2. VOXL Dev Drones
  3. Sentinel
  4. Question on Custom Controller Implementation

Question on Custom Controller Implementation

Scheduled Pinned Locked Moved Sentinel
4 Posts 3 Posters 601 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.
  • J Offline
    J Offline
    jmltt
    Regular
    wrote on last edited by
    #1

    I'm working with the Sentinel platform and I'm planning on testing a custom controller that runs in tandem with a deep learning model and I have some general questions about implementation. I've modified the existing voxl-vision-hub to contain an additional offboard mode with a custom trajectory. I want to also implement a custom controller that basically replaces the Position/Attitude controllers on PX4 and just feeds rate/thrust commands to PX4's rate controller.

    1. Is implementing a controller as a separate thread within a new offboard mode in voxl-vision-hub a viable option or would I have to modify PX4 source code to edit the existing position/attitude controllers? I saw there is a message struct in the mavlink API for sending rate/thrust commands directly to PX4 so I was planning on having the controller pull down the current state from the autopilot monitor in voxl-vision-hub for input the same way existing offboard modes do and output the rate thrust commands via mavlink the same way trajectory setpoints are sent.

    2. If I do have to modify PX4 source code, how would I go about doing that? Can I just uninstall the px4 service from the sentinel, pull down the repo here https://gitlab.com/voxl-public/voxl-sdk/services/voxl-px4, swap the px4 submodule with an edited one, rebuild locally and push it back to sentinel?

    3. Any general advice/warnings for custom controller implementation?

    Any feedback is appreciated. Thanks!

    ModeratorM Eric KatzfeyE 2 Replies Last reply
    0
    • J jmltt

      I'm working with the Sentinel platform and I'm planning on testing a custom controller that runs in tandem with a deep learning model and I have some general questions about implementation. I've modified the existing voxl-vision-hub to contain an additional offboard mode with a custom trajectory. I want to also implement a custom controller that basically replaces the Position/Attitude controllers on PX4 and just feeds rate/thrust commands to PX4's rate controller.

      1. Is implementing a controller as a separate thread within a new offboard mode in voxl-vision-hub a viable option or would I have to modify PX4 source code to edit the existing position/attitude controllers? I saw there is a message struct in the mavlink API for sending rate/thrust commands directly to PX4 so I was planning on having the controller pull down the current state from the autopilot monitor in voxl-vision-hub for input the same way existing offboard modes do and output the rate thrust commands via mavlink the same way trajectory setpoints are sent.

      2. If I do have to modify PX4 source code, how would I go about doing that? Can I just uninstall the px4 service from the sentinel, pull down the repo here https://gitlab.com/voxl-public/voxl-sdk/services/voxl-px4, swap the px4 submodule with an edited one, rebuild locally and push it back to sentinel?

      3. Any general advice/warnings for custom controller implementation?

      Any feedback is appreciated. Thanks!

      ModeratorM Offline
      ModeratorM Offline
      Moderator
      ModalAI Team
      wrote on last edited by
      #2

      @josephmlullo Here is how to build PX4 for VOXL 2 https://docs.modalai.com/voxl-px4-dev-build-guide/

      ModeratorM 1 Reply Last reply
      0
      • ModeratorM Moderator

        @josephmlullo Here is how to build PX4 for VOXL 2 https://docs.modalai.com/voxl-px4-dev-build-guide/

        ModeratorM Offline
        ModeratorM Offline
        Moderator
        ModalAI Team
        wrote on last edited by
        #3

        On this branch you can see how to control the attitude for PX4 in offboard_mode just from the CPU https://gitlab.com/voxl-public/voxl-sdk/services/voxl-vision-hub/-/blob/dev_attitude_target/src/offboard_manual.c?ref_type=heads

        Please note, this is development code and we do not support it in any way. you are on your own when implementing your own controller

        1 Reply Last reply
        0
        • J jmltt

          I'm working with the Sentinel platform and I'm planning on testing a custom controller that runs in tandem with a deep learning model and I have some general questions about implementation. I've modified the existing voxl-vision-hub to contain an additional offboard mode with a custom trajectory. I want to also implement a custom controller that basically replaces the Position/Attitude controllers on PX4 and just feeds rate/thrust commands to PX4's rate controller.

          1. Is implementing a controller as a separate thread within a new offboard mode in voxl-vision-hub a viable option or would I have to modify PX4 source code to edit the existing position/attitude controllers? I saw there is a message struct in the mavlink API for sending rate/thrust commands directly to PX4 so I was planning on having the controller pull down the current state from the autopilot monitor in voxl-vision-hub for input the same way existing offboard modes do and output the rate thrust commands via mavlink the same way trajectory setpoints are sent.

          2. If I do have to modify PX4 source code, how would I go about doing that? Can I just uninstall the px4 service from the sentinel, pull down the repo here https://gitlab.com/voxl-public/voxl-sdk/services/voxl-px4, swap the px4 submodule with an edited one, rebuild locally and push it back to sentinel?

          3. Any general advice/warnings for custom controller implementation?

          Any feedback is appreciated. Thanks!

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

          @josephmlullo The build environment for px4 is within a Docker container. You can find the instructions on how to create this Docker image here: https://gitlab.com/voxl-public/rb5-flight/rb5-flight-px4-build-docker

          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

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