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

Ci #2

Merged
merged 2 commits into from
Jul 26, 2023
Merged

Ci #2

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
4 changes: 4 additions & 0 deletions .github/workflows/firmware_build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
branches:
- '*'

permissions:
contents: read
packages: write

jobs:
Firmware-build:
runs-on: ubuntu-latest
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build

on:
push:

permissions:
contents: read
packages: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: docker/setup-buildx-action@v2

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/tiiuae/px4-gzsim-plugins
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=raw,value=latest
type=sha

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build container image and push
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
6 changes: 3 additions & 3 deletions src/gazebo_mavlink_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,9 +364,9 @@ void GazeboMavlinkInterface::BarometerCallback(const gz::msgs::FluidPressure &_m
void GazeboMavlinkInterface::MagnetometerCallback(const gz::msgs::Magnetometer &_msg) {
SensorData::Magnetometer mag_data;
mag_data.mag_b = Eigen::Vector3d(
AddSimpleNoise(_msg.field_tesla().x(), 0.0001, 0.009),
AddSimpleNoise(_msg.field_tesla().y(), 0.0001, 0.007),
AddSimpleNoise(_msg.field_tesla().z(), 0.0001, 0.004)
AddSimpleNoise(_msg.field_tesla().x(), 0, 0.0001),
AddSimpleNoise(_msg.field_tesla().y(), 0, 0.0001),
AddSimpleNoise(_msg.field_tesla().z(), 0, 0.0001)
);
mavlink_interface_->UpdateMag(mag_data);
}
Expand Down