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

    Starling 2 Max Crashes in Position Hold Mode After Disabling Magnetometer for Indoor Flight

    Starling & Starling 2
    3
    11
    146
    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.
    • Eric KatzfeyE
      Eric Katzfey ModalAI Team @berayksl
      last edited by

      @berayksl What version of the SDK are you running? Can you please provide a log of the flight? When you say it didn't respond to RC inputs are you referring to stick input or trying to switch flight modes out of position hold?

      B 1 Reply Last reply Reply Quote 0
      • B
        berayksl @Eric Katzfey
        last edited by

        @Eric-Katzfey I'm running SDK version 1.4.3.

        Where can I find the log file of the flight?

        The drone didn't respond to stick input, which it should have in the position hold mode.

        Eric KatzfeyE 1 Reply Last reply Reply Quote 0
        • Eric KatzfeyE
          Eric Katzfey ModalAI Team @berayksl
          last edited by

          @berayksl Flight logs are in /data/px4/log

          B 1 Reply Last reply Reply Quote 1
          • B
            berayksl @Eric Katzfey
            last edited by

            @Eric-Katzfey here is the log of the flight: https://review.px4.io/plot_app?log=a2686aeb-913d-49aa-8f21-b9802b28ec02

            Cliff WongC 1 Reply Last reply Reply Quote 0
            • Cliff WongC
              Cliff Wong ModalAI Team @berayksl
              last edited by Cliff Wong

              @berayksl Hi there. being 1.4.3, you may want check the parameter in /etc/modalai/voxl-vision-hub.conf that:
              "en_vio": true,

              Also, on some setups we noticed added latency that triggers the PX4's EV timeout and could explain the "invalid setpoint" log message. In PX4 please set EKF2_NOAID_TOUT parameter in QGC to 8000000.

              Checking the above and before your next test flight, perform a hand test as follows:

              1. startup voxl portal & connect to the drone (web browser w/ip addr of the drone as the url--wifi must be running)
              2. goto the "vio" tab in portal
              3. pick up the drone and move it back and forth, then left and right. You should get something close to a "plus" trajectory in the portal screen (see attached). If it "flies away" then good chance calibration (imu, or camera, extrinsics) is off. If it stays frozen/unresponsive then there's a SDK configuration error.
              4. If you can repeat what is shown in the image, that confirms VIO is working properly and likely the above NOAID issue..
                Screenshot from 2025-05-22 17-16-36.png
                --
                --

              if you're still having issues on take off, then you can modify in /etc/modalai/voxl-open-vins-server.conf and try the blind takeoff option by setting "en_vio_always_on": false, but note VIO will not report any movements (vio position will report as if frozen) until you arm the drone.

              B 2 Replies Last reply Reply Quote 1
              • B
                berayksl @Cliff Wong
                last edited by

                @Cliff-Wong said in Starling 2 Max Crashes in Position Hold Mode After Disabling Magnetometer for Indoor Flight:

                8000000

                Hi Cliff,

                Thank you for your response. I checked the config file and "en_vio" was set to 'true'.

                Also I tried moving the drone inside the drone cage and was able to get a trajectory similar to yours initially:
                Screenshot from 2025-05-23 20-31-49.png

                However, the results are inconsistent. Sometimes the trajectory is inaccurate, and the drone drifts away in the portal view:
                Screenshot from 2025-05-23 20-27-07.png

                Could this be related to calibration issues, or is VIO inherently unreliable in some cases? Could the drift be due to a lack of visual features in the environment?

                Also, do you think it's safe to fly indoors without the magnetometer? (I had to disable it because I was getting an interference error that prevented arming)

                Are there any other PX4 parameters I should adjust to ensure safe indoor flight? I want to double-check that everything is set up correctly before attempting another test because I don't want to crash the drone like last time.

                Lastly, is there a way to test the VIO setup in a HITL simulation before performing an actual flight, just to verify that everything works as expected?

                Thanks again for your help!

                1 Reply Last reply Reply Quote 0
                • B
                  berayksl @Cliff Wong
                  last edited by

                  @Cliff-Wong @Eric-Katzfey Any updates?

                  Cliff WongC 1 Reply Last reply Reply Quote 0
                  • Cliff WongC
                    Cliff Wong ModalAI Team @berayksl
                    last edited by

                    @berayksl
                    Hi there,

                    1. Since you were able to run a limited bench test, having it fly away after a couple movements indicates 3 possibilities:
                    • extrinsics are incorrect -- either bad imu_apps to cam# values or camera outputs are flipped.
                    • intrinsics are incorrect (bad camera calibrations)
                    1. yes you can run without mag enabled. Should work normally if (of course) VIO is running normally.

                    2. As for PX4 parameters, VIO enabling can be setup applying this param file.

                    My thinking is the camera extrinsics maybe off or mismatched to the camera ID. If you can only enabling one camera at a time and run the bench/hand test as if like a single camera vio setup, hopefully it will reveal the misconfigured camera (if all then we have an imu issue).

                    B 1 Reply Last reply Reply Quote 0
                    • B
                      berayksl @Cliff Wong
                      last edited by

                      @Cliff-Wong Thanks for your response. How can I enable only one camera at a time? If the camera calibration is bad, how can I recalibrate them? Lastly, is there a way to test the VIO setup in a HITL simulation before performing an actual flight, just to verify that everything works as expected?

                      Cliff WongC 1 Reply Last reply Reply Quote 0
                      • Cliff WongC
                        Cliff Wong ModalAI Team @berayksl
                        last edited by Cliff Wong

                        @berayksl Hi there,

                        In the VOXL2 file /etc/modalai/vio_cams.conf all the cameras should be listed as a JSON record. the top-level disable attribute of each record can be edited to turn cameras on and off (make front true and the others false for just the front camera).

                        On calibration, instructions can be found here.

                        If the camera's physical positions changed from delivered, then you'll need to update the extrinsics.

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