Skip to content

Commit

Permalink
readme mavlink#409: merge mavlink and mavros installation instruction
Browse files Browse the repository at this point in the history
  • Loading branch information
vooon committed Nov 3, 2015
1 parent 099ce24 commit 18b740b
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 43 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ mavros package
--------------

It is the main package, please see it's [README][mrrm].
Here you may read [installation instructions][inst].


mavros\_extras package
Expand Down Expand Up @@ -68,3 +69,4 @@ CI Statuses
[exrm]: https://github.com/mavlink/mavros/blob/master/mavros_extras/README.md
[libmc]: https://github.com/mavlink/mavros/blob/master/libmavconn/README.md
[test]: https://github.com/mavlink/mavros/blob/master/test_mavros/README.md
[inst]: https://github.com/mavlink/mavros/blob/master/mavros/README.md#installation
67 changes: 24 additions & 43 deletions mavros/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,31 +119,37 @@ Just use `apt-get` for installation:

### Source installation

Use `wstool` utility for installation and catkin tool for build.
Use `wstool` utility for retriving sources and `catkin` tool for build.

sudo apt-get install python-catkin-tools
```sh
sudo apt-get install python-catkin-tools

# unneded if you already has workspace
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws
catkin init
# 1. unneded if you already has workspace
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws
catkin init
wstool init src

# get source (upstream - released)
rosinstall_generator --upstream mavros | tee /tmp/mavros.rosinstall
# alternative: latest source
rosinstall_generator --upstream-development mavros | tee /tmp/mavros.rosinstall
# 2. get source (upstream - released)
rosinstall_generator --upstream mavros | tee /tmp/mavros.rosinstall
# alternative: latest source
rosinstall_generator --upstream-development mavros | tee /tmp/mavros.rosinstall

# workspace & deps
wstool merge -t src /tmp/mavros.rosinstall
wstool update -t src
rosdep install --from-paths src --ignore-src --rosdistro indigo -y
# 3. latest released mavlink package
# you may run from this line to update ros-*-mavlink package
rosinstall_generator mavlink | tee -a /tmp/mavros.rosinstall

# finally - build
catkin build
# 4. workspace & deps
wstool merge -t src /tmp/mavros.rosinstall
wstool update -t src
rosdep install --from-paths src --ignore-src --rosdistro indigo -y

# 5. finally - build
catkin build
```

*Build error*. if you has error with missing `mavlink_*_t` or `MAVLINK_MSGID_*` then you need fresh mavlink package.
You may update from [ros-shadow-fixed][shadow] or build it from source (see [next section](#installing-ros--mavlink-from-source)).
*Build error*. if you has error with missing `mavlink_*_t` or `MAVLINK_MSG_ID_*` then you need fresh mavlink package.
You may update from [ros-shadow-fixed][shadow] (binary installation) or redo script from step 3.

*Important*. The current implementation of mavlink does not allow to select dialect in run-time,
so mavros package (and all plugin packages) have compile-time option `MAVLINK_DIALECT`, default is 'aurdupilotmega'.
Expand All @@ -153,31 +159,6 @@ If you want change dialect change workspace config:
catkin config --cmake-args -DMAVLINK_DIALECT=pixhawk


### Installing ros-\*-mavlink from source

In ROS Jade there new tool named `catkin`. It is more powerful and more comfortable that `catkin_make`.
With that tool you may place mavlink package in your mavros workspace.

cd ~/catkin_ws/src # your mavros workspace
rosinstall_generator mavlink | tee /tmp/mavlink.rosinstall
wstool merge /tmp/mavlink.rosinstall
wstool up -j4
catkin clean --all
catkin build # also will build mavros


### Building ros-\*-mavlink debian package

You could build debian package by pulling right bloom branch from [mavlink-gbp-release][mlgbp]
(common naming: `debian/<rosdistro>/<osdistro>/<package>`) using `dh binary`.

cd /tmp
git clone https://github.com/mavlink/mavlink-gbp-release.git -b debian/indigo/trusty/mavlink
cd mavlink-gbp-release
fakeroot dh binary
# deb will be in /tmp


Contributing
------------

Expand Down

0 comments on commit 18b740b

Please sign in to comment.