1) Download and install
APM Planner 2 for Windows.
2) Download and install
Python 2.7 for Windows. Make sure the following options are set.
- Install for all users
- Destination directory: C:\Python2.7
- Add python.exe to Path
3) Open a command prompt (cmd.exe) to test if the installation was successful.
- >python -V
4) Install virtualenv
- >pip install virtualenv
5) Create and activate the dronekit virtual environment.
- >md SRG-Bots
- >cd SRG-Bots
- >virtualenv dronekit_env
- >dronekit_env\Scripts\activate.bat
6) Install the required packages. This may take a while.
- >pip install dronekit dronekit-sitl mavproxy wget
7) At this point the required packages have been installed. Start dronekit-sitl.
- >dronekit_env\Scripts\dronekit-sitl.exe copter-3.3
8) Open a new command prompt then run mavproxy.
- >cd SRG-Bots
- >dronekit_env\Scripts\activate.bat
- >python dronekit_env\Scripts\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
9) Run APM Planner 2.
10) Open a new command prompt. Download and run an example.
- >cd SRG-Bots
- >dronekit_env\Scripts\activate.bat
- >python
- >>>import wget
- >>>wget.download('https://github.com/dronekit/dronekit-python/raw/master/examples/simple_goto/simple_goto.py')
- >>>quit()
- >python simple_goto.py --connect "udp:127.0.0.1:14551"
In the 7th step the command should use Scripts instead of Script
ReplyDelete>dronekit_env\Scripts\dronekit-sitl.exe copter-3.3