You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am facing an issue in my Python script using the DroneKit library, specifically with changing the VehicleMode to "GUIDED." The script seems to be stuck in the "STABILIZE" mode, and despite setting the mode to "GUIDED," it does not take effect.
# ... (existing code)defarm_and_takeoff(altitude):
whilenotvehicle.is_armable:
print("waiting to be armable")
time.sleep(1)
print("Arming motors")
vehicle.mode=VehicleMode("GUIDED")
print(vehicle.mode) # This prints "VehicleMode:STABILIZE" instead of "VehicleMode:GUIDED"vehicle.armed=Truewhilenotvehicle.armed:
time.sleep(1)
print("Taking Off")
vehicle.simple_takeoff(altitude)
whileTrue:
v_alt=vehicle.location.global_relative_frame.altprint(">> Altitude = %.1f m"%v_alt)
ifv_alt>=altitude-1.0:
print("Target altitude reached")
breaktime.sleep(1)
# ... (rest of the code)
output:
CRITICAL:autopilot:APM:Copter V3.3 (d6053245)
CRITICAL:autopilot:Frame: QUAD
CRITICAL:autopilot:Calibrating barometer
CRITICAL:autopilot:Initialising APM...
CRITICAL:autopilot:barometer calibration complete
CRITICAL:autopilot:GROUND START
waiting to be armable
waiting to be armable
waiting to be armable
waiting to be armable
waiting to be armable
Arming motors
VehicleMode:STABILIZE <----
ERROR:autopilot:ARMING MOTORS
CRITICAL:autopilot:GROUND START
WARNING:dronekit:Link timeout, no heartbeat in last 5 seconds
CRITICAL:autopilot:Initialising APM...
Taking Off
>> Altitude = 0.0 m
>> Altitude = 0.0 m
>> Altitude = 0.0 m
>> Altitude = 0.0 m
>> Altitude = 0.0 m
>> Altitude = 0.0 m
>> Altitude = 0.0 m
>> Altitude = 0.0 m
>> Altitude = 0.0 m
ERROR:autopilot:DISARMING MOTORS
>> Altitude = 0.0 m
>> Altitude = 0.0 m
>> Altitude = 0.0 m
>> Altitude = 0.0 m
>> Altitude = 0.0 m
>> Altitude = 0.0 m
>> Altitude = 0.0 m
>> Altitude = 0.0 m
>> Altitude = 0.0 m
>> Altitude = 0.0 m
>> Altitude = 0.0 m
>> Altitude = 0.0 m
I am facing an issue in my Python script using the DroneKit library, specifically with changing the VehicleMode to "GUIDED." The script seems to be stuck in the "STABILIZE" mode, and despite setting the mode to "GUIDED," it does not take effect.
output:
conda env:
The text was updated successfully, but these errors were encountered: