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. Mainline PX4 or voxl-px4 bug causing inconsistent Vz and z estimates by EKF2?

Mainline PX4 or voxl-px4 bug causing inconsistent Vz and z estimates by EKF2?

Scheduled Pinned Locked Moved Ask your questions right here!
17 Posts 4 Posters 3.4k 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.
  • Cliff WongC Offline
    Cliff WongC Offline
    Cliff Wong
    ModalAI Team
    wrote on last edited by
    #4

    Hey there, if you are flying solely with VIO (no GPS), suggest loading our indoor estimator params to add to the current setup on PX4. Outdoor vio+gps is here. These set the vio sensitivity that is in line with the suggestions mention on your PX4 forum's thread. Also we're assuming that extrinsics.conf values have not changed and are same as the factory settings.

    Secondly, if you run voxl-inspect-pose vvhub_body_wrt_local on voxl2 it will apply the extrinsics and output pose that should be inline w/PX4's local position. If those values are correct, then we're looking at a PX4 tuning/config issue (we can still help).

    One thing that looks weird on your PX4 flight log is Roll and Yaw rates are not keeping up w/respective setpoints (noisy). [Hence, thirdly, suggest an] IMU calibration on the PX4 side.

    Lastly in /etc/modalai/voxl-vision-hub.conf there's a parameter called en_reset_vio_if_initialized_inverted. It is set to true as it's to account if vio was accidentally initialized upside down (while carrying the drone for example). You can set it to false and if there's a mismatch on VIO-PX4, you'll see it immediately.

    H 2 Replies Last reply
    0
    • Cliff WongC Cliff Wong

      Hey there, if you are flying solely with VIO (no GPS), suggest loading our indoor estimator params to add to the current setup on PX4. Outdoor vio+gps is here. These set the vio sensitivity that is in line with the suggestions mention on your PX4 forum's thread. Also we're assuming that extrinsics.conf values have not changed and are same as the factory settings.

      Secondly, if you run voxl-inspect-pose vvhub_body_wrt_local on voxl2 it will apply the extrinsics and output pose that should be inline w/PX4's local position. If those values are correct, then we're looking at a PX4 tuning/config issue (we can still help).

      One thing that looks weird on your PX4 flight log is Roll and Yaw rates are not keeping up w/respective setpoints (noisy). [Hence, thirdly, suggest an] IMU calibration on the PX4 side.

      Lastly in /etc/modalai/voxl-vision-hub.conf there's a parameter called en_reset_vio_if_initialized_inverted. It is set to true as it's to account if vio was accidentally initialized upside down (while carrying the drone for example). You can set it to false and if there's a mismatch on VIO-PX4, you'll see it immediately.

      H Offline
      H Offline
      hmlow
      Regular
      wrote on last edited by
      #5

      @Cliff-Wong

      Amended the EVV and EVP noise and gate size values..

      Doesnt seem to have made any diff; EKF2 local position Vz and z gradient are still in different directions during full left and right roll, whereas VIO reported Vz and z are seemingly correct instead. I have uploaded this log on the github post as well.

      Extrinsics are correct because the VIO outputs are correct as mentioned.
      I should also add that this is not based on the Starling but a smaller customized drone.
      Have clocked at least 50hrs of indoor flight from SDK 0.9 thru 1.0 but only recently did i realize this behavior as i adjusted the max velocities up to 3m/s from 1m/s.
      At 1m/s this issue is barely noticeable.

      ModeratorM 1 Reply Last reply
      0
      • H hmlow

        @Cliff-Wong

        Amended the EVV and EVP noise and gate size values..

        Doesnt seem to have made any diff; EKF2 local position Vz and z gradient are still in different directions during full left and right roll, whereas VIO reported Vz and z are seemingly correct instead. I have uploaded this log on the github post as well.

        Extrinsics are correct because the VIO outputs are correct as mentioned.
        I should also add that this is not based on the Starling but a smaller customized drone.
        Have clocked at least 50hrs of indoor flight from SDK 0.9 thru 1.0 but only recently did i realize this behavior as i adjusted the max velocities up to 3m/s from 1m/s.
        At 1m/s this issue is barely noticeable.

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

        @hmlow there are multiple sets of extrinsics

        if you run voxl-inspect-pose vvhub_body_wrt_local on voxl2 it will apply the extrinsics and output pose that should be inline w/PX4's local position. Please verify those outputs match what px4 is reporting.

        PX4 has its own rotations as well

        H 1 Reply Last reply
        0
        • ModeratorM Moderator

          @hmlow there are multiple sets of extrinsics

          if you run voxl-inspect-pose vvhub_body_wrt_local on voxl2 it will apply the extrinsics and output pose that should be inline w/PX4's local position. Please verify those outputs match what px4 is reporting.

          PX4 has its own rotations as well

          H Offline
          H Offline
          hmlow
          Regular
          wrote on last edited by hmlow
          #7

          @Moderator Yes the extrinsics are correct and the VIO pose matches PX4 EKF2 estimates well except during the segments max velocity rolling maneuvers at 3m/s where VIO and EKF2 Vz and z deviates (but VIO's estimates is correct and matches with visual observation), which is what this post was about in the first place.

          Comparison of x y z between VIO and EKF2 local position estimates:

          d4f2c137-a7db-4c80-b93c-85e5a880b550-image.png

          Comparison of Vx between VIO and EKF2 estimates:

          c2b15ad1-0f4a-4a33-bf7d-28fe1f1f57b0-image.png

          Comparison of Vy between VIO and EKF2 estimates:

          e0c3fa36-7a23-416b-8de6-d0e4023f7fb7-image.png

          Comparison of Vz between VIO and EKF2 estimates:

          e165e6e3-b396-4092-ab17-548e3c6adb83-image.png

          Im attaching the voxl-logger VIO logs and PX4 ulg file here. The 2 files are already time synced so you can plot them directly.

          VIO log
          PX4 log

          Thanks

          1 Reply Last reply
          0
          • Cliff WongC Cliff Wong

            Hey there, if you are flying solely with VIO (no GPS), suggest loading our indoor estimator params to add to the current setup on PX4. Outdoor vio+gps is here. These set the vio sensitivity that is in line with the suggestions mention on your PX4 forum's thread. Also we're assuming that extrinsics.conf values have not changed and are same as the factory settings.

            Secondly, if you run voxl-inspect-pose vvhub_body_wrt_local on voxl2 it will apply the extrinsics and output pose that should be inline w/PX4's local position. If those values are correct, then we're looking at a PX4 tuning/config issue (we can still help).

            One thing that looks weird on your PX4 flight log is Roll and Yaw rates are not keeping up w/respective setpoints (noisy). [Hence, thirdly, suggest an] IMU calibration on the PX4 side.

            Lastly in /etc/modalai/voxl-vision-hub.conf there's a parameter called en_reset_vio_if_initialized_inverted. It is set to true as it's to account if vio was accidentally initialized upside down (while carrying the drone for example). You can set it to false and if there's a mismatch on VIO-PX4, you'll see it immediately.

            H Offline
            H Offline
            hmlow
            Regular
            wrote on last edited by hmlow
            #8

            @Cliff-Wong

            While the logs and graphs above are based on my own customized aircraft, I just tried the same maneuver on the Starling (with shipped params and configured for indoor VIO) and i can confirm that the same observation is repeatable.

            Im curious if you guys would see the same uncommanded climb/sink if you would roll your own Starling aircraft left (or right) for 10 - 20m (3m/s, with CP turned off) and then in the opposite direction. The logs would also show that the EKF2 estimates having the same issues as i have described here and on the github post..

            H 1 Reply Last reply
            0
            • H hmlow

              @Cliff-Wong

              While the logs and graphs above are based on my own customized aircraft, I just tried the same maneuver on the Starling (with shipped params and configured for indoor VIO) and i can confirm that the same observation is repeatable.

              Im curious if you guys would see the same uncommanded climb/sink if you would roll your own Starling aircraft left (or right) for 10 - 20m (3m/s, with CP turned off) and then in the opposite direction. The logs would also show that the EKF2 estimates having the same issues as i have described here and on the github post..

              H Offline
              H Offline
              hmlow
              Regular
              wrote on last edited by
              #9

              Hi did anyone manage to verify this?

              H 1 Reply Last reply
              0
              • H hmlow

                Hi did anyone manage to verify this?

                H Offline
                H Offline
                hmlow
                Regular
                wrote on last edited by
                #10

                Any devs?

                I was able to produce this issue on two separate Starlings and a customized 250g drone

                wilkinsafW 1 Reply Last reply
                0
                • H hmlow

                  Any devs?

                  I was able to produce this issue on two separate Starlings and a customized 250g drone

                  wilkinsafW Offline
                  wilkinsafW Offline
                  wilkinsaf
                  ModalAI Team
                  wrote on last edited by
                  #11

                  @hmlow I was seeing the same thing on my starling. Have you tried completely disconnecting the GPS/baro unit on top and turning off the parameter HAS_MAG?

                  H 1 Reply Last reply
                  0
                  • wilkinsafW wilkinsaf

                    @hmlow I was seeing the same thing on my starling. Have you tried completely disconnecting the GPS/baro unit on top and turning off the parameter HAS_MAG?

                    H Offline
                    H Offline
                    hmlow
                    Regular
                    wrote on last edited by
                    #12

                    @wilkinsaf That solved the issue for you?

                    wilkinsafW 1 Reply Last reply
                    0
                    • H hmlow

                      @wilkinsaf That solved the issue for you?

                      wilkinsafW Offline
                      wilkinsafW Offline
                      wilkinsaf
                      ModalAI Team
                      wrote on last edited by
                      #13

                      @hmlow yes. Ideally you would adjust the EKF2 parameters to increase the gps/mag threshold so they wouldn't affect your local position. But, quick and dirty is to unplug the gps unit. See if that solves your issue. If it does, then worry about EKF2 parameters

                      H 1 Reply Last reply
                      0
                      • wilkinsafW wilkinsaf

                        @hmlow yes. Ideally you would adjust the EKF2 parameters to increase the gps/mag threshold so they wouldn't affect your local position. But, quick and dirty is to unplug the gps unit. See if that solves your issue. If it does, then worry about EKF2 parameters

                        H Offline
                        H Offline
                        hmlow
                        Regular
                        wrote on last edited by
                        #14

                        @wilkinsaf actually no, I'm using neither GPS nor mag (disabled both) as my flights are entirely indoors

                        wilkinsafW 1 Reply Last reply
                        0
                        • H hmlow

                          @wilkinsaf actually no, I'm using neither GPS nor mag (disabled both) as my flights are entirely indoors

                          wilkinsafW Offline
                          wilkinsafW Offline
                          wilkinsaf
                          ModalAI Team
                          wrote on last edited by
                          #15

                          @hmlow

                          So, basically the main issue is that in the logs the qvio and ekf2 are reporting different position estimates? But, everything is flying correctly?

                          H 1 Reply Last reply
                          0
                          • wilkinsafW wilkinsaf

                            @hmlow

                            So, basically the main issue is that in the logs the qvio and ekf2 are reporting different position estimates? But, everything is flying correctly?

                            H Offline
                            H Offline
                            hmlow
                            Regular
                            wrote on last edited by hmlow
                            #16

                            @wilkinsaf Flying correctly for the most part yes.

                            Except during specific maneuvers as i have described in my first post (details in the github link) and the third post.
                            Its challenging to summarize the issue in a few lines..

                            wilkinsafW 1 Reply Last reply
                            0
                            • H hmlow

                              @wilkinsaf Flying correctly for the most part yes.

                              Except during specific maneuvers as i have described in my first post (details in the github link) and the third post.
                              Its challenging to summarize the issue in a few lines..

                              wilkinsafW Offline
                              wilkinsafW Offline
                              wilkinsaf
                              ModalAI Team
                              wrote on last edited by
                              #17

                              @hmlow I was flying over the weekend, and saw some inconsistencies as well tbh. The quality of the QVIO was reporting not as high as it was in version 0.9.5 SDK release. I will ask the devs and see what they say.
                              First, I need to compile some logs from voxl-qvio.

                              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