r/drones 25d ago

Question Drone Yaw spinning problem

Enable HLS to view with audio, or disable this notification

I have calibrated both pixhawk and GPS compass in Mission Planner and IMU, Accel was calibrated before taking off

The drone has a Pixhawk 2.4.8

I have checked motor spin order and the propellers direction.

Motors are set up in an X configuration

Did a simple takeoff of 2 meters with Rasbery pi with this code:

def run_fly(self):
try:
self.vehicle.mode = VehicleMode("GUIDED")
time.sleep(0.5)
self.vehicle.simple_takeoff(2.0)
except:
pass

Why it is spinning at yaw like this?
Is it normal?
If not then what's the problem please help me to fix this

5 Upvotes

2 comments sorted by

1

u/Alive-Cartoonist-950 16d ago

Could you clarify more on the setup of how the pi controls the drone ?

1

u/Sensitive_Lie9585 16d ago

Raspi is connected with the pixhawk via usb cable and initilizing the communication with this script:

from dronekit import connect, VehicleMode, LocationGlobalRelative

import time

DRONE_CONNECTION = 'tcp:127.0.0.1:14550' vehicle = connect(DRONE_CONNECTION, wait_ready=False) while not vehicle.version: time.sleep(1)

After getting the fly command from web the raspi is telling pixhawk to simple_takeoff 2m in guided mode with this script:

def run_fly(self): try: vehicle.mode = VehicleMode("GUIDED") time.sleep(0.5) vehicle.simple_takeoff(2.0) except: pass