# Unstable Flight (local Position Estimate Error)

Source: https://forum.modalai.com/topic/3836/unstable-flight-local-position-estimate-error
Category: General Questions (https://forum.modalai.com/category/2/general-questions)
Posted: 2024-09-27 19:06:53 UTC by Shivam Sehgal
Replies: 8 · Views: 1599

## Shivam Sehgal · 2024-09-27 19:06:53 UTC

Drone Info:
Starling Drone, Voxl SDK Version: 1.1.2

I had a starling drone, which was not flying properly. I was changing into failsafe mode and I was unable to control it in position mode. I thought one of the motors is damages so I replaced it. After that it works a bit better but still goes into failsafe mode again and again.

I have 2 log files 
[log1](https://review.px4.io/plot_app?log=a8c1c4dc-8319-4e9b-8ae4-ae62fb88a119)
[log2](https://review.px4.io/plot_app?log=181b9fbd-e36d-4058-b7ae-dcd2a94595ec)

Also, I am able to control it well in manual mode.
Can you help me with this?

## Reply by Shivam Sehgal · 2024-10-23 16:57:45 UTC

@Shivam-Sehgal Turns out I have high imu vibrations, I was able to get it down by tightening the bolts properly but still there is high vibration in z - 8-9 and x -3-4. how can I find the cause of vibrations. 
The motor seems to be correctly mounted and propellers are clean and not damaged.

## Reply by Zachary Lowell 0 · 2024-10-24 22:08:12 UTC

@Shivam-Sehgal Any reason why you are on SDK 1.1.2 and not the most recent 1.3.5? 

My guess is there is some vibrations coming from somewhere causing a lot of noise in the imu causing qvio to feed bad data to the drone. One thing you could try doing is leveragin the imu_px4 instead of imu_apps for qvio which would make qvio act accordingly if manual flight seems to be stable.

Zach

## Reply by Shivam Sehgal · 2024-10-25 15:32:04 UTC (in reply to Zachary Lowell 0)

@Zachary-Lowell-0 I did test SDK 1.3 but the ros2 package I had built for my application does not work as I want it to in that SDK version you can refer this question https://forum.modalai.com/topic/3775/tof-sensor-quailty-down-after-upgrading-to-voxl-1-3?_=1729870030812 for that. 

how can I leverage the imu_px4 instead of imu_apps, I have been trying to find some resource to do that but I could not. When I do ```voxl-inspect-imu imu_px4``` I don't see it, it shows waiting for server at. 
how do I set it up.

## Reply by Shivam Sehgal · 2024-10-25 16:33:41 UTC (in reply to Zachary Lowell 0)

@Zachary-Lowell-0 I started the imu_px4 server, but then again on inspecting it I just see the units no values.

## Reply by tom (ModalAI staff) · 2024-10-25 16:51:09 UTC (in reply to Shivam Sehgal)

@Shivam-Sehgal voxl-px4-imu-server is targeted toward RB5 and not VOXL 2 as RB5 only has one IMU.

If you'd like to start the px4 driver for the DSP IMU you can do the following:

In `/usr/bin/voxl-px4-start`, add the line `imu_server start`

Then if you restart voxl-px4 and voxl-px4-imu-server you will see data populate

## Reply by Shivam Sehgal · 2024-10-28 21:49:20 UTC (in reply to tom)

@tom said in [Unstable Flight \(local Position Estimate Error\)](/post/19437):
> imu_server start

Thanks it worked.
How can update the extrinsic.conf file for imu_px4?

## Reply by Shivam Sehgal · 2024-10-28 23:34:10 UTC (in reply to Shivam Sehgal)

@Shivam-Sehgal 

I was able to start the imu_px4. I did just a simple take off and landing manually through rc controller in position mode.

imu_px4 has following vibrations(look at the max values)

```
Noise values are RMS values in units of m/s2 and rad/s.
Value in parenthesis are the max values recorded since the start.
Values in RED are high (>5.00m/s2 or >0.50rad/s).
Values in YELLOW are okay (>2.00m/s2 or >0.20rad/s).
Values in GREEN are great!

 Accl (X) | Accl (Y) | Accl (Z) |  Gyro (X)  |  Gyro (Y)  |  Gyro (Z)
0.01(31.54) 0.01(10.40) 0.01(30.38) 0.003(0.625) 0.003(1.548) 0.002(0.210)
```  

imu_app has following vibrations(look at the max values)

```
Noise values are RMS values in units of m/s2 and rad/s.
Value in parenthesis are the max values recorded since the start.
Values in RED are high (>5.00m/s2 or >0.50rad/s).
Values in YELLOW are okay (>2.00m/s2 or >0.20rad/s).
Values in GREEN are great!

 Accl (X) | Accl (Y) | Accl (Z) |  Gyro (X)  |  Gyro (Y)  |  Gyro (Z)
0.00(4.32) 0.00(2.31) 0.00(7.96) 0.001(0.330) 0.000(0.491) 0.000(0.101)
``` 

Why are vibrations much worse on imu_px4, did I do something wrong?

## Reply by Shivam Sehgal · 2024-11-16 04:47:27 UTC (in reply to Shivam Sehgal)

@Moderator any advice?
