无法在M上使用Dronekit+APM Planner进行SITL仿真

2024-04-29 16:33:57 发布

您现在位置:Python中文网/ 问答频道 /正文

我想在Mac上用Dronekit+MissionPlanner进行SITL模拟,并尝试跟随this page和{a2}。 但我做不到。在

我所做的程序如下所示。在

$ 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时出现以下错误

^{pr2}$

马科斯高地

APM计划器v2.0.25

droneapi 1.5.0
无人机套件2.9.1
无人机套件sitl 3.2.0
未来0.15.2
小于lx2.ml MAVProxy 1.6.7
单调1.2
pip 18.0
协议3.6.1
第5.4.7条
pymavlink 2.2.14
pyparsing 2.2.2
pyserial 3.4
请求2.5.1
setuptools 39.0.1
六1.11.0


Tags: installinpylinetimeoutsimplefileheartbeat