Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code for ArduRover #2

Merged
merged 17 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 87 additions & 14 deletions .github/workflows/ros_build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,96 @@ name: ros_build_test
on:

push:
branches: [ devel ]

paths-ignore:
- '**/README.md'

pull_request:
branches: [ master ]
pull_request:

workflow_dispatch:

concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
# concurrency:
# group: ${{ github.ref }}
# cancel-in-progress: true


jobs:

build:
uses: ctu-mrs/ci_scripts/.github/workflows/ros_build_test.yml@master
secrets:
PUSH_TOKEN: ${{ secrets.PUSH_TOKEN }}
build_amd64:
runs-on: ubuntu-20.04

steps:

- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: 'recursive'

- name: Checkout CI scripts
uses: actions/checkout@v3
with:
repository: ctu-mrs/ci_scripts
ref: master
path: .ci_scripts

- name: Update submodules
run: |
sudo pip3 install -U gitman
[[ -e .gitman.yml || -e .gitman.yaml ]] && [[ ! -e .gitman_ignore ]] && gitman install || echo "no gitman modules to install"

- name: Build
run: |
mkdir -p /tmp/artifacts
.ci_scripts/package_build/build_package.sh $GITHUB_WORKSPACE /tmp/artifacts

build_arm64:

runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: 'recursive'

- name: Checkout CI scripts
uses: actions/checkout@v3
with:
repository: ctu-mrs/ci_scripts
ref: master
path: .ci_scripts

- name: Update submodules
run: |
sudo pip3 install -U gitman
[[ -e .gitman.yml || -e .gitman.yaml ]] && [[ ! -e .gitman_ignore ]] && gitman install || echo "no gitman modules to install"

- uses: ctu-mrs/run-on-arch-action@master
name: Build artifact

id: build

with:
arch: aarch64
distro: noetic

githubToken: ${{ github.token }}

# Create an artifacts directory
setup: |
mkdir -p "/tmp/artifacts"
mkdir -p "/tmp/repository"

# Mount the artifacts directory as /artifacts in the container
dockerRunArgs: |
--volume "$PWD:/tmp/repository"
--volume "/tmp/artifacts:/tmp/artifacts"

# The shell to run commands with in the container
shell: /bin/sh

install: |
apt-get update -q -y
apt-get upgrade -q -y

# Produce a binary artifact and place it in the mounted volume
run: |
git config --global --add safe.directory "*"
/tmp/repository/.ci_scripts/package_build/build_package.sh /tmp/repository /tmp/artifacts

22 changes: 0 additions & 22 deletions .github/workflows/ros_package_build.yml

This file was deleted.

10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.5)
project(mrs_uav_px4_api)
project(mrs_usv_ardurover_api)

set(CATKIN_DEPENDENCIES
cmake_modules
Expand All @@ -26,7 +26,7 @@ set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(LIBRARIES
MrsUavPx4Api_Api
MrsUsvArduroverApi_Api
)

catkin_package(
Expand All @@ -40,16 +40,16 @@ include_directories(

# Plugin

add_library(MrsUavPx4Api_Api
add_library(MrsUsvArduroverApi_Api
src/api.cpp
)

add_dependencies(MrsUavPx4Api_Api
add_dependencies(MrsUsvArduroverApi_Api
${${PROJECT_NAME}_EXPORTED_TARGETS}
${catkin_EXPORTED_TARGETS}
)

target_link_libraries(MrsUavPx4Api_Api
target_link_libraries(MrsUsvArduroverApi_Api
${catkin_LIBRARIES}
${Eigen_LIBRARIES}
)
Expand Down
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# MRS UAV PX4 API Plugin
# MRS USV ArduPilot Rover API Plugin

[MRS HW Api](https://github.com/ctu-mrs/mrs_uav_hw_api) plugin for interfacing the [UAV Core](https://github.com/ctu-mrs/mrs_uav_core) with the PX4 autopilot.
[MRS HW Api](https://github.com/ctu-mrs/mrs_uav_hw_api) plugin for interfacing the [UAV Core](https://github.com/ctu-mrs/mrs_uav_core) with the ArduPilot Rover for BlueBoat.

| Branch | Build status |
|---------|-----------------------------------------------------------------------------------------------------------------------------------|
| Master | [![Master branch](https://github.com/novakfi8/mrs_usv_ardurover_api/actions/workflows/ros_build_test.yml/badge.svg)](https://github.com/novakfi8/mrs_usv_ardurover_api/actions/workflows/ros_build_test.yml) |
| Develop | [![Master branch](https://github.com/novakfi8/mrs_usv_ardurover_api/actions/workflows/ros_build_test.yml/badge.svg?branch=develop)](https://github.com/novakfi8/mrs_usv_ardurover_api/actions/workflows/ros_build_test.yml) |

> :warning: **Attention please: This README is outdated.**
>
Expand Down
16 changes: 10 additions & 6 deletions config/px4_api.yaml → config/ardurover_api.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
hw_interface_plugin: "mrs_uav_px4_api/Api"
hw_interface_plugin: "mrs_usv_ardurover_api/Api"

mavros_timeout: 1.0 # [s]
mavros_timeout: 5.0 # [s]

position_cmd_map: false

simulated_rtk:
utm_zone: "32T"
Expand All @@ -9,19 +11,21 @@ simulated_rtk:
amsl: 340.0

inputs:
position: true
control_group: false
attitude_rate: true
attitude: true
attitude_rate: false
attitude: false
velocity_hdg_rate: true

outputs:
distance_sensor: true
distance_sensor: false
gnss: true
rtk: true
imu: true
altitude: true
magnetometer_heading: true
magnetic_field: true
rc_channels: true
rc_channels: false
battery_state: true
position: true
orientation: true
Expand Down
Loading
Loading