Starling 2 Max Drone drifting off
-
Hi Team,
I am using Starling 2 max, and I was trying to fly the drone in manual mode using the remote controller to do initial basic checks before using Mavsdk to fly the drone.
When I try to fly the drone, it drifts toward the left instead of vertical take-off.
I tried to run
systemctl stop voxl-px4
./voxl-esc-spin.py --id 255 --power 60 --ramp-time 3.0 --timeout 4.0 --enable-plot 1 without having any propellers and screws to check if there is any rpm difference in the motors the below are the results
I am unsure if the deviation of 264.00 rpm is causing this issue.
please find the attached px4 logs -> https://review.px4.io/plot_app?log=23827d44-827c-4f54-897c-b0ccac53c96a
Can you please help me with this issue?
-
@vamsi manual mode will have drift, are you sure there is really an issue? Manual mode has no position control
-
@Moderator Thank you for the response; I was going through the https://www.youtube.com/watch?v=Cpbbye3Z6co in that the drone does not have any drift in the manual mode, so I thought I might have missed any configuration changes.
When I changed my mode to "indoor_vio_missing_gps.params" and when I controlled it with the Remote Controller, I was able to fly it in the position mode, and when I changed it to Off-board mode on RC, it did the figure 8.
The Drone still drifts off when I run the below code in the Position mode
#!/usr/bin/env python3
"""
Caveat when attempting to run the examples in non-gps environments:drone.offboard.stop()
will return aCOMMAND_DENIED
result because it
requires a mode switch to HOLD, something that is currently not supported in a
non-gps environment.
"""import asyncio
from mavsdk import System
from mavsdk.offboard import (OffboardError, PositionNedYaw)async def run():
""" Does Offboard control using position NED coordinates. """drone = System() print("Connecting to vehicle using port 14550") await drone.connect(system_address="udp://:14550") print("Waiting for drone to connect...") async for state in drone.core.connection_state(): if state.is_connected: print(f"-- Connected to drone!") break print("-- Arming") await drone.action.arm() max_speed = await drone.action.get_maximum_speed() print(f"Maximum speed: {max_speed} m/s") await drone.action.set_maximum_speed(0.5) await asyncio.sleep(4) max_speed = await drone.action.get_maximum_speed() await asyncio.sleep(5) print("-- Setting initial setpoint") await drone.offboard.set_position_ned(PositionNedYaw(0.0, 0.0, 0.0, 0.0)) print("-- Starting offboard") try: await drone.offboard.start() except OffboardError as error: print(f"Starting offboard mode failed \ with error code: {error._result.result}") print("-- Disarming") await drone.action.disarm() return await asyncio.sleep(5) print("-- Go 0m North, 0m East, -0.20m Down \ within local coordinate system") await drone.offboard.set_position_ned( PositionNedYaw(0.0, 0.0, -0.20, 0.0)) await asyncio.sleep(3) #print("-- Go 0m North, 0m East, 0m Down within local coordinate system") #await drone.offboard.set_position_ned(PositionNedYaw(0.0, 0.0, 0.0, 0.0) #await asyncio.sleep(5) print("Trying to land") try: await drone.action.land() except: print("Failed to land") print("-- Disarming") try: await drone.action.disarm() except: print("Disarming failed")
if name == "main":
# Run the asyncio loop
asyncio.run(run())I ran the above code and after taking off the drone again drifted off
here are the attached videos
Questions:
- Is there a configuration or calibration step I may have missed to prevent drifting?
- Does the script require any additional commands for better stability ?
- Could this be related to parameter tuning or sensor limitations in a non-GPS environment?
Thank you for your assistance!
-
@vamsi So it works fine in position mode and offboard (figure 8 mode)? And in manual mode how bad is the drift? Are you able to fly it but just notice it drifting to one side or is it completely unflyable? Is it really just the mavsdk program you are trying to get working now? One thing to be careful of is having voxl-vision-hub sending offboard commands for the figure 8 at the same time that you are sending offboard commands from your mavsdk program.
-
Hi @Eric-Katzfey, Thank you for your response and for pointing out potential issues.
-
Yes, when I fly with the RC in Position mode and Offboard mode, it works fine.
-
In Manual mode, the drone is completely unflyable. When I try to take off, it drifts aggressively to one side. The logs attached in my initial comment were recorded during an attempt to take off from the ground.
-
Yes, the MAVSDK program I mentioned was the only one I was running at the time.
-
Oh, is there a way to disable the Offboard figure-8 commands from voxl-vision-hub? (Edit: do I need to update "/etc/modalai/voxl-vision-hub.conf" and set "offboard_mode": "off"? Is this enough to turn off the figure 8 mode?)
Thank you for your support!
-
-
@vamsi Yes, you should change offboard_mode to off if you have another source of offboard commands. Regarding manual mode, can you fly in altitude hold mode? Can you go through the level horizon calibration, accel, compass, gyro, and RC calibration processes again and see if that helps the drift problem at all?
-
Thank you for your response.
For Manual mode, I recalibrated the level horizon, accel, compass, and gyro. However, during the RC calibration, I noticed a small shift in the yaw when all the sticks are in their neutral positions. I’m unsure if this is contributing to the issue. I attempted to recalibrate it several times, but the yaw does not reset to the 0 position. Please find the attached screenshot for your reference:
.As you suggested, I tried flying in Altitude Hold mode, and the drone drifted in the direction where the yaw was shifted.
Is there a way to fix the yaw offset?