Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/about/license.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Open Source Licence
=======================

DroneKit-Python is licensed under the *Apache License Version 2.0, January 2004 (http://www.apache.org/licenses/). This is present in the `LICENSE <https://github.com/dronekit/dronekit-python/blob/master/LICENSE>`_ file in the source tree, and reproduced below:
DroneKit-Python is licensed under the *Apache License Version 2.0, January 2004* (http://www.apache.org/licenses/). This is present in the `LICENSE <https://github.com/dronekit/dronekit-python/blob/master/LICENSE>`_ file in the source tree, and reproduced below:

.. include:: ../../LICENSE
:literal:
2 changes: 1 addition & 1 deletion docs/about/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Open source community
DroneKit-Python is an open source and community-driven project.

You can find all the source code on `Github here <https://github.com/dronekit/dronekit-python>`_ and check out our permissive :doc:`Apache v2 Licence <license>`.
If you want to join the community, then see our :doc:`contributing section <contributing>` for lots of ideas on how you can help.
If you want to join the community, then see our :doc:`contributing section <../contributing/index>` for lots of ideas on how you can help.


Compatibility
Expand Down
52 changes: 2 additions & 50 deletions docs/contributing/developer_setup_windows.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,60 +6,12 @@ Building DroneKit-Python on Windows

This article shows how to set up an environment for *developing* DroneKit-Python on Windows.

.. tip::

If you just want to *use* DroneKit-Python on Windows then easiest way to get started is to use the
:ref:`Windows Installer <_get_started_install_dk_windows>`. The installer is rebuilt with every patch
release, so you can always be up to date with the latest features and bug fixes.


Install DroneKit using WinPython command line
=============================================

First set up a command line DroneKit-Python installation using *WinPython*. This Python distribution already includes most of the needed dependencies (though you will need remove *python-dateutil* as the installation comes bundled with a version that does not work with *DroneKit*).

The steps to install this package and the most important add-on modules are:

#. Download and run the correct `WinPython installer <http://sourceforge.net/projects/winpython/files/WinPython_2.7/2.7.6.4/>`_ (**v2.7**) for your platform (win32 vs win64).

* Run the installer as an administrator (**Right-click** on file, select **Run as Administrator**).
* When prompted for the destination location, specify **C:\Program Files (x86)**
(the default location is under the **Downloads** folder).

#. Register the Python that came from *WinPython* as the preferred interpreter for your machine:

Open the folder where you installed WinPython, run *WinPython Control Panel* and choose **Advanced/Register Distribution**.

.. image:: http://dev.ardupilot.com/wp-content/uploads/sites/6/2014/03/Screenshot-from-2014-09-03-083816.png

#. Install DroneKit-Python and its remaining dependencies (including `MAVProxy <http://tridge.github.io/MAVProxy/>`_) from the public PyPi repository:

Open the *WinPython Command Prompt* and run the following two commands:

.. code:: bash

pip uninstall python-dateutil
pip install dronekit

The dependencies above are all that are required to build DroneKit-Python and the *MAVProxy command line* (i.e. the minimum needed for testing).
If you also want the *MAVProxy console* and map install:

#. OpenCV

* `Download and install OpenCV version 2.4 for Windows <http://opencv.org/downloads.html>`_ (this can be extracted anywhere)
* Copy/paste the file :file:`cv2.pyd` from :file:`OpenCV\\build\\python\\2.7\\x64\\` to :file:`site_packages`
on your Python installation (e.g. :file:`\\python-2.7.6.amd64\\Lib\\site-packages`).
#. WxPython

* `Download and install WxPython <http://www.wxpython.org/download.php>`_. Make sure the target
path is your WinPython installation.
#. Console

* Open the WinPython command prompt and enter:

.. code:: bash

pip install console
First set up a command line DroneKit-Python installation using *WinPython*. This process is the same as described in :ref:`Getting Started <get_started_install_dk_windows>`.



Expand All @@ -78,7 +30,7 @@ Fetch and build DroneKit source
python setup.py install



Updating DroneKit
=================

Expand Down
54 changes: 19 additions & 35 deletions docs/examples/running_examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
Running the Examples
====================

General instructions for running the example source code are given below (more explicit instructions may be
provided in the documentation for each example):
General instructions for running the `example source code <https://github.com/dronekit/dronekit-python/tree/master/examples>`_ are given below.

.. tip::

More explicit instructions may be provided within the documentation for each example, and on the command line using the ``-h`` (help) parameter.

#. Get the DroneKit-Python example source code onto your local machine. The easiest way to do this
is to clone the **dronekit-python** repository from Github. On the command prompt enter:
Expand All @@ -14,49 +17,30 @@ provided in the documentation for each example):

git clone https://github.com/dronekit/dronekit-python.git

.. tip::

The :ref:`Windows Installation <get_started_install_dk_windows>` copies the example code here:
:file:`C:\\Program Files (x86)\\MAVProxy\\examples\\`.

#. Start MAVProxy and :ref:`connect to the vehicle <starting-mavproxy>`. For example:

* To connect to a simulated vehicle when starting *MAVProxy* (from the command line):

.. code-block:: bash

mavproxy.py --master=127.0.0.1:14550

* To connect to a simulated vehicle after starting MAVProxy (for example, on Windows):

.. code-block:: bash

link add 127.0.0.1:14550

#. You should already have set up *MAVProxy* to :ref:`load DroneKit automatically <loading-dronekit>`.
If not, manually load the library using:

#. Navigate to the example you wish to run (or specify the full path in the next step). The examples are all stored in
subdirectories of **dronekit-python\\examples\\**.

To run the :ref:`vehicle_state <example-vehicle-state>` example, you would navigate as shown:

.. code-block:: bash

module load dronekit.module.api

#. Once the *MAVProxy* console is running, start the example by entering:
cd dronekit-python\examples\vehicle_state\

.. code-block:: bash

api start absolute_path_to_example/example_name.py

.. tip::
#. Start the example, passing the :ref:`connection string <get_started_connect_string>` you wish to use in the ``--connect`` parameter:

If you start *MAVProxy* from the same directory as the target script you can omit
the full file path:
.. code-block:: bash

.. code-block:: bash
python vehicle_state.py --connect 127.0.0.1:14550

api start example_name.py

.. note::

The examples all use the ``--connect`` parameter to pass the :ref:`connection string <get_started_connect_string>` into the script.
The command above would be used to connect to :ref:`SITL <sitl_setup>` running on the local machine via UDP port 14550.


.. warning::

Propellers should be removed before testing examples indoors (on real vehicles).

Loading