Some problem with sitl and dorne


#1

hi i try to run sitl with console and map
i use jetson nano with ubuntu 18.4, when i run the sim i didnt see the console and the map
i got this error : SRTM Downlowad faild /SRTM/Australia/s36e149.hgt.zip on server firmware.ardupilot.org

did some one had this problem ??|

another question - i seccsed use python to arm a real drone but i didnt sucseed to gave him command claimb
i think the command is good - take it from dorne kit and chat gpt but the drone didnt claimb…
thanks alot


#2

Hard to say. Perhaps post your code to look at.


#3

this is 2 diffrent problem…

  1. the sitl problem - try to find someone else at this fourom that have the same problem but he didnt explain how he fix it

  2. the real drone problem…

this is the python code:

from dronekit import connect, VehicleMode
import time

# Connect to the drone
#connection_string= “tcp:127.0.0.1:5760”
connection_string = “/dev/ttyTHS1”
baud_rate = 57600 # Corrected baud rate
vehicle = connect(connection_string, baud=baud_rate, wait_ready=True)

def check_armable_and_arm():
print(“Connecting to the vehicle…”)
while not vehicle.is_armable:
print(“Waiting for GPS and armability…”)
time.sleep(1)

print(“Vehicle is armable”)

# Arming the vehicle
print(“Arming the vehicle…”)
vehicle.armed = True
while not vehicle.armed:
print(“Waiting for the vehicle to arm…”)
time.sleep(1)

print(“Vehicle is armed”)

def print_location_info():
# Print current location latitude, longitude, and altitude
current_location = vehicle.location.global_relative_frame
print(
“Current Location: Lat=%s, Lon=%s, Alt=%s” % (current_location.lat, current_location.lon, current_location.alt))

# Print home location latitude, longitude, and altitude
home_location = vehicle.home_location
print(“Home Location: Lat=%s, Lon=%s, Alt=%s” % (home_location.lat, home_location.lon, home_location.alt))

def arm_and_takeoff(target_altitude):
print_location_info()

print(“Taking off to %s meters…” % target_altitude)
vehicle.simple_takeoff(target_altitude)

while True:
if vehicle.location.global_relative_frame.alt >= target_altitude * 0.95:
print(“Reached target altitude of %s meters” % target_altitude)
break
time.sleep(1)

def main():
check_armable_and_arm()

target_altitude = 3 # Desired target altitude in meters
arm_and_takeoff(target_altitude)

# The rest of your code here
# … other code …

if name == “main”:
main()