Skip to content

Commit

Permalink
Update cmake version info & readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
lovettchris committed Feb 16, 2017
1 parent 0875ec3 commit 592a403
Show file tree
Hide file tree
Showing 16 changed files with 96 additions and 44 deletions.
57 changes: 29 additions & 28 deletions MavLinkCom/Design/Design.dgml

Large diffs are not rendered by default.

Binary file added MavLinkCom/Design/images/example1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added MavLinkCom/Design/images/example2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added MavLinkCom/Design/images/example3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added MavLinkCom/Design/images/example4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added MavLinkCom/Design/images/overview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 25 additions & 3 deletions MavLinkCom/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@

MavLinkCom is a cross-platform C++ library that helps connect to and communicate with [MavLink](https://github.com/mavlink/mavlink) based vehicles.
Specifically this library is designed to work well with [PX4](https://github.com/PX4/Firmware) based drones.
To build the library you need Boost. See [Installing Boost](Readme.md) below details on installing Boost.
To build the library you need Boost. See [Installing Boost](README.md) below details on installing Boost.

## Design

You can view the [Design.dgml](Design.dgml) diagram in Visual Studio. The following are the most important classes in this library.
You can view and edit the [Design.dgml](Design/Design.dgml) diagram in Visual Studio.
![Overview](design/images/overview.png)

The following are the most important classes in this library.

### MavLinkNode

Expand Down Expand Up @@ -47,7 +50,7 @@ same connection. MavLinkVehicle uses this to track various messages that define

MavLinkVehicle is a MavLinkNode that tracks various messages that define the overall vehicle state and provides a VehicleState struct
containing a snapshot of that state, including home position, current orientation, local position, global position, and so on.
This class also provides a bunch of helper methods that wrap commonly used commands providing simle method calls to do things like
This class also provides a bunch of helper methods that wrap commonly used commands providing simple method calls to do things like
arm, disarm, takeoff, land, go to a local coordinate, and fly under offbaord control either by position or velocity control.

### MavLinkTcpServer
Expand Down Expand Up @@ -196,7 +199,26 @@ are connecting your PC or laptop to the drone over USB.

MavLinkVehicle actually has a helper method for this called allowFlightControlOverUsb, so now you know how it is implemented :-)

## Advanced Connections

You can wire up different configurations of mavlink pipelines using the MavLinkConnection class "join" method as shown below.

Example 1, we connect to PX4 over serial, and proxy those messages through to QGroundControl and the LogViewer who are listening on remote ports.

![Serial to QGC](design/images/example1.png)

Example 2: simulation can talk to jMavSim and jMavSim connects to PX4. jMavSim can also manage multiple connections, so it can talk to unreal simulator.
Another MavLinkConnection can be joined to proxy connections that jMavSim doesn't support, like the LogViewer or a remote camera node.

![Serial to QGC](design/images/example2.png)

Example 3: we use MavLinkConnection to connect to PX4 over serial, then join additional connections for all our remote nodes including jMavSim.

![Serial to QGC](design/images/example3.png)

Example 4: We can also do distributed systems to control the drone remotely:

![Serial to QGC](design/images/example4.png)

### Installing Boost

Expand Down
2 changes: 1 addition & 1 deletion cmake/AirLib/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.3)
cmake_minimum_required(VERSION 3.3.2)
project(AirLib)

LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/../cmake-modules")
Expand Down
2 changes: 1 addition & 1 deletion cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.3)
cmake_minimum_required(VERSION 3.3.2)
project(AirSim)

add_subdirectory("AirLib")
Expand Down
2 changes: 1 addition & 1 deletion cmake/DroneServer/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.3)
cmake_minimum_required(VERSION 3.3.2)
project(DroneServer)

LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/../cmake-modules")
Expand Down
2 changes: 1 addition & 1 deletion cmake/DroneShell/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.3)
cmake_minimum_required(VERSION 3.3.2)
project(DroneShell)

LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/../cmake-modules")
Expand Down
2 changes: 1 addition & 1 deletion cmake/HelloDrone/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.3)
cmake_minimum_required(VERSION 3.3.2)
project(HelloDrone)

LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/../cmake-modules")
Expand Down
2 changes: 1 addition & 1 deletion cmake/MavLinkCom/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.3)
cmake_minimum_required(VERSION 3.3.2)
project(MavLinkCom)

add_subdirectory("MavLinkTest")
Expand Down
2 changes: 1 addition & 1 deletion cmake/MavLinkCom/MavLinkTest/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.3)
cmake_minimum_required(VERSION 3.3.2)
project(MavLinkTest)

LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/../../cmake-modules")
Expand Down
38 changes: 33 additions & 5 deletions cmake/readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#Windows
# CMAKE

You need at least cmake version 3.4.

## Windows

On Windows run this command to build debug bits:

Expand All @@ -10,9 +14,33 @@ To build release bits delete CMakeCache.txt and run this:
cmake -G "Visual Studio 14 2015 Win64" -D CMAKE_BUILD_TYPE=Release CMakeLists.txt
msbuild /p:Platform=x64 /p:Configuration=Release AirSim.sln

#Linux
On Linux you first need a version of GCC that supports `-std=c++14`. Version 4.9 or newer should work. Then run this:
## Linux

If you don't cmake version 3.* you can run the following:
````
sudo add-apt-repository ppa:george-edison55/cmake-3.x -y
sudo apt-get update
````

On Linux you first need a version of GCC that supports `-std=c++14`. Version 4.9 or newer should work.
If you don't have version 4.9 you can get it by running these commands:
````
sudo apt-get install build-essential
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-4.9 g++-4.9 cpp-4.9
````

Then run this:
````
cmake -D CMAKE_BUILD_TYPE=Debug CMakeLists.txt
make
````

Now if gcc version 4.9 is not your default version of gcc, you can tell cmake to switch to that version by
adding the following additional cmake command line arguments:

cmake -D CMAKE_C_COMPILER=gcc-4.9 -D CMAKE_CXX_COMPILER=g++-4.9 -D CMAKE_BUILD_TYPE=Debug CMakeLists.txt
make
````
-D CMAKE_C_COMPILER=gcc-4.9 -D CMAKE_CXX_COMPILER=g++-4.9
````

3 changes: 2 additions & 1 deletion docs/install_eigen.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
Installing Eigen library is easy!

1. Get the latest stable 3.x release such as [3.3.2](http://bitbucket.org/eigen/eigen/get/3.3.2.zip).
2. Unzip somewhere on your drive and create environment variable named `EIGEN_ROOT` with value equal to path of the folder. That folder should contain eigen3 folder inside it.
2. Unzip somewhere on your drive and create environment variable named `EIGEN_ROOT` with value equal to path of the folder.
That folder should contain a single `eigen3` folder inside it.

0 comments on commit 592a403

Please sign in to comment.