Skip to content

Commit

Permalink
Update instructions for new developments and new pymavlink repo
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker committed Oct 18, 2016
1 parent 77c55f5 commit 7d60fd0
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 47 deletions.
33 changes: 12 additions & 21 deletions examples/avoidance/README.md
Expand Up @@ -10,23 +10,25 @@ Please note that these instructions will significantly change your environment.
```
DRONEKIT_TOP=$HOME # e.g.
cd $DRONEKIT_TOP/dronekit-python
got remote add peterbarker ssh://git@github.com/peterbarker/dronekit-python.git
git remote add peterbarker ssh://git@github.com/peterbarker/dronekit-python.git
git fetch peterbarker
git checkout peterbarker/source-system-filtering
```

2. Run version of mavlink which contains source system filtering:
2. Run a version of pymavlink which contains source system filtering:

```
ARDUPILOT_HOME=$HOME/ardupilot # e.g.
cd $ARDUPILOT_HOME/modules/mavlink
git remote add peterbarker https://github.com/peterbarker/mavlink
git fetch --all peterbarker
git checkout peterbarker/mavsystem-object
cd $ARDUPILOT_HOME/modules/mavlink/pymavlink
git remote add peterbarker https://github.com/peterbarker/pymavlink
git fetch --all peterbarker
git checkout peterbarker/mavsource
python setup.py build install --user --force
```


Note that in the above shell code we are re-using a pymavlink
repository present in a buildable ArduPilot repository. You can
instead clone the pymavlink tree directly.

3. Run peterbarker's avoidance MAVProxy branch

Expand All @@ -39,18 +41,7 @@ Please note that these instructions will significantly change your environment.
python seutp.setup.py build install --user --force
```

4. Run the _multivehicle-wip_ branch of dronekit-sitl

This branch allows the user to specify a --defaults option to the SITL instance, allowing modern ArduPilots to run. It also adds diagnostic options.

```
DRONEKIT_TOP=$HOME # e.g.
git clone https://github.com/dronekit/dronekit-sitl
cd $DRONEKIT_TOP/dronekit-sitl
git checkout multivehicle-wip
```

5. Connect a GCS to port 3456
4. Connect a GCS to port 3456

This varies by GCS. With *MAVProxy* you might run this:
```
Expand All @@ -67,7 +58,7 @@ Please note that these instructions will significantly change your environment.
- Listening port 3456
```

6. Run the avoidance sample program:
5. Run the avoidance sample program:
```
DRONEKIT_TOP=$HOME # e.g.
ARDUPILOT_HOME=$HOME/ardupilot
Expand All @@ -76,7 +67,7 @@ Please note that these instructions will significantly change your environment.
python avoidance.py --binary $ARDUPILOT_HOME/build/sitl-debug/bin/arducopter-quad --resolution=PERPENDICULAR --defaults=$ARDUPILOT_HOME/Tools/autotest/copter_params.parm --extra-connection=udpout:localhost:3456
```
7. What you should see:
6. What you should see:
- two quadcopters should both enter guided mode
- both should rise to 5m
- one of the copters will start to head north
Expand Down
39 changes: 13 additions & 26 deletions examples/multivehicle/README.md
@@ -1,5 +1,7 @@
These are some (hopefully short-lived) intructions on how to get multiple vehicles running in dronekit-python. These instructions assume you are running under Linux, but with minimal modification should run on other operating systems.

Please note that these instructions will significantly change your environment. Unless you are quite familiar with how your build environment is put together you may wish to do this in a separate stand-alone environment.

1. Run peterbarker's _source-system-filtering branch_ of dronekit-python

Given that this README file exists within that branch, this should not be too much of a problem.
Expand All @@ -13,47 +15,32 @@ These are some (hopefully short-lived) intructions on how to get multiple vehicl
git checkout peterbarker/source-system-filtering
```

2. Run the _mavsystem-object_ branch of mavlink
2. Run the _mavsource_ branch of pymavlink

This branch introduces an object into pymavlink which filters messages to go to and come from a single system (e.g. your drone). Without this object, the abstractions in pymavlink do not allow manipulation of multiple vehicles suitable for dronekit-python.

To run this branch, one would typically "git clone" it, then install it locally with:

```
DRONEKIT_TOP=$HOME # e.g.
cd $DRONEKIT_TOP/mavlink
git remote add peterbarker ssh://git@github.com/peterbarker/dronekit-python.git
git fetch peterbarker
git checkout mavsystem-object
cd pymavlink
ARDUPILOT_HOME=$HOME/ardupilot # e.g.
cd $ARDUPILOT_HOME/modules/mavlink/pymavlink
git remote add peterbarker https://github.com/peterbarker/pymavlink
git fetch --all peterbarker
git checkout peterbarker/mavsource
python setup.py build install --user --force
```

You want to be comfortable doing this; if this is not how you typically use pymavlink then you may have trouble reverting to your normal configuration.
Note that in the above shell code we are re-using a pymavlink
repository present in a buildable ArduPilot repository. You can
instead clone the pymavlink tree directly.

3. Run the _peterbarker-multivehicle-wip_ branch of dronekit-sitl

This branch contains various changes:
- use an ArduPilot you compile yourself rather than a pre-canned one
- attach GDB to the ArduPilot instances
- more easily support more than one ArduPilot instance
- emit output from the ArduPilot instance

```
DRONEKIT_TOP=$HOME # e.g.
cd $DRONEKIT_TOP/dronekit-sitl
git checkout peterbarker-multivehicle-wip
```

4. Run the multivehicle sample program:
5. Run the multivehicle sample program:
```
DRONEKIT_TOP=$HOME # e.g.
export PYTHONPATH=$DRONEKIT_TOP/dronekit-python:$DRONEKIT_TOP/dronekit-sitl
cd $DRONEKIT_TOP/dronekit-python/examples/multivehicle
python multivehicle.py --simulation-count 3 --extra-connection udpout:localhost:9432
```

5. Connect a GCS to port 9432
6. Connect a GCS to port 9432

This varies by GCS. With *MAVProxy* you might run this:
```
Expand Down

0 comments on commit 7d60fd0

Please sign in to comment.