2017-11-04 1 views
0

私はこのページの指示に続く:私はその後クイックスタートページでhello.pyプログラムを実行するには、dronekitとdronekit以外のものはインストールする必要がありますか?

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" % ('tcp:127.0.0.1:5760',)) 
vehicle = connect('tcp:127.0.0.1:5760', 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") 

:その後、私はそれでこのでのpythonファイルを作成し

pip install dronekit 

pip install dronekit-sitl 

を:私は何をやったか
http://python.dronekit.io/guide/quick_start.html

をそれを実行した、これは私が端末で得たエラーです:

olin30259168:Desktop physics$ python hello.py 
Start simulator (SITL) 
Starting copter simulator (SITL) 
SITL already Downloaded and Extracted. 
Ready to boot. 
Connecting to vehicle on: tcp:127.0.0.1:5760 
>>> APM:Copter V3.3 (d6053245) 
>>> Frame: QUAD 
>>> Calibrating barometer 
Traceback (most recent call last): 
    File "hello.py", line 12, in <module> 
    vehicle = connect('tcp:127.0.0.1:5760', wait_ready=True) 
    File "/Users/physics/anaconda/lib/python3.6/site-packages/dronekit/__init__.py", line 2849, in connect 
    vehicle.wait_ready(True) 
    File "/Users/physics/anaconda/lib/python3.6/site-packages/dronekit/__init__.py", line 2199, in wait_ready 
    timeout) 
dronekit.APIException: wait_ready experienced a timeout after 30 seconds. 
olin30259168:Desktop physics$ 

私は何を取得しなければならないことです:私はこのディレクトリからクローン化された例を実行したときに

Start simulator (SITL) 
Downloading SITL from http://dronekit-assets.s3.amazonaws.com/sitl/copter/sitl-win-copter-3.3.tar.gz 
Extracted. 
Connecting to vehicle on: 'tcp:127.0.0.1:5760' 
>>> APM:Copter V3.3 (d6053245) 
>>> Frame: QUAD 
>>> Calibrating barometer 
>>> Initialising APM... 
>>> barometer calibration complete 
>>> GROUND START 
Get some vehicle attribute values: 
GPS: GPSInfo:fix=3,num_sat=10 
Battery: Battery:voltage=12.587,current=0.0,level=100 
Last Heartbeat: 0.713999986649 
Is Armable?: False 
System status: STANDBY 
Mode: STABILIZE 
Completed 

接続するようだが、それがタイムアウトするバロメーターを校正しようとしているが、私は同じ問題に実行します。

https://github.com/dronekit/dronekit-python/tree/master/examples

答えて

0

は、これは、同じ問題は、単にコンピュータをresart与え、それを4倍の最大値を再実行して、私に知らせた場合、私は、窓10にインストールするものです。

1)

2はPython 2.7をインストールするには)https://pip.pypa.io/en/stable/installing/ に移動します。 get-pip.py をクリックします。デスクトップに保存します c。一度ダウンロードしてダブルクリックします。

3)コマンドプロンプト に移動します。 C:\ Users \ oscar4423> と表示されている場合i。 cd C:\ Python27 \ Scripts と入力します。ステップIが完了したら、C:\ Python27 \ Scripts> pip のように入力します。c。今ピップリクエストをインストールタイプ:C:\ Python27 \スクリプト>ピップは、コマンドプロンプト

5)https://git-scm.com/downloadsに移動した後、「Windows用のダウンロード」をクリックし

6)を要求 をインストール閉じます)をインストール 7をgitの)コマンドプロンプトと入力します。cd Cを開きます:\ Python27 \スクリプト

8)ピップインストール・タイプのgit + https://github.com/3drobotics/solo-cli C:\ Python27 \スクリプト> PIPインストールのgit + https://github.com/3drobotics/solo-cli

9)ここで、次のピップは、virtualenvの 10をインストールします)ピップこのようなコマンドプロンプトでdronekitをインストールタイプ: C:\ Python27 \スクリプト>ピップdronekitに

11をインストールする)PIPにdronekit-sitlインストールタイプこのようなコマンドプロンプト: C:\ Python27 \スクリプト>ピップはdronekit-sitl )pyparsing numpyのインストールPIP

13)をインストールするPIP MAVProxy

インストール
関連する問題