Skip to content

Commit

Permalink
DronecodeSDK -> MAVSDK
Browse files Browse the repository at this point in the history
  • Loading branch information
julianoes committed Jun 16, 2019
1 parent 57eeefc commit 1bfee75
Show file tree
Hide file tree
Showing 72 changed files with 370 additions and 372 deletions.
2 changes: 1 addition & 1 deletion .ycm_extra_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
'-I',
'core',
'-I',
'core/include/dronecode_sdk',
'core/include/mavsdk',
'-I',
'plugins/action/include',
'-I',
Expand Down
22 changes: 11 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.1)

project(dronecode_sdk_superbuild)
project(mavsdk_superbuild)

option(SUPERBUILD "Build dependencies" ON)
option(BUILD_BACKEND "Build gRPC backend server" OFF)
Expand All @@ -18,19 +18,19 @@ endif()

add_subdirectory(src)

install(EXPORT dronecode-sdk-targets
FILE DronecodeSDKTargets.cmake
NAMESPACE DronecodeSDK::
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/DronecodeSDK
install(EXPORT mavsdk-targets
FILE MAVSDKTargets.cmake
NAMESPACE MAVSDK::
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/MAVSDK
)

# For the build tree
configure_file(DronecodeSDKConfig.cmake.in
"${PROJECT_BINARY_DIR}/DronecodeSDKConfig.cmake" @ONLY)
configure_file(MAVSDKConfig.cmake.in
"${PROJECT_BINARY_DIR}/MAVSDKConfig.cmake" @ONLY)
# For the install tree
configure_file(DronecodeSDKConfig.cmake.in
"${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/DronecodeSDKConfig.cmake" @ONLY)
configure_file(MAVSDKConfig.cmake.in
"${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/MAVSDKConfig.cmake" @ONLY)

install(FILES
"${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/DronecodeSDKConfig.cmake"
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/DronecodeSDK)
"${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/MAVSDKConfig.cmake"
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/MAVSDK)
22 changes: 11 additions & 11 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pipeline {
stage('Ubuntu 16.04 Debug') {
agent {
docker {
image 'dronecode/dronecode-sdk-ubuntu-16.04:2019-03-25'
image 'mavlink/mavsdk-ubuntu-16.04:2019-03-25'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
Expand Down Expand Up @@ -40,7 +40,7 @@ pipeline {
stage('Ubuntu 16.04 Release') {
agent {
docker {
image 'dronecode/dronecode-sdk-ubuntu-16.04:2019-03-25'
image 'mavlink/mavsdk-ubuntu-16.04:2019-03-25'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
Expand Down Expand Up @@ -70,7 +70,7 @@ pipeline {
stage('Ubuntu 18.04 Debug') {
agent {
docker {
image 'dronecode/dronecode-sdk-ubuntu-18.04:2019-03-25'
image 'mavlink/mavsdk-ubuntu-18.04:2019-03-25'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
Expand Down Expand Up @@ -100,7 +100,7 @@ pipeline {
stage('Ubuntu 18.04 Release') {
agent {
docker {
image 'dronecode/dronecode-sdk-ubuntu-18.04:2019-03-25'
image 'mavlink/mavsdk-ubuntu-18.04:2019-03-25'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
Expand Down Expand Up @@ -130,7 +130,7 @@ pipeline {
stage('Ubuntu 18.04 Debug PX4 SITL') {
agent {
docker {
image 'dronecode/dronecode-sdk-ubuntu-18.04-px4-sitl:2019-05-15'
image 'mavlink/mavsdk-ubuntu-18.04-px4-sitl:2019-05-15'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
Expand Down Expand Up @@ -158,7 +158,7 @@ pipeline {
stage('Fedora 27 Debug') {
agent {
docker {
image 'dronecode/dronecode-sdk-fedora-28:2019-03-25'
image 'mavlink/mavsdk-fedora-28:2019-03-25'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
Expand Down Expand Up @@ -188,7 +188,7 @@ pipeline {
stage('Fedora 27 Release') {
agent {
docker {
image 'dronecode/dronecode-sdk-fedora-28:2019-03-25'
image 'mavlink/mavsdk-fedora-28:2019-03-25'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
Expand Down Expand Up @@ -218,7 +218,7 @@ pipeline {
stage('Fedora 28 Debug') {
agent {
docker {
image 'dronecode/dronecode-sdk-fedora-29:2019-03-25'
image 'mavlink/mavsdk-fedora-29:2019-03-25'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
Expand Down Expand Up @@ -248,7 +248,7 @@ pipeline {
stage('Fedora 28 Release') {
agent {
docker {
image 'dronecode/dronecode-sdk-fedora-29:2019-03-25'
image 'mavlink/mavsdk-fedora-29:2019-03-25'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
Expand Down Expand Up @@ -344,7 +344,7 @@ pipeline {
stage('check style') {
agent {
docker {
image 'dronecode/dronecode-sdk-ubuntu-16.04:2019-03-25'
image 'mavlink/mavsdk-ubuntu-16.04:2019-03-25'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
Expand All @@ -368,7 +368,7 @@ pipeline {
stage('Generate Docs') {
agent {
docker {
image 'dronecode/dronecode-sdk-ubuntu-16.04:2019-03-25'
image 'mavlink/mavsdk-ubuntu-16.04:2019-03-25'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
Expand Down
4 changes: 2 additions & 2 deletions DronecodeSDKConfig.cmake.in → MAVSDKConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ if(NOT @BUILD_SHARED_LIBS@)
endif()
endif()

get_filename_component(DRONECODESDK_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
include("${DRONECODESDK_CMAKE_DIR}/DronecodeSDKTargets.cmake")
get_filename_component(MAVSDK_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
include("${MAVSDK_CMAKE_DIR}/MAVSDKTargets.cmake")
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ API consumers use `MAVSDK` class to discover and manage vehicles (`System` objec

The links below take you to the respective header files:

- [dronecode_sdk](core/include/dronecode_sdk/dronecode_sdk.h): set up connection, discover devices
- [system](core/include/dronecode_sdk/system.h): an class representing one drone which can consist of multiple components
- [mavsdk](core/include/mavsdk/mavsdk.h): set up connection, discover devices
- [system](core/include/mavsdk/system.h): an class representing one drone which can consist of multiple components
- [info](plugins/info/include/plugins/info/info.h): general info about a device
- [telemetry](plugins/telemetry/include/plugins/telemetry/telemetry.h): to receive telemetry data
- [action](plugins/action/include/plugins/action/action.h): to send commands such as arm, disarm, takeoff, land to drone
Expand Down
14 changes: 7 additions & 7 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ init:
- msbuild /version

# clone directory
clone_folder: C:\dronecode_sdk
clone_folder: C:\mavsdk

# scripts to run before build
before_build:
- if "%COMPILER%"=="mingw-64" set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
- if "%COMPILER%"=="mingw-64" set PATH=C:\mingw-w64\x86_64-7.2.0-posix-seh-rt_v5-rev1\mingw64\bin;%PATH%
- cd C:\dronecode_sdk
- cd C:\mavsdk
- git submodule update --init --recursive --depth 200
- cd C:\

Expand All @@ -49,16 +49,16 @@ build: on
build_script:
- set CL=/MP
- if "%COMPILER%"=="msvc2017" call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
- set dronecode_sdk_dir=C:\dronecode_sdk
- cd %dronecode_sdk_dir%
- cmake -DCMAKE_BUILD_TYPE="%configuration%" -G "%GENERATOR%" -DCMAKE_INSTALL_PREFIX=%dronecode_sdk_dir%\install -DBUILD_BACKEND=ON -DBUILD_SHARED_LIBS=OFF -DENABLE_MAVLINK_PASSTHROUGH=ON -Bbuild -H.
- set mavsdk_dir=C:\mavsdk
- cd %mavsdk_dir%
- cmake -DCMAKE_BUILD_TYPE="%configuration%" -G "%GENERATOR%" -DCMAKE_INSTALL_PREFIX=%mavsdk_dir%\install -DBUILD_BACKEND=ON -DBUILD_SHARED_LIBS=OFF -DENABLE_MAVLINK_PASSTHROUGH=ON -Bbuild -H.
- cmake --build build --target install --config %configuration%
- cmake -G "%GENERATOR%" -DCMAKE_BUILD_TYPE=%configuration% -DCMAKE_PREFIX_PATH="%dronecode_sdk_dir%\install;%dronecode_sdk_dir%\build\third_party\install" -Bexample\build -Hexample
- cmake -G "%GENERATOR%" -DCMAKE_BUILD_TYPE=%configuration% -DCMAKE_PREFIX_PATH="%mavsdk_dir%\install;%mavsdk_dir%\build\third_party\install" -Bexample\build -Hexample
- cmake --build example\build --config %configuration%

test: on

test_script:
- cd %dronecode_sdk_dir%
- cd %mavsdk_dir%
- build\src\unit_tests_runner.exe
- build\src\backend\test\unit_tests_backend.exe
4 changes: 2 additions & 2 deletions docker/Dockerfile-Fedora-28
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Development environment for the Dronecode SDK based on Fedora 28.
# Development environment for the MAVSDK based on Fedora 28.
#
# Author: Julian Oes <julian@oes.ch>
#
Expand Down Expand Up @@ -51,4 +51,4 @@ COPY entrypoint.sh /usr/local/bin/entrypoint.sh

ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]

WORKDIR "/home/user/DronecodeSDK"
WORKDIR "/home/user/MAVSDK"
4 changes: 2 additions & 2 deletions docker/Dockerfile-Fedora-29
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Development environment for the Dronecode SDK based on Fedora 29.
# Development environment for the MAVSDK based on Fedora 29.
#
# Author: Julian Oes <julian@oes.ch>
#
Expand Down Expand Up @@ -51,4 +51,4 @@ COPY entrypoint.sh /usr/local/bin/entrypoint.sh

ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]

WORKDIR "/home/user/DronecodeSDK"
WORKDIR "/home/user/MAVSDK"
4 changes: 2 additions & 2 deletions docker/Dockerfile-Ubuntu-16.04
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Development environment for the Dronecode SDK based on Ubuntu 16.04.
# Development environment for MAVSDK based on Ubuntu 16.04.
#
# Author: Julian Oes <julian@oes.ch>
#
Expand Down Expand Up @@ -61,4 +61,4 @@ COPY entrypoint.sh /usr/local/bin/entrypoint.sh

ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]

WORKDIR "/home/user/DronecodeSDK"
WORKDIR "/home/user/MAVSDK"
4 changes: 2 additions & 2 deletions docker/Dockerfile-Ubuntu-18.04
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Development environment for the Dronecode SDK based on Ubuntu 18.04.
# Development environment for MAVSDK based on Ubuntu 18.04.
#
# Author: Julian Oes <julian@oes.ch>
#
Expand Down Expand Up @@ -57,4 +57,4 @@ COPY entrypoint.sh /usr/local/bin/entrypoint.sh

ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]

WORKDIR "/home/user/DronecodeSDK"
WORKDIR "/home/user/MAVSDK"
5 changes: 2 additions & 3 deletions docker/Dockerfile-Ubuntu-18.04-PX4-SITL
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#
# PX4 SITL testing environment for the Dronecode SDK based on Ubuntu 18.04.
#
# PX4 SITL testing environment for MAVSDK based on Ubuntu 18.04.
# Author: Julian Oes <julian@oes.ch>
#
FROM dronecode/dronecode-sdk-ubuntu-18.04
FROM mavlink/mavsdk-ubuntu-18.04
MAINTAINER Julian Oes <julian@oes.ch>

ENV FIRMWARE_DIR ${WORKDIR}../Firmware
Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile-backend
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RUN apk add build-base \
linux-headers \
perl

WORKDIR /root/dronecode_sdk
WORKDIR /root/mavsdk

COPY . .

Expand All @@ -23,7 +23,7 @@ RUN apk add libcurl \
libstdc++

COPY --from=builder /root/dcsdk_install /usr/local
COPY --from=builder /root/dronecode_sdk/build/default/backend/src/backend_bin /root/backend_bin
COPY --from=builder /root/mavsdk/build/default/backend/src/backend_bin /root/backend_bin

EXPOSE 14540/udp
ENTRYPOINT /root/backend_bin
14 changes: 7 additions & 7 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
## Building and using Docker development images.

These Dockerfiles will create a DronecodeSDK development container image based on whichever flavour of Ubuntu or Fedora you prefer.
These Dockerfiles will create a MAVSDK development container image based on whichever flavour of Ubuntu or Fedora you prefer.

Docker images are built by the project and are hosted on Docker Hub.
You can use them simply by :

```bash
cd /whereever/DroncodeSDK
cd /whereever/MAVSDK
./run-docker.sh
```

Expand All @@ -15,20 +15,20 @@ Should you wish to create and use your own local images, use the following.
To create an image :

```bash
cd /whereever/DronecodeSDK/docker
docker build -t dronecode/dronecode-sdk-ubuntu-18.04 -f Dockerfile-Ubuntu-18.04 .
cd /whereever/MAVSDK/docker
docker build -t mavlink/mavsdk-ubuntu-18.04 -f Dockerfile-Ubuntu-18.04 .
```

To use the image :

```bash
cd /whereever/DronecodeSDK
cd /whereever/MAVSDK
./run-docker.sh
```

This will create and run a container based on your image.
/whereever/DronecodeSDK will be mounted inside the container at /home/dronecode/DronecodeSDK
/whereever/MAVSDK will be mounted inside the container at /home/user/MAVSDK

```bash
dronecode@a476023ed255:~/DronecodeSDK$ make default
user@a476023ed255:~/MAVSDK$
```
50 changes: 25 additions & 25 deletions docker/build_and_push_docker_images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,35 @@

set -e

docker pull dronecode/dronecode-sdk-fedora-28
docker pull dronecode/dronecode-sdk-fedora-29
docker pull dronecode/dronecode-sdk-ubuntu-16.04
docker pull dronecode/dronecode-sdk-ubuntu-18.04
docker pull dronecode/dronecode-sdk-ubuntu-18.04-px4-sitl
docker pull mavlink/mavsdk-fedora-28
docker pull mavlink/mavsdk-fedora-29
docker pull mavlink/mavsdk-ubuntu-16.04
docker pull mavlink/mavsdk-ubuntu-18.04
docker pull mavlink/mavsdk-ubuntu-18.04-px4-sitl

docker build -f Dockerfile-Fedora-28 -t dronecode/dronecode-sdk-fedora-28 .
docker build -f Dockerfile-Fedora-29 -t dronecode/dronecode-sdk-fedora-29 .
docker build -f Dockerfile-Ubuntu-16.04 -t dronecode/dronecode-sdk-ubuntu-16.04 .
docker build -f Dockerfile-Ubuntu-18.04 -t dronecode/dronecode-sdk-ubuntu-18.04 .
docker build -f Dockerfile-Ubuntu-18.04-PX4-SITL -t dronecode/dronecode-sdk-ubuntu-18.04-px4-sitl .
docker build -f Dockerfile-Fedora-28 -t mavlink/mavsdk-fedora-28 .
docker build -f Dockerfile-Fedora-29 -t mavlink/mavsdk-fedora-29 .
docker build -f Dockerfile-Ubuntu-16.04 -t mavlink/mavsdk-ubuntu-16.04 .
docker build -f Dockerfile-Ubuntu-18.04 -t mavlink/mavsdk-ubuntu-18.04 .
docker build -f Dockerfile-Ubuntu-18.04-PX4-SITL -t mavlink/mavsdk-ubuntu-18.04-px4-sitl .

DATE=`date +%Y-%m-%d`

docker tag dronecode/dronecode-sdk-fedora-28:latest dronecode/dronecode-sdk-fedora-28:$DATE
docker tag dronecode/dronecode-sdk-fedora-29:latest dronecode/dronecode-sdk-fedora-29:$DATE
docker tag dronecode/dronecode-sdk-ubuntu-16.04:latest dronecode/dronecode-sdk-ubuntu-16.04:$DATE
docker tag dronecode/dronecode-sdk-ubuntu-18.04:latest dronecode/dronecode-sdk-ubuntu-18.04:$DATE
docker tag dronecode/dronecode-sdk-ubuntu-18.04-px4-sitl:latest dronecode/dronecode-sdk-ubuntu-18.04-px4-sitl:$DATE
docker tag mavlink/mavsdk-fedora-28:latest mavlink/mavsdk-fedora-28:$DATE
docker tag mavlink/mavsdk-fedora-29:latest mavlink/mavsdk-fedora-29:$DATE
docker tag mavlink/mavsdk-ubuntu-16.04:latest mavlink/mavsdk-ubuntu-16.04:$DATE
docker tag mavlink/mavsdk-ubuntu-18.04:latest mavlink/mavsdk-ubuntu-18.04:$DATE
docker tag mavlink/mavsdk-ubuntu-18.04-px4-sitl:latest mavlink/mavsdk-ubuntu-18.04-px4-sitl:$DATE

docker push dronecode/dronecode-sdk-fedora-28:latest
docker push dronecode/dronecode-sdk-fedora-28:$DATE
docker push dronecode/dronecode-sdk-fedora-29:latest
docker push dronecode/dronecode-sdk-fedora-29:$DATE
docker push dronecode/dronecode-sdk-ubuntu-16.04:latest
docker push dronecode/dronecode-sdk-ubuntu-16.04:$DATE
docker push dronecode/dronecode-sdk-ubuntu-18.04:latest
docker push dronecode/dronecode-sdk-ubuntu-18.04:$DATE
docker push dronecode/dronecode-sdk-ubuntu-18.04-px4-sitl:latest
docker push dronecode/dronecode-sdk-ubuntu-18.04-px4-sitl:$DATE
docker push mavlink/mavsdk-fedora-28:latest
docker push mavlink/mavsdk-fedora-28:$DATE
docker push mavlink/mavsdk-fedora-29:latest
docker push mavlink/mavsdk-fedora-29:$DATE
docker push mavlink/mavsdk-ubuntu-16.04:latest
docker push mavlink/mavsdk-ubuntu-16.04:$DATE
docker push mavlink/mavsdk-ubuntu-18.04:latest
docker push mavlink/mavsdk-ubuntu-18.04:$DATE
docker push mavlink/mavsdk-ubuntu-18.04-px4-sitl:latest
docker push mavlink/mavsdk-ubuntu-18.04-px4-sitl:$DATE

echo "Please update tag in Jenkinsfile to '$DATE'"
6 changes: 3 additions & 3 deletions example/battery/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ add_executable(battery
)

target_link_libraries(battery
DronecodeSDK::dronecode_sdk_telemetry
DronecodeSDK::dronecode_sdk_mavlink_passthrough
DronecodeSDK::dronecode_sdk
DronecodeSDK::mavsdk_telemetry
DronecodeSDK::mavsdk_mavlink_passthrough
DronecodeSDK::mavsdk
)
Loading

0 comments on commit 1bfee75

Please sign in to comment.