Unable to do SITL simulation with Dronekit + APM Planner on Mac

979 views Asked by At

I want to do SITL simulation with Dronekit + MissionPlanner on Mac, and tried to follow this page and this video. But I couldn't do that.

The procedures I did are listed below.

$ pip2 install dronekit
$ pip2 install dronekit-sitl
$ pip2 install MAVProxy
launch APM Planner2.0
$ dronekit-sitl copter --home=-35.363261,149.165230,584,353
$ mavproxy.py --master tcp:127.0.0.1:5760 --sitl 127.0.0.1:5501 --out 127.0.0.1:14550 --out 127.0.0.1:14551
$ python2 ~/dronekit-python/examples/simple_goto/simple_goto.py

And then unable to link

Starting copter simulator (SITL)
SITL already Downloaded and Extracted.
Ready to boot.
Connecting to vehicle on: tcp:127.0.0.1:5760

>>> Link timeout, no heartbeat in last 5 seconds
>>> No heartbeat in 30 seconds, aborting.
Traceback (most recent call last):
  File "drone/dronekit-python/examples/simple_goto/simple_goto.py", line 38, in <module>
    vehicle = connect(connection_string, wait_ready=True)
  File "/Users/ysnishi/.pyenv/versions/2.7.15/lib/python2.7/site-
packages/dronekit/__init__.py", line 2845, in connect
    vehicle.initialize(rate=rate, heartbeat_timeout=heartbeat_timeout)
  File "/Users/ysnishi/.pyenv/versions/2.7.15/lib/python2.7/site-
packages/dronekit/__init__.py", line 2117, in initialize
    raise APIException('Timeout in initializing connection.')
dronekit.APIException: Timeout in initializing connection. 

How could I solve this? Do you mind if giving me some advices?

Cause (?)

I have an error below in installing MAVProxy and dronekit

dronekit 2.9.1 has requirement pymavlink==2.0.6, but you'll have pymavlink 2.2.14 which is incompatible.

Note

macOS High Sierra 10.13.6

APM Planner v2.0.25

droneapi 1.5.0
dronekit 2.9.1
dronekit-sitl 3.2.0
future 0.15.2
lxml 4.2.5
MAVProxy 1.6.7
monotonic 1.2
pip 18.0
protobuf 3.6.1
psutil 5.4.7
pymavlink 2.2.14
pyparsing 2.2.2
pyserial 3.4
requests 2.5.1
setuptools 39.0.1
six 1.11.0

0

There are 0 answers