Skip to content

Commit

Permalink
Merge pull request #10 from sonia-auv/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
gauthiermartin authored Jul 30, 2020
2 parents 1216062 + 2fc99be commit 56c9caa
Show file tree
Hide file tree
Showing 15 changed files with 62 additions and 76 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build
devel
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ on:
push:
branches: [develop]
jobs:
build-ros-robot-x86-64:
name: "Build ROS robot X86/64"
build-ros-perception-x86-64:
name: "Build ROS perception X86/64"
runs-on: ubuntu-latest
env:
BASE_IMAGE: "docker.pkg.github.com/sonia-auv/sonia_messages/sonia_messages:x86-robot-latest"
BASE_IMAGE: "docker.pkg.github.com/sonia-auv/sonia_common/sonia_common:x86-perception-latest"
ARCH: x86
TARGET_TYPE: robot
TARGET_TYPE: perception
TARGET_VERSION: develop
IMAGE_NAME: provider_dvl
GITHUB_REMOTE_URL: docker.pkg.github.com/${{ github.repository }}
Expand All @@ -18,10 +18,10 @@ jobs:
- name: Login to Github Package Registry
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin
- name: Build the docker image (robot based)
- name: Build the docker image (perception based)
run: |
docker build . --tag build-${TARGET_VERSION}-${GITHUB_REF##*/}-${GITHUB_RUN_NUMBER} --build-arg BUILD_DATE=$(date '+%Y-%m-%d_%H:%M:%S') --build-arg VERSION=${GITHUB_REF##*/}-$(date ' +%Y-%m-%d_%H:%M:%S') --build-arg BASE_IMAGE=${BASE_IMAGE}
- name: Run Module Unit Test
run: |
docker run build-${TARGET_VERSION}-${GITHUB_REF##*/}-${GITHUB_RUN_NUMBER} catkin_make run_tests
Expand All @@ -32,13 +32,13 @@ jobs:
- name: Push Image to Github Packages Registry
run: |
docker push ${GITHUB_REMOTE_URL}/${IMAGE_NAME}
build-ros-robot-arm64:
name: "Build ROS robot ARM64"
build-ros-perception-arm64:
name: "Build ROS perception ARM64"
runs-on: ubuntu-latest
env:
BASE_IMAGE: "docker.pkg.github.com/sonia-auv/sonia_messages/sonia_messages:arm64-robot-latest"
BASE_IMAGE: "docker.pkg.github.com/sonia-auv/sonia_common/sonia_common:arm64-perception-latest"
ARCH: arm64
TARGET_TYPE: robot
TARGET_TYPE: perception
TARGET_VERSION: develop
IMAGE_NAME: provider_dvl
GITHUB_REMOTE_URL: docker.pkg.github.com/${{ github.repository }}
Expand All @@ -58,7 +58,7 @@ jobs:
sudo apt-get update
sudo apt-get install qemu binfmt-support qemu-user-static
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- name: Build the docker image (robot based)
- name: Build the docker image (perception based)
run: |
docker build . --tag build-${TARGET_VERSION}-${GITHUB_REF##*/}-${GITHUB_RUN_NUMBER} --build-arg BUILD_DATE=$(date '+%Y-%m-%d_%H:%M:%S') --build-arg VERSION=${GITHUB_REF##*/}-$(date ' +%Y-%m-%d_%H:%M:%S') --build-arg BASE_IMAGE=${BASE_IMAGE}
- name: Run Module Unit Test
Expand All @@ -75,8 +75,8 @@ jobs:
name: "Notify Slack - Success"
runs-on: ubuntu-latest
needs: [
build-ros-robot-x86-64,
build-ros-robot-arm64,
build-ros-perception-x86-64,
build-ros-perception-arm64,
]
if: success()
steps:
Expand All @@ -92,8 +92,8 @@ jobs:
name: "Notify Slack - Failure"
runs-on: ubuntu-latest
needs: [
build-ros-robot-x86-64,
build-ros-robot-arm64,
build-ros-perception-x86-64,
build-ros-perception-arm64,
]
if: failure()
steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ on:
push:
branches: [feature/**]
jobs:
build-ros-robot-x86-64:
name: "Build ROS robot X86/64"
build-ros-perception-x86-64:
name: "Build ROS perception X86/64"
runs-on: ubuntu-latest
env:
BASE_IMAGE: "docker.pkg.github.com/sonia-auv/sonia_messages/sonia_messages:x86-robot-latest"
BASE_IMAGE: "docker.pkg.github.com/sonia-auv/sonia_common/sonia_common:x86-perception-latest"
ARCH: x86
TARGET_TYPE: robot
TARGET_TYPE: perception
TARGET_VERSION: feature
IMAGE_NAME: provider_dvl
GITHUB_REMOTE_URL: docker.pkg.github.com/${{ github.repository }}
Expand All @@ -18,7 +18,7 @@ jobs:
- name: Login to Github Package Registry
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin
- name: Build the docker image (robot based)
- name: Build the docker image (perception based)
run: |
docker build . --tag build-feature-${GITHUB_REF##*/}-${GITHUB_RUN_NUMBER} --build-arg BUILD_DATE=$(date '+%Y-%m-%d_%H:%M:%S') --build-arg VERSION=${GITHUB_REF##*/}-$(date ' +%Y-%m-%d_%H:%M:%S') --build-arg BASE_IMAGE=${BASE_IMAGE}
- name: Create Docker Image Tag
Expand All @@ -27,13 +27,13 @@ jobs:
- name: Push Image to Github Packages Registry
run: |
docker push ${GITHUB_REMOTE_URL}/${IMAGE_NAME}:${ARCH}-${TARGET_TYPE}-${TARGET_VERSION}-${GITHUB_REF##*/}
build-ros-robot-arm64:
name: "Build ROS robot ARM64"
build-ros-perception-arm64:
name: "Build ROS perception ARM64"
runs-on: ubuntu-latest
env:
BASE_IMAGE: "docker.pkg.github.com/sonia-auv/sonia_messages/sonia_messages:arm64-robot-latest"
BASE_IMAGE: "docker.pkg.github.com/sonia-auv/sonia_common/sonia_common:arm64-perception-latest"
ARCH: arm64
TARGET_TYPE: robot
TARGET_TYPE: perception
TARGET_VERSION: feature
IMAGE_NAME: provider_dvl
GITHUB_REMOTE_URL: docker.pkg.github.com/${{ github.repository }}
Expand All @@ -53,7 +53,7 @@ jobs:
sudo apt-get update
sudo apt-get install qemu binfmt-support qemu-user-static
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- name: Build the docker image (robot based)
- name: Build the docker image (perception based)
run: |
docker build . --tag build-feature-${GITHUB_REF##*/}-${GITHUB_RUN_NUMBER} --build-arg BUILD_DATE=$(date '+%Y-%m-%d_%H:%M:%S') --build-arg VERSION=${GITHUB_REF##*/}-$(date ' +%Y-%m-%d_%H:%M:%S') --build-arg BASE_IMAGE=${BASE_IMAGE}
- name: Create Docker Image Tag
Expand All @@ -65,11 +65,7 @@ jobs:
notify-success:
name: "Notify Slack - Success"
runs-on: ubuntu-latest
needs:
[
build-ros-robot-x86-64,
build-ros-robot-arm64,
]
needs: [build-ros-perception-x86-64, build-ros-perception-arm64]
if: success()
steps:
- name: Notify Slack Success
Expand All @@ -83,11 +79,7 @@ jobs:
notify-fail:
name: "Notify Slack - Failure"
runs-on: ubuntu-latest
needs:
[
build-ros-robot-x86-64,
build-ros-robot-arm64,
]
needs: [build-ros-perception-x86-64, build-ros-perception-arm64]
if: failure()
steps:
- name: Notify Slack Fail
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ on:
push:
branches: [master]
jobs:
build-ros-robot-x86-64:
name: "Build ROS robot X86/64"
build-ros-perception-x86-64:
name: "Build ROS perception X86/64"
runs-on: ubuntu-latest
env:
BASE_IMAGE: "docker.pkg.github.com/sonia-auv/sonia_messages/sonia_messages:x86-robot-latest"
BASE_IMAGE: "docker.pkg.github.com/sonia-auv/sonia_common/sonia_common:x86-perception-latest"
ARCH: x86
TARGET_TYPE: robot
TARGET_TYPE: perception
IMAGE_NAME: provider_dvl
GITHUB_REMOTE_URL: docker.pkg.github.com/${{ github.repository }}
steps:
Expand All @@ -19,7 +19,7 @@ jobs:
echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin
- name: Set Target version
run: echo '::set-env name=TARGET_VERSION::release-'$(sed -n -e 's/.*<version>\(.*\)<\/version>.*/\1/p' package.xml)
- name: Build the docker image (robot based)
- name: Build the docker image (perception based)
run: |
docker build . --tag build-${TARGET_VERSION}-${GITHUB_REF##*/}-${GITHUB_RUN_NUMBER} --build-arg BUILD_DATE=$(date '+%Y-%m-%d_%H:%M:%S') --build-arg VERSION=${GITHUB_REF##*/}-$(date '+%Y-%m-%d_%H:%M:%S') --build-arg BASE_IMAGE=${BASE_IMAGE}
- name: Run Module Unit Test
Expand All @@ -34,13 +34,13 @@ jobs:
- name: Push Image to Github Packages Registry
run: |
docker push ${GITHUB_REMOTE_URL}/${IMAGE_NAME}
build-ros-robot-arm64:
name: "Build ROS robot ARM64"
build-ros-perception-arm64:
name: "Build ROS perception ARM64"
runs-on: ubuntu-latest
env:
BASE_IMAGE: "docker.pkg.github.com/sonia-auv/sonia_messages/sonia_messages:arm64-robot-latest"
BASE_IMAGE: "docker.pkg.github.com/sonia-auv/sonia_common/sonia_common:arm64-perception-latest"
ARCH: arm64
TARGET_TYPE: robot
TARGET_TYPE: perception
IMAGE_NAME: provider_dvl
GITHUB_REMOTE_URL: docker.pkg.github.com/${{ github.repository }}
steps:
Expand All @@ -58,9 +58,10 @@ jobs:
docker version
- name: Install QEMU to be able to compile on X86 into ARM64
run: |
sudo apt-get update
sudo apt-get install qemu binfmt-support qemu-user-static
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- name: Build the docker image (robot based)
- name: Build the docker image (perception based)
run: |
docker build . --tag build-${TARGET_VERSION}-${GITHUB_REF##*/}-${GITHUB_RUN_NUMBER} --build-arg BUILD_DATE=$(date '+%Y-%m-%d_%H:%M:%S') --build-arg VERSION=${GITHUB_REF##*/}-$(date ' +%Y-%m-%d_%H:%M:%S') --build-arg BASE_IMAGE=${BASE_IMAGE}
- name: Run Module Unit Test
Expand All @@ -77,11 +78,7 @@ jobs:
create-release:
name: "Create Github Release"
runs-on: ubuntu-latest
needs:
[
build-ros-robot-x86-64,
build-ros-robot-arm64,
]
needs: [build-ros-perception-x86-64, build-ros-perception-arm64]
steps:
- uses: actions/checkout@v2
- name: Set Target version
Expand All @@ -105,11 +102,7 @@ jobs:
name: "Notify Slack - Success"
runs-on: ubuntu-latest
needs:
[
build-ros-robot-x86-64,
build-ros-robot-arm64,
create-release,
]
[build-ros-perception-x86-64, build-ros-perception-arm64, create-release]
if: success()
steps:
- name: Notify Slack Success
Expand All @@ -124,11 +117,7 @@ jobs:
name: "Notify Slack - Failure"
runs-on: ubuntu-latest
needs:
[
build-ros-robot-x86-64,
build-ros-robot-arm64,
create-release,
]
[build-ros-perception-x86-64, build-ros-perception-arm64, create-release]
if: failure()
steps:
- name: Notify Slack Fail
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ find_package(
roscpp
cmake_modules
std_msgs
sonia_msgs
sonia_common

)

Expand All @@ -43,7 +43,7 @@ catkin_package(
CATKIN_DEPENDS
roscpp
std_msgs
sonia_msgs
sonia_common
)


Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BASE_IMAGE="docker.pkg.github.com/sonia-auv/sonia_messages/sonia_messages:x86-robot-latest"
ARG BASE_IMAGE="docker.pkg.github.com/sonia-auv/sonia_common/sonia_common:x86-perception-latest"

FROM ${BASE_IMAGE}

Expand Down Expand Up @@ -38,7 +38,7 @@ RUN mkdir ${SCRIPT_DIR}
RUN cat $ENTRYPOINT_ABSPATH > ${SCRIPT_DIR}/entrypoint.sh
RUN echo "roslaunch --wait $LAUNCH_ABSPATH" > ${SCRIPT_DIR}/launch.sh

RUN chmod +x ${SCRIPT_DIR}/entrypoint.sh && chmod +x ${SCRIPT_DIR}/launch.sh
RUN chmod +x ${SCRIPT_DIR}/entrypoint.sh && chmod +x ${SCRIPT_DIR}/launch.sh

RUN echo "source $SONIA_WS_SETUP" >> ~/.bashrc

Expand Down
Binary file removed bags/2016-01-23-22-29-09.bag
Binary file not shown.
Binary file removed bags/2016-01-23-22-31-07.bag
Binary file not shown.
Binary file removed bags/2017-06-04-22-52-57.bag
Binary file not shown.
Binary file removed bags/2017-06-04-23-40-54.bag
Binary file not shown.
Binary file removed bags/2017-06-04-23-42-11.bag
Binary file not shown.
6 changes: 3 additions & 3 deletions package.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package>
<name>provider_dvl</name>
<version>1.0.1</version>
<version>1.1.0</version>
<description>The provider_dvl package</description>

<author>Francis Masse</author>
Expand All @@ -15,12 +15,12 @@
<build_depend>std_msgs</build_depend>
<build_depend>geometry_msgs</build_depend>
<build_depend>sensors_msgs</build_depend>
<build_depend>sonia_msgs</build_depend>
<build_depend>sonia_common</build_depend>

<run_depend>roscpp</run_depend>
<run_depend>std_msgs</run_depend>
<run_depend>geometry_msgs</run_depend>
<run_depend>sensors_msgs</run_depend>
<run_depend>sonia_msgs</run_depend>
<run_depend>sonia_common</run_depend>

</package>
15 changes: 9 additions & 6 deletions scripts/VelocityPrettyPrint.py
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@
#!/usr/bin/env python
__author__ = 'jeremie'
__author__ = "jeremie"

from sonia_msgs.msg import BottomTracking
from sonia_common.msg import BottomTracking
import rospy


def callback(data):
velocities = list(data.velocity)
vx = "{:10.4f}".format(float(velocities[0]))
vy = "{:10.4f}".format(float(data.velocity[1]))
vz = "{:10.4f}".format(float(data.velocity[2]))
print "Velocity:\tNorth : " + vx + "\tEast : " + vy + "\tDown : " + vz + "\r",

print "Velocity:\tNorth : " + vx + "\tEast : " + vy + "\tDown : " + vz + "\r",


def listener():
# In ROS, nodes are uniquely named. If two nodes with the same
# node are launched, the previous one is kicked off. The
# anonymous=True flag means that rospy will choose a unique
# name for our 'listener' node so that multiple listeners can
# run simultaneously.
rospy.init_node('velocity_pretty_print', anonymous=True)
rospy.init_node("velocity_pretty_print", anonymous=True)

rospy.Subscriber("/provider_dvl/bottom_tracking", BottomTracking, callback)

# spin() simply keeps python from exiting until this node is stopped
rospy.spin()

if __name__ == '__main__':

if __name__ == "__main__":
listener()
4 changes: 2 additions & 2 deletions src/provider_dvl/provider_dvl_node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ namespace provider_dvl {

dvl_twist_publisher_ = nh_->advertise<geometry_msgs::TwistStamped>("/provider_dvl/dvl_twist", 1000);
dvl_fluid_pressure_publisher_ = nh_->advertise<sensor_msgs::FluidPressure>("/provider_dvl/dvl_pressure", 1000);
dvl_bottom_tracking_publisher_ = nh_->advertise<sonia_msgs::BottomTracking>("/provider_dvl/dvl_data", 1000);
dvl_bottom_tracking_publisher_ = nh_->advertise<sonia_common::BottomTracking>("/provider_dvl/dvl_data", 1000);
}

//------------------------------------------------------------------------------
Expand Down Expand Up @@ -133,7 +133,7 @@ namespace provider_dvl {

void ProviderDvlNode::FillBottomTracking(ros::Time timestamp)
{
sonia_msgs::BottomTracking message;
sonia_common::BottomTracking message;

message.header.stamp = timestamp;
message.header.frame_id = "/ENU";
Expand Down
2 changes: 1 addition & 1 deletion src/provider_dvl/provider_dvl_node.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <ros/node_handle.h>
#include <geometry_msgs/TwistStamped.h>
#include <sensor_msgs/FluidPressure.h>
#include <sonia_msgs/BottomTracking.h>
#include <sonia_common/BottomTracking.h>

#include "../driver/ethernet_socket.h"
#include "dvl_data.h"
Expand Down

0 comments on commit 56c9caa

Please sign in to comment.