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

ModalAI Forum

  1. ModalAI Support Forum
  2. Ask your questions right here!
  3. Garbage attitude control

Garbage attitude control

Scheduled Pinned Locked Moved Ask your questions right here!
27 Posts 9 Posters 7.6k Views 4 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.
  • Patrick HincheyP Offline
    Patrick HincheyP Offline
    Patrick Hinchey
    Contributor
    wrote on last edited by
    #1

    Hi,

    I have integrated the VOXL2 onto a standard carbon-fibre drone frame, roughly 400mm between diagonal motor mounts. This frame has been flown many times with Betaflight and Pixhawk flight controllers and always flies beautifully.

    The VOXL2 is performing awfully. I initially loaded on m500 PIDs and it couldn't even take off without shaking violently. I detuned the gains down to almost nothing before it would stop oscillating. I can coax the thing into the air now, but the gains are so low that disturbance rejection is terrible and it's just sloppy. It's impossible to tighten the gains without it shaking itself apart.

    I originally had the VOXL2 hard-mounted, but then I tired mounting it with 2 different levels of foam. Neither worked. Here's the kicker - I set it up to use a Pixhawk 4 as external controller and it flew b-e-a-utifully straight away on default PIDs.

    I have tried two different VOXLs and they both perform the same. The oscillations are present in both Stabilize and Acro mode, so the Rate loop is to blame.

    For context, I have 10 years of experience tuning PX4, Ardupilot and Betaflight controllers on aircraft from 20g to 200kg, so this isn't 'how do I tune the PIDs?', rather 'what am I missing?'.

    Normally when I see this kind of behaviour, it's caused by vibration, but looking at the 'vibe' meter on QGC, X and Y vibe is non-existant, and Z vibe about 5% of the clipping threshold.

    So what am I missing?

    We just completed a remote flight with telemetry controlled by the VOXL2 over VPN, I controlled it from 20km away so I'm pretty happy right now, but it would be even better if we could eliminate the external flight controller.

    Thanks,
    Patrick

    bensusanaB 1 Reply Last reply
    0
    • Chad SweetC Offline
      Chad SweetC Offline
      Chad Sweet
      ModalAI Team
      wrote on last edited by
      #2

      Which ESCs are you using? The ModalAI ESC is closed loop RPM control for efficiency and requires its own calibration to the motors and propellers

      https://docs.modalai.com/modal-esc-v2-manual/#calibration
      https://gitlab.com/voxl-public/flight-core-px4/voxl-esc/-/blob/master/tools/calibration.md

      1 Reply Last reply
      0
      • Patrick HincheyP Offline
        Patrick HincheyP Offline
        Patrick Hinchey
        Contributor
        wrote on last edited by
        #3

        Thanks for the quick reply, Chad!
        We're using a standard 4-in-1 racing ESC on PWM. We have a 6S battery so we couldn't use the ModalAI ESC but I've just ordered some of your new T-motor F55As.

        1 Reply Last reply
        0
        • Chad SweetC Offline
          Chad SweetC Offline
          Chad Sweet
          ModalAI Team
          wrote on last edited by
          #4

          Then it sounds like you're using the M0065 VOXL 2 I/O board with it to generate PWM? If so, have you tried calibrating those ESC? https://docs.modalai.com/voxl2-io-user-guide/#pwm-esc-calibration

          Otherwise, it still sounds like platform tuning... Can you copy the working parameters from your Pixhawk over?

          Patrick HincheyP 1 Reply Last reply
          0
          • Chad SweetC Chad Sweet

            Then it sounds like you're using the M0065 VOXL 2 I/O board with it to generate PWM? If so, have you tried calibrating those ESC? https://docs.modalai.com/voxl2-io-user-guide/#pwm-esc-calibration

            Otherwise, it still sounds like platform tuning... Can you copy the working parameters from your Pixhawk over?

            Patrick HincheyP Offline
            Patrick HincheyP Offline
            Patrick Hinchey
            Contributor
            wrote on last edited by
            #5

            @Chad-Sweet yep, we're using the I/O expander. We calibrated the ESC and and tried with the pixhawk's gains too, and it was still unflyable. Again, I have plenty of experience tuning PIDs, and nothing I could do could make this stable. Would it help if I uploaded some logs?

            1 Reply Last reply
            0
            • Chad SweetC Offline
              Chad SweetC Offline
              Chad Sweet
              ModalAI Team
              wrote on last edited by
              #6

              Yes, of course. logs.px4.io is a good way

              1 Reply Last reply
              0
              • Chad SweetC Offline
                Chad SweetC Offline
                Chad Sweet
                ModalAI Team
                wrote on last edited by
                #7

                Another thought... Did you configure the mixer using these docs: https://docs.modalai.com/voxl2-io-user-guide/#supported-mixers-and-airframe-setup

                And then did you disable the modal_esc driver?

                Tamas Pal 0T 1 Reply Last reply
                0
                • Chad SweetC Chad Sweet

                  Another thought... Did you configure the mixer using these docs: https://docs.modalai.com/voxl2-io-user-guide/#supported-mixers-and-airframe-setup

                  And then did you disable the modal_esc driver?

                  Tamas Pal 0T Offline
                  Tamas Pal 0T Offline
                  Tamas Pal 0
                  Regular
                  wrote on last edited by
                  #8

                  @Chad-Sweet I am also having same issue. Can you please tell what is modal_esc driver? How to disable it ?

                  Patrick HincheyP 1 Reply Last reply
                  0
                  • Tamas Pal 0T Tamas Pal 0

                    @Chad-Sweet I am also having same issue. Can you please tell what is modal_esc driver? How to disable it ?

                    Patrick HincheyP Offline
                    Patrick HincheyP Offline
                    Patrick Hinchey
                    Contributor
                    wrote on last edited by
                    #9

                    Hmm, that's really interesting. Looking back at the parameters from those tests, the UART_ESC_CONFIG was set to 1. I'll set it to 0 and see what happens.
                    @Tamas-Pal-0 go into qgroudcontrol parameters and set UART_ESC_CONFIG to 0. please post your results!

                    1 Reply Last reply
                    0
                    • modaltbM Offline
                      modaltbM Offline
                      modaltb
                      ModalAI Team
                      wrote on last edited by
                      #10

                      Guys, I'm actively looking at this and will report what I find, it's my top priority.

                      1 Reply Last reply
                      0
                      • Patrick HincheyP Offline
                        Patrick HincheyP Offline
                        Patrick Hinchey
                        Contributor
                        wrote on last edited by
                        #11

                        Thank you @modaltb , much appreciated. I look forward to your findings. I disabled the modal_esc driver and it didn't help. Here is a log of the VOXL as flight controller, and one with a Pixhawk 4 as flight controller, with identical parameters. Both were mounted to the aircraft the whole time, all we did was swap wires around between flights.
                        Obviously there's still room for improvement with the Pixhawk 4 but for the most part it flew really well with default PID gains, whereas we couldn't even get the VOXL2 stable.

                        VOXL2:
                        https://logs.px4.io/plot_app?log=25afc87c-37cd-4693-9318-df62be99e4bd

                        Pixhawk 4:
                        https://logs.px4.io/plot_app?log=4b8a4762-8f59-49ca-a7fc-af41d38c466b

                        Tamas Pal 0T 1 Reply Last reply
                        0
                        • Patrick HincheyP Patrick Hinchey

                          Thank you @modaltb , much appreciated. I look forward to your findings. I disabled the modal_esc driver and it didn't help. Here is a log of the VOXL as flight controller, and one with a Pixhawk 4 as flight controller, with identical parameters. Both were mounted to the aircraft the whole time, all we did was swap wires around between flights.
                          Obviously there's still room for improvement with the Pixhawk 4 but for the most part it flew really well with default PID gains, whereas we couldn't even get the VOXL2 stable.

                          VOXL2:
                          https://logs.px4.io/plot_app?log=25afc87c-37cd-4693-9318-df62be99e4bd

                          Pixhawk 4:
                          https://logs.px4.io/plot_app?log=4b8a4762-8f59-49ca-a7fc-af41d38c466b

                          Tamas Pal 0T Offline
                          Tamas Pal 0T Offline
                          Tamas Pal 0
                          Regular
                          wrote on last edited by
                          #12

                          @Patrick-Hinchey I also have same experience like you. After disabling modalai_esc driver. I set UART_ESC_CONFIG to 0 also. It didn't help.

                          1 Reply Last reply
                          0
                          • modaltbM Offline
                            modaltbM Offline
                            modaltb
                            ModalAI Team
                            wrote on last edited by modaltb
                            #13

                            @Patrick-Hinchey ,

                            I'm still actively looking into this! One area that caught my eye is here:

                            Link Preview Image
                            File not found · modalai/px4-firmware

                            PX4 Autopilot Software. Contribute to modalai/px4-firmware development by creating an account on GitHub.

                            favicon

                            GitHub (github.com)

                            Out testing has been on a Sentinel setup and am wondering if there's some settings not propagating correctly.

                            This file can be edited on target to adjust, I'm going through some testing now.

                            1 Reply Last reply
                            0
                            • M Offline
                              M Offline
                              m1baldwin
                              Contributor
                              wrote on last edited by m1baldwin
                              #14

                              I saw something similar with PX4 version 1.13.1; I don't have a VOXL2, but I had an issue where with VOXL 1 Flight Deck with PX4 1.13.1 did not work well for me on a standard airframe.

                              I downgraded to 1.11.3 sub-version 0.2.3 - I think this is a Modal AI sub-version? - and had better luck, maybe try an earlier version of px4

                              1 Reply Last reply
                              0
                              • modaltbM Offline
                                modaltbM Offline
                                modaltb
                                ModalAI Team
                                wrote on last edited by
                                #15

                                No smoking gun, but here's a commit I have going that uses params instead of hard coded values that we could give a try.

                                Link Preview Image
                                - use PWM params for setting up M0065 instead of hard coded values · modalai/px4-firmware@a0317b5

                                PX4 Autopilot Software. Contribute to modalai/px4-firmware development by creating an account on GitHub.

                                favicon

                                GitHub (github.com)

                                File changed is here: https://github.com/modalai/px4-firmware/blob/pr-m0065-mr1/boards/modalai/rb5-flight/voxl-px4.config

                                On monday, I did fly the default Sentinel params with this VOXL2 IO board, it oscillated like crazy and we did a quick dirty tune and got it reasonable.

                                I'm going to request that we do a full tune on our Sentinel here to ensure we can get same perf as expected with this setup so we have a ground truth. Will report back when I have info.

                                1 Reply Last reply
                                0
                                • modaltbM Offline
                                  modaltbM Offline
                                  modaltb
                                  ModalAI Team
                                  wrote on last edited by
                                  #16

                                  Also, any chance you could post a link to a video of a flight to help us understand the failure mode even more?

                                  1 Reply Last reply
                                  0
                                  • Patrick HincheyP Offline
                                    Patrick HincheyP Offline
                                    Patrick Hinchey
                                    Contributor
                                    wrote on last edited by
                                    #17

                                    Thank you for looking into this.
                                    Here is a video
                                    https://drive.google.com/file/d/1qPXFrxluE-MyOOpnfHQJ5eT4XOLYvGNu/view?usp=share_link
                                    I'll try with the new config file tonight. However the Pixhawk4 parameters are very similar - min=1075, maz=1950 so I would be surprised if that mad all that much difference.
                                    Also, regarding tuning the VOXL2, I'm curious to hear your opinion on why the same gains on the same machine would work great on the Pixhawk4 but not on the VOXL2. The Pixhawk4 is running the latest stable release

                                    1 Reply Last reply
                                    0
                                    • modaltbM Offline
                                      modaltbM Offline
                                      modaltb
                                      ModalAI Team
                                      wrote on last edited by
                                      #18

                                      Hey @Patrick-Hinchey ,

                                      Thanks for the video, I'm gonna get some teammates to help early this week who are much more versed in this area.

                                      Here's my setup, it's VOXL2 with VOXL2 IO, as you can see it's flyable but a little rough, I too initially had a wobble that prevented me from flying and changed params a bit from our default Sentinel settings to get it airborne:
                                      https://www.youtube.com/watch?v=1INto92k-v0

                                      I'll get some members of the team early this week to better answer your second question and we'll keep cranking away.

                                      1 Reply Last reply
                                      0
                                      • Daniel MellingerD Offline
                                        Daniel MellingerD Offline
                                        Daniel Mellinger
                                        wrote on last edited by
                                        #19

                                        Hi @Patrick-Hinchey, we are actively working on figuring out the answer your question about "why the same gains on the same machine would work great on the Pixhawk4 but not on the VOXL2." There are several differences between the PX4 code running on VOXL2 compared to Pixhawk4. Specifically, the path of the PWM commands to the motors including the px4io setup is different on VOXL2 compared to Pixhawk4. Additionally, VOXL2 uses a different IMU than Pixhawk4 and that IMU is configured differently. We will keep you posted on what we are able to figure out.

                                        1 Reply Last reply
                                        0
                                        • ? Offline
                                          ? Offline
                                          A Former User
                                          wrote on last edited by A Former User
                                          #20

                                          @Patrick-Hinchey

                                          I hope all is well!

                                          I'm sorry you're dealing with this - I know it can be frustrating.

                                          I'm jumping here a little late and may have missed something. I was wondering, can you confirm that you have the correct motor mapping:
                                          f58f9527-186f-40ab-8c76-a389971eebc1-image.png

                                          Also, were you able to successfully run through a PWM ESC calibration using these Instructions? Which specific ESCs are you using? Did you hear the expected chimes (maybe firmware not accepting)?

                                          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