我想在 Mac 上使用 Dronekit + MissionPlanner 进行 SITL 模拟,并尝试关注此页面和此视频。但我不能那样做。
我做的程序如下。
$ 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 规划器 v2.0.25
无人机api 1.5.0
无人机套件 2.9.1
无人机套件-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