我想在Mac上使用Dronekit + MissionPlanner进行SITL仿真,并尝试遵循this page和this video。 但是我做不到。
我列出的步骤如下。
$ pip2 install dronekit
$ pip2 install dronekit-sitl
$ pip2 install MAVProxy
启动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
然后无法链接
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.
我该如何解决?您介意给我一些建议吗?
下面在安装MAVProxy和dronekit时出现错误
dronekit 2.9.1 has requirement pymavlink==2.0.6, but you'll have pymavlink 2.2.14 which is incompatible.
macOS High Sierra 10.13.6
APM Planner v2.0.25
droneapi 1.5.0
dronekit 2.9.1
dronekit-sitl 3.2.0
未来0.15.2
lxml 4.2.5
MAVProxy 1.6.7
单调的1.2
pip 18.0
protobuf 3.6.1
psutil 5.4.7
pymavlink 2.2.14
pyparsing 2.2.2
pyserial 3.4
要求2.5.1
setuptools 39.0.1
六个1.11.0