Skip to content

Commit

Permalink
Merge branch 'feat/mavsdk_fix'
Browse files Browse the repository at this point in the history
  • Loading branch information
SeaingAnt committed Sep 19, 2023
2 parents 4480a32 + 968259e commit 07fcfb2
Show file tree
Hide file tree
Showing 3 changed files with 451 additions and 174 deletions.
210 changes: 210 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,210 @@
---
kind: pipeline
name: arm64_clang_cmake_opencv

platform:
os: linux
arch: arm64

steps:
- name: Build and Test
image: ubuntu:18.04
environment:
CC: clang
CMAKE_FLAGS: '-DBUILD_DEMOS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_JAVA=OFF -DBUILD_MODULE_visp_java_bindings_generator=OFF -DBUILD_TUTORIALS=OFF'
commands:
- lscpu
- cat /proc/cpuinfo
- uname -m
- uname -r
- echo "CMAKE_FLAGS:= $CMAKE_FLAGS"
- export DEBIAN_FRONTEND=noninteractive
- apt-get update -y
# To overcome link error "cannot find -lgfortran", gfortran package needs to be installed
- apt-get install -y make $CC cmake git-core libopencv-dev libx11-dev libv4l-dev liblapack-dev libeigen3-dev gfortran
- $CC --version
- gfortran --version
- cd ..
- git clone --depth 1 https://github.com/lagadic/visp-images
- export VISP_INPUT_IMAGE_PATH=$(pwd)/visp-images
# build OpenBLAS from source, version in Bionic is 0.2.20+ds-4 (24 Jul 2017)
- git clone --depth 1 https://github.com/xianyi/OpenBLAS.git
- cd OpenBLAS
- mkdir install
- make -j$(nproc)
- make -j$(nproc) install PREFIX=$(pwd)/install
- export OpenBLAS_HOME=$(pwd)/install
- cd ../src
- mkdir build && cd build
- export CC=/usr/bin/clang
- export CXX=/usr/bin/clang++
- cmake $CMAKE_FLAGS ..
- make -j$(nproc)
- ctest -j$(nproc) --output-on-failure

---
kind: pipeline
name: arm64_gcc_cmake_opencv

platform:
os: linux
arch: arm64

steps:
- name: Build and Test
image: ubuntu:18.04
environment:
CC: gcc
CMAKE_FLAGS: '-DBUILD_DEMOS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_JAVA=OFF -DBUILD_MODULE_visp_java_bindings_generator=OFF -DBUILD_TUTORIALS=OFF -DDART_TESTING_TIMEOUT=2500'
commands:
- lscpu
- cat /proc/cpuinfo
- uname -m
- uname -r
- echo "CMAKE_FLAGS:= $CMAKE_FLAGS"
- export DEBIAN_FRONTEND=noninteractive
- apt-get update -y
# To overcome link error "cannot find -lgfortran", gfortran package needs to be installed
- apt-get install -y make $CC g++ cmake git-core libopencv-dev libx11-dev libv4l-dev liblapack-dev libeigen3-dev gfortran
- $CC --version
- gfortran --version
- cd ..
- git clone --depth 1 https://github.com/lagadic/visp-images
- export VISP_INPUT_IMAGE_PATH=$(pwd)/visp-images
# build OpenBLAS from source, version in Bionic is 0.2.20+ds-4 (24 Jul 2017)
- git clone --depth 1 https://github.com/xianyi/OpenBLAS.git
- cd OpenBLAS
- mkdir install
- make -j$(nproc)
- make -j$(nproc) install PREFIX=$(pwd)/install
- export OpenBLAS_HOME=$(pwd)/install
- cd ../src
- mkdir build && cd build
- cmake $CMAKE_FLAGS ..
- make -j$(nproc)
- ctest -j$(nproc) --output-on-failure

---
kind: pipeline
name: arm64_gcc_cmake

platform:
os: linux
arch: arm64

steps:
- name: Build and Test without OpenCV
image: ubuntu:18.04
environment:
CC: gcc
CMAKE_FLAGS: '-DBUILD_DEMOS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_JAVA=OFF -DBUILD_MODULE_visp_java_bindings_generator=OFF -DBUILD_TUTORIALS=OFF -DDART_TESTING_TIMEOUT=2500'
commands:
- lscpu
- cat /proc/cpuinfo
- uname -m
- uname -r
- echo "CMAKE_FLAGS:= $CMAKE_FLAGS"
- export DEBIAN_FRONTEND=noninteractive
- apt-get update -y
# To overcome link error "cannot find -lgfortran", gfortran package needs to be installed
- apt-get install -y make $CC g++ cmake git-core libx11-dev libv4l-dev liblapack-dev libeigen3-dev gfortran
- $CC --version
- gfortran --version
- cd ..
- git clone --depth 1 https://github.com/lagadic/visp-images
- export VISP_INPUT_IMAGE_PATH=$(pwd)/visp-images
# build OpenBLAS from source, version in Bionic is 0.2.20+ds-4 (24 Jul 2017)
- git clone --depth 1 https://github.com/xianyi/OpenBLAS.git
- cd OpenBLAS
- mkdir install
- make -j$(nproc)
- make -j$(nproc) install PREFIX=$(pwd)/install
- export OpenBLAS_HOME=$(pwd)/install
- cd ../src
- mkdir build && cd build
- cmake $CMAKE_FLAGS ..
- make -j$(nproc)
- ctest -j$(nproc) --output-on-failure

# ---
# kind: pipeline
# name: arm32_gcc_cmake_opencv

# platform:
# os: linux
# arch: arm

# steps:
# - name: Build and Test (32 bits)
# image: ubuntu:18.04
# environment:
# CC: gcc
# CMAKE_FLAGS: '-DBUILD_DEMOS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_JAVA=OFF -DBUILD_MODULE_visp_java_bindings_generator=OFF -DBUILD_TUTORIALS=OFF'
# commands:
# - lscpu
# - cat /proc/cpuinfo
# - uname -m
# - uname -r
# - echo "CMAKE_FLAGS:= $CMAKE_FLAGS"
# - export DEBIAN_FRONTEND=noninteractive
# - apt-get update -y
# # To overcome link error "cannot find -lgfortran", gfortran package needs to be installed
# - apt-get install -y make $CC g++ cmake git-core libopencv-dev libx11-dev libv4l-dev liblapack-dev libeigen3-dev gfortran
# - $CC --version
# - gfortran --version
# - cd ..
# - git clone --depth 1 https://github.com/lagadic/visp-images
# - export VISP_INPUT_IMAGE_PATH=$(pwd)/visp-images
# # build OpenBLAS from source, version in Bionic is 0.2.20+ds-4 (24 Jul 2017)
# - git clone --depth 1 https://github.com/xianyi/OpenBLAS.git
# - cd OpenBLAS
# - mkdir install
# - make -j$(nproc)
# - make -j$(nproc) install PREFIX=$(pwd)/install
# - export OpenBLAS_HOME=$(pwd)/install
# - cd ../src
# - mkdir build && cd build
# - cmake $CMAKE_FLAGS ..
# - make -j$(nproc)
# - ctest -j$(nproc) --output-on-failure

# ---
# kind: pipeline
# name: arm32_gcc_cmake

# platform:
# os: linux
# arch: arm

# steps:
# - name: Build and Test without OpenCV (32 bits)
# image: ubuntu:18.04
# environment:
# CC: gcc
# CMAKE_FLAGS: '-DBUILD_DEMOS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_JAVA=OFF -DBUILD_MODULE_visp_java_bindings_generator=OFF -DBUILD_TUTORIALS=OFF'
# commands:
# - lscpu
# - cat /proc/cpuinfo
# - uname -m
# - uname -r
# - echo "CMAKE_FLAGS:= $CMAKE_FLAGS"
# - export DEBIAN_FRONTEND=noninteractive
# - apt-get update -y
# # Here we don't have the link error "cannot find -lgfortran"
# - apt-get install -y make $CC g++ cmake git-core libx11-dev libv4l-dev liblapack-dev libeigen3-dev
# - $CC --version
# - cd ..
# - git clone --depth 1 https://github.com/lagadic/visp-images
# - export VISP_INPUT_IMAGE_PATH=$(pwd)/visp-images
# # build OpenBLAS from source, version in Bionic is 0.2.20+ds-4 (24 Jul 2017)
# - git clone --depth 1 https://github.com/xianyi/OpenBLAS.git
# - cd OpenBLAS
# - mkdir install
# - make -j$(nproc)
# - make -j$(nproc) install PREFIX=$(pwd)/install
# - export OpenBLAS_HOME=$(pwd)/install
# - cd ../src
# - mkdir build && cd build
# - cmake $CMAKE_FLAGS ..
# - make -j$(nproc)
# - ctest -j$(nproc) --output-on-failure
12 changes: 7 additions & 5 deletions modules/robot/include/visp3/robot/vpRobotMavsdk.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class VISP_EXPORT vpRobotMavsdk
void getPosition(vpHomogeneousMatrix &ned_M_frd) const;
std::tuple<float, float> getHome() const;
std::string getAddress() const;
bool isRunning() const;
bool isRunning() const;
//@}

//! \name Robot commands
Expand All @@ -124,9 +124,11 @@ class VISP_EXPORT vpRobotMavsdk
bool setLateralSpeed(double body_frd_vy);
bool setGPSGlobalOrigin(double latitude, double longitude, double altitude);
void setPositioningIncertitude(float position_incertitude, float yaw_incertitude);
bool setPosition(float ned_north, float ned_east, float ned_down, float ned_yaw, bool blocking = true, int timeout_sec = 10);
bool setPosition(float ned_north, float ned_east, float ned_down, float ned_yaw, bool blocking = true,
int timeout_sec = 10);
bool setPosition(const vpHomogeneousMatrix &ned_M_frd, bool blocking = true, int timeout_sec = 10);
bool setPositionRelative(float ned_delta_north, float ned_delta_east, float ned_delta_down, float ned_delta_yaw, bool blocking = true, int timeout_sec = 10);
bool setPositionRelative(float ned_delta_north, float ned_delta_east, float ned_delta_down, float ned_delta_yaw,
bool blocking = true, int timeout_sec = 10);
bool setPositionRelative(const vpHomogeneousMatrix &delta_frd_M_frd, bool blocking = true, int timeout_sec = 10);
bool setVelocity(const vpColVector &frd_vel_cmd);
bool setVerticalSpeed(double body_frd_vz);
Expand All @@ -135,8 +137,8 @@ class VISP_EXPORT vpRobotMavsdk
void setVerbose(bool verbose);
bool stopMoving();
bool takeControl();
bool takeOff(bool interactive = true, int timeout_sec = 10);
bool takeOff(bool interactive, double takeoff_altitude, int timeout_sec = 10);
bool takeOff(bool interactive = true, int timeout_sec = 10, bool use_gps = false);
bool takeOff(bool interactive, double takeoff_altitude, int timeout_sec = 10, bool use_gps = false);
//@}

private:
Expand Down
Loading

0 comments on commit 07fcfb2

Please sign in to comment.