1

I have installed dronekit and dronekit sitl and created the hello.py example and I get the following eror I am a novice so sorry if its obvious. This is the output I am running on a raspberry 3 under debian with python 2.7 . Here is the code

print "Start simulator (SITL)"
import dronekit_sitl
sitl = dronekit_sitl.start_default()
connection_string = sitl.connection_string()

# Import DroneKit-Python
from dronekit import connect, VehicleMode

# Connect to the Vehicle.
print("Connecting to vehicle on: %s" % (connection_string,))
vehicle = connect(connection_string, wait_ready=True)

# Get some vehicle attributes (state)
print "Get some vehicle attribute values:"
print " GPS: %s" % vehicle.gps_0
print " Battery: %s" % vehicle.battery
print " Last Heartbeat: %s" % vehicle.last_heartbeat
print " Is Armable?: %s" % vehicle.is_armable
print " System status: %s" % vehicle.system_status.state
print " Mode: %s" % vehicle.mode.name    # settable

# Close vehicle object before exiting script
vehicle.close()

# Shut down simulator
sitl.stop()
print("Completed")

And here is the output I get:


python hellp.py
Start simulator (SITL)
Starting copter simulator (SITL)
SITL already Downloaded and Extracted.
Ready to boot.
Traceback (most recent call last):
  File "hellp.py", line 3, in <module>
    sitl = dronekit_sitl.start_default()
  File "/home/gus/.local/lib/python2.7/site-packages/dronekit_sitl/__init__.py", line 341, in start_default
    sitl.launch(sitl_args, await_ready=True, restart=True)
  File "/home/gus/.local/lib/python2.7/site-packages/dronekit_sitl/__init__.py", line 271, in launch
    p = Popen([self.path] + args, cwd=wd, shell=sys.platform == 'win32', stdout=PIPE, stderr=PIPE)
  File "/usr/lib/python2.7/subprocess.py", line 390, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1024, in _execute_child
    raise child_exception
OSError: [Errno 8] Exec format error

Thanks so much in advance for any help

Gusisin
  • 41
  • 4

1 Answers1

0

As you are running SITL on ARM, this might be the issue. You might have installed packages directly by apt-get. You can try to build the SITL on the pi itself and try run after that.

Shankar Ganesh Jayaraman
  • 1,401
  • 1
  • 16
  • 22