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

    Vision failure everytime during takeoff

    VOXL 2
    5
    28
    1944
    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.
    • Tamas Pal 0T
      Tamas Pal 0
      last edited by

      I am trying to fly a quad using voxl2 flight deck + voxl2 IO board with F-450 frame. Everytime during takeoff its showing vision failure and starts wobbling uncontrollably. How to fix it ?

      The terminal ouput during takeoff for qvio.

      voxl2:~$ voxl-inspect-qvio 
      waiting for server
      
       dt(ms) |    T_imu_wrt_vio (m)   |Roll Pitch Yaw (deg)|features|quality| state| error_codes |
         33.2 |    0.00    0.00    0.00|   0.0   -0.0    0.0|    14  |   -1% | FAIL | NOT_STATIONARY
      
      Tamas Pal 0T 1 Reply Last reply Reply Quote 0
      • Tamas Pal 0T
        Tamas Pal 0 @Tamas Pal 0
        last edited by

        @modaltb please help me to fix this

        wilkinsafW 1 Reply Last reply Reply Quote 0
        • wilkinsafW
          wilkinsaf ModalAI Team @Tamas Pal 0
          last edited by

          @Tamas-Pal-0 This seems like this might be a pid issue. PID issues causes unstable flight making the camera useless since it is all over the place

          Would you be able to upload a ulog file to https://review.px4.io/ and post the link here so we can review?

          Tamas Pal 0T 1 Reply Last reply Reply Quote 1
          • Tamas Pal 0T
            Tamas Pal 0 @wilkinsaf
            last edited by

            @wilkinsaf Here are the link for the log files
            https://review.px4.io/plot_app?log=8d5ce1ba-a330-4f0e-9026-a70a7c7c5236
            https://review.px4.io/plot_app?log=42ad2744-11e3-42d3-9fb3-8ae4abc40974
            https://review.px4.io/plot_app?log=37c1881e-e9ed-4068-8943-b1b42c860afa
            https://review.px4.io/plot_app?log=1e214868-0fae-41f9-8c8d-9620bd245002

            wilkinsafW 1 Reply Last reply Reply Quote 0
            • wilkinsafW
              wilkinsaf ModalAI Team @Tamas Pal 0
              last edited by

              @Tamas-Pal-0 Yeah, it looks like this UAV is not tuned.
              5908dc36-ba2f-472c-886c-4235fbd7f776-image.png

              Notice how the red and green lines are not matching up. Those should be in sync and much less noisy. Your vibration metrics are also very high

              7736b218-8cd4-48d1-92e0-22ed26e66a3e-image.png

              Are you familiar with PID tuning in PX4? https://docs.px4.io/main/en/config_mc/pid_tuning_guide_multicopter.html

              Tamas Pal 0T 1 Reply Last reply Reply Quote 0
              • Tamas Pal 0T
                Tamas Pal 0 @wilkinsaf
                last edited by

                @wilkinsaf Why the autotune is not working for it?

                1 Reply Last reply Reply Quote 0
                • Dobry KolaczD
                  Dobry Kolacz ModalAI Team
                  last edited by

                  @Tamas-Pal-0 What is the "quality" readout before takeoff when you run voxl-inspect-qvio ?

                  Tamas Pal 0T 1 Reply Last reply Reply Quote 0
                  • Tamas Pal 0T
                    Tamas Pal 0 @Dobry Kolacz
                    last edited by

                    @Dobry-Kolacz The quality reduces to -1% before even taking off everytime

                    1 Reply Last reply Reply Quote 0
                    • Steve TurnerS
                      Steve Turner
                      last edited by Steve Turner

                      Is this a unit direct from ModalAI? If it is, it should be tuned or you could load default parameters from https://gitlab.com/voxl-public/flight-core-px4/px4-parameters/-/tree/master/platforms for your version of PX4 and platform.

                      Then from there you load a helper through QGroundControl parameters page: https://gitlab.com/voxl-public/flight-core-px4/px4-parameters/-/tree/master/helpers

                      That should get you close to a decent tune.

                      If this is a custom drone, you need to configure your extrinsics, calibrate your camera, and validate QVIO first before attempting to fly which it looks like you are attempting to do. The VOXL portal qVIO overlay will show you points selected as well as distance traveled which you can validate against manually moving the drone around prior to any attempts to fly. The camera needs to have areas of contrasting features in view -- so reflective floors or some repetitive patterns can be a challenge for qVIO.

                      https://docs.modalai.com/configure-extrinsics/

                      https://docs.modalai.com/calibrate-cameras/

                      1 Reply Last reply Reply Quote 2
                      • modaltbM
                        modaltb ModalAI Team
                        last edited by modaltb

                        @Tamas-Pal-0 ,

                        I think the 'auto tune' you are talking about is a PX4 feature that came out in PX4 1.13? We at Modal haven't that yet and it's not a feature in the 1.12 based voxl-px4 release at this time, and we don't have documentation calling this out to use anywhere that I'm aware of?

                        I personally am not great at tuning, it's a skill for sure, but when I have done it I start with very low PID values and guess and check till I get it useable and make small tweaks.

                        For sure, make sure you can manual flight smoothly before ever attempting throwing it into a computer vision assisted flight!

                        Without introducing vibrations into the system (e.g. carry vehicle by hand) do you still see this issue?

                        Can you paste a picture of how you are mounting the hardware?

                        Tamas Pal 0T 1 Reply Last reply Reply Quote 0
                        • Tamas Pal 0T
                          Tamas Pal 0 @modaltb
                          last edited by

                          @modaltb The autotune I am talking about is shown here.
                          Screenshot at 2022-10-22 14-49-20.png
                          By deafult it is enabled, even if I disable it, automatically it gets enabled after restart.
                          It is not at usable even in manual mode.

                          The hardware setup is here. I am using modal ai voxl2 case only.

                          WhatsApp Image 2022-10-22 at 2.54.45 PM.jpeg

                          WhatsApp Image 2022-10-22 at 2.55.00 PM.jpeg

                          Tamas Pal 0T 1 Reply Last reply Reply Quote 0
                          • Tamas Pal 0T
                            Tamas Pal 0 @Tamas Pal 0
                            last edited by

                            @modaltb any suggestion ?

                            1 Reply Last reply Reply Quote 0
                            • modaltbM
                              modaltb ModalAI Team
                              last edited by

                              The way I'd tackle this, and I'd be painfully slow to be honest, is reducing the PID values for roll/pitch/yaw manually, and slowly tweaking, likely taking me a day or two, until I get things usable.

                              You are using an S500 frame with the VOXL IO board. We have successfully flown this setup ourselves, for reference here's PID values that could be used to start off with, which is where I'd start: https://gitlab.com/voxl-public/flight-core-px4/px4-parameters/-/blob/master/platforms/v1.12/Sentinel/Sentinel_v1_param_rev_C.params#L110

                              Before any time of autonomous flight, I always do manual flights.

                              • Have you flown in manual mode yet successfully?
                              • If not, can you try the PID gain settings from above?
                              • If not, have you confirmed that the ESC ordering is OK?
                              • If not, have you tried calibrating your PWM ESCs? https://docs.modalai.com/voxl2-io-user-guide/#pwm-esc-calibration
                              Tamas Pal 0T 1 Reply Last reply Reply Quote 0
                              • modaltbM
                                modaltb ModalAI Team
                                last edited by

                                Also, any mechanical looseness will translate into undesired artifacts that may affect flight performance. If the wrong frequencies get into the system, you will see flight issues for sure... Our ME team spends considerable effort in the coupling of the systems.

                                In the image, I'm not totally familiar with the plastics being used for the mounting, are those custom or maybe painted?

                                1 Reply Last reply Reply Quote 0
                                • Tamas Pal 0T
                                  Tamas Pal 0 @modaltb
                                  last edited by

                                  @modaltb I am not able to fly it manually. I do not think it is because of PID gains. It is the ESC that is causing the problem. How to be sure that PWM ESCs are getting calibrated with the backdoor calibration method?
                                  The casing is printed with PLA. It is pretty strong and there is no significant vibration because of it. However, any recommendation which material should we use?
                                  In another post https://forum.modalai.com/topic/1490/garbage-attitude-control?_=1667191852345 @Chad-Sweet asked to disable model_esc driver. What is it and how to disable it ?

                                  1 Reply Last reply Reply Quote 0
                                  • modaltbM
                                    modaltb ModalAI Team
                                    last edited by modaltb

                                    I'm actively looking at this and will report what I find, it's my top priority. I don't believe the UART esc to be causing this but regardless for this use case, we will disable it (some users had both UART esc and VOXL2IO, but we haven't fully validated that use case)

                                    1 Reply Last reply Reply Quote 0
                                    • modaltbM
                                      modaltb ModalAI Team
                                      last edited by modaltb

                                      As far as disabling the driver in the build you have:
                                      /etc/modalai/voxl-px4.confg

                                      You can comment out the last two lines to prevent the UART driver starting.

                                      # ESC driver
                                      # We start this even if there is a PX4IO module. If there is
                                      # a PX4IO (M0065) module it will be plugged into the RC port
                                      # and so this driver will output commands on an empty port.
                                      #qshell modalai_esc start
                                      #qshell mixer load /dev/uart_esc quad_x.main.mix
                                      

                                      I just did a test and this made no difference in flight perf, but in the next release I will be checking for a param and only starting if the param is set:

                                      My first flight I though I was reproducing your error, my Sentinel was flying awful and I had to put it down. I got our flight test team to make some tuning changes around the PID values for roll/pitch/yaw and we were able to fly after that.

                                      So one data point out of this is, the default Sentinel tune is optimized for our UART ESC and doesn't work well with the VOXL IO / PWM escs out of the box likely.....

                                      I will get these off the vehicle when I do some updates here in a bit and can share with you to see if that helps any.

                                      Tamas Pal 0T 1 Reply Last reply Reply Quote 0
                                      • Tamas Pal 0T
                                        Tamas Pal 0 @modaltb
                                        last edited by

                                        @modaltb After diabling it, the quad is able to hover in stabilized mode. but it is going here and there uncontrollably and dangerously without any stick input and a bit of wobbling is still there. Any update?

                                        1 Reply Last reply Reply Quote 0
                                        • modaltbM
                                          modaltb ModalAI Team
                                          last edited by modaltb

                                          My next step is to share some PX4 params (pid settings, cutoff filters) that got my sentinel stable, but I need my team to validate before sending. I’m not clear if this will solve everything but will at least be a good data point. I’m hoping to get this tested tomorrow and will share

                                          1 Reply Last reply Reply Quote 0
                                          • modaltbM
                                            modaltb ModalAI Team
                                            last edited by

                                            @Tamas-Pal-0 ...

                                            I still have nothing to report as far as finding root cause of something, after our tune tweaks I was up and going. I am still testing though for this use case to see if there's some edge case I'm not seeing, I'm just a bit slow with this debugging.

                                            As far as sharing my params that got me flying, I don't even know if my approach here is valid, you have different motor/prop setup, and frames aren't identical, battery type?...

                                            My lawyer told me to tell you "not to use these since we don't have the same setup and the author/developer in the post here isn't really a pilot so...." You've been warned by the lawyer! 😉

                                            # Pitch PID
                                            1	1	MC_PITCH_P	5.5	9
                                            1	1	MC_PITCHRATE_P	0.065	9
                                            1	1	MC_PITCHRATE_I	0.150	9
                                            1	1	MC_PITCHRATE_D	0.002	9
                                            1	1	MC_PITCHRATE_K	1.0	9
                                            
                                            # Roll PID
                                            1	1	MC_ROLL_P	5.5	9
                                            1	1	MC_ROLLRATE_P	0.065	9
                                            1	1	MC_ROLLRATE_I	0.150	9
                                            1	1	MC_ROLLRATE_D	0.002	9
                                            1	1	MC_ROLLRATE_K	1.0	9
                                            
                                            # Yaw PID
                                            1	1	MC_YAW_P	2.0	9
                                            1	1	MC_YAWRATE_P	0.15	9
                                            1	1	MC_YAWRATE_I	0.10	9
                                            1	1	MC_YAWRATE_D	0.0	9
                                            1	1	MC_YAWRATE_K	1.0	9
                                            
                                            ################################################################################
                                            # Noise management
                                            ################################################################################
                                            1	1	MOT_SLEW_MAX	0.0	9
                                            1	1	IMU_DGYRO_CUTOFF	30.0	9
                                            1	1	IMU_ACCEL_CUTOFF	30.0	9
                                            1	1	IMU_GYRO_CUTOFF	30.0	9
                                            

                                            Checkout out noise management here... I've had some nasty flights due to cutoff frequencies.

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