-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5d5fad9
commit b6b7d0a
Showing
8 changed files
with
541 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
|
||
.circleci/ | ||
.github/ | ||
.git/ | ||
.github/ | ||
fognav_msgs/.git/ | ||
fognav_msgs/.github/ | ||
.vscode/ | ||
.dockerignore | ||
.gitignore | ||
**Dockerfile | ||
**.Dockerfile | ||
Dockerfile.** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
|
||
on: | ||
push: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
jobs: | ||
main: | ||
name: Build & push | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ghcr.io/tiiuae/tii-fastdds-locator-monitor | ||
tags: | | ||
type=ref,event=branch | ||
type=ref,event=pr | ||
type=semver,pattern={{version}} | ||
type=sha | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build image and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
platforms: linux/amd64 | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
build/* | ||
install/* | ||
log/* | ||
site/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Copyright 2022 Proyectos y Sistemas de Mantenimiento SL (eProsima). | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
cmake_minimum_required(VERSION 3.8) | ||
project(fastdds_monitor_tutorial) | ||
set(CMAKE_BUILD_TYPE RelWithDebInfo) #Debug, Release | ||
|
||
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
add_compile_options(-Wall -Wextra -Wpedantic) | ||
endif() | ||
|
||
# find dependencies | ||
find_package(ament_cmake REQUIRED) | ||
find_package(fastcdr REQUIRED) | ||
find_package(fastrtps REQUIRED) | ||
find_package(fastdds_statistics_backend REQUIRED) | ||
|
||
# Compile executable and link with dependencies | ||
add_executable(fastdds_monitor src/monitor.cpp) | ||
# Do not use ament as dependencies are not linked with ament | ||
target_link_libraries(fastdds_monitor fastrtps fastcdr fastdds_statistics_backend) | ||
|
||
# Install executable | ||
install( | ||
TARGETS fastdds_monitor | ||
DESTINATION lib/${PROJECT_NAME} | ||
) | ||
ament_export_include_directories(include) | ||
ament_export_libraries(${library_name}) | ||
ament_export_dependencies(${dependencies}) | ||
|
||
ament_package() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
FROM ghcr.io/tiiuae/fog-ros-baseimage-builder:v3.1.0 | ||
|
||
# config dependencies install | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
RUN echo -e '\ | ||
APT::Install-Recommends "0";\n\ | ||
APT::Install-Suggests "0";\n\ | ||
' > /etc/apt/apt.conf.d/01norecommend | ||
|
||
ARG UNDERLAY_WS=/main_ws/underlay_ws | ||
ARG OVERLAY_WS=/main_ws/overlay_ws | ||
|
||
WORKDIR $UNDERLAY_WS | ||
COPY fastdds_statistics_backend.repos $UNDERLAY_WS/src/fastdds_monitor_tutorial/underlay.repos | ||
|
||
# Import the underlay dependencies that doesn't exist in SDK image | ||
RUN vcs import ./src/ < $UNDERLAY_WS/src/fastdds_monitor_tutorial/underlay.repos | ||
|
||
RUN ls -la $UNDERLAY_WS/src && \ | ||
. /usr/bin/ros_setup.bash && \ | ||
colcon build --cmake-args -DBUILD_TESTING=0 | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y \ | ||
nlohmann-json-dev \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
WORKDIR $OVERLAY_WS | ||
|
||
COPY . $OVERLAY_WS/src/fastdds_monitor_tutorial | ||
|
||
RUN . $UNDERLAY_WS/install/setup.sh && \ | ||
. /usr/bin/ros_setup.bash && \ | ||
colcon build --cmake-args -DBUILD_TESTING=0 && \ | ||
cp $OVERLAY_WS/install/fastdds_monitor_tutorial/lib/fastdds_monitor_tutorial/fastdds_monitor $OVERLAY_WS/ | ||
|
||
ENTRYPOINT ["/bin/bash", "-c", ". /main_ws/overlay_ws/install/setup.bash && ros2 run fastdds_monitor_tutorial fastdds_monitor"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
repositories: | ||
# foonathan_memory_vendor: | ||
# type: git | ||
# url: https://github.com/eProsima/foonathan_memory_vendor.git | ||
# version: v1.3.0 | ||
# fastcdr: | ||
# type: git | ||
# url: https://github.com/eProsima/Fast-CDR.git | ||
# version: v1.0.27 | ||
# fastdds: | ||
# type: git | ||
# url: https://github.com/eProsima/Fast-DDS.git | ||
# version: v2.10.1 | ||
fastdds_statistics_backend: | ||
type: git | ||
url: https://github.com/eProsima/Fast-DDS-statistics-backend.git | ||
version: v0.10.0 | ||
fastddsgen: | ||
type: git | ||
url: https://github.com/eProsima/Fast-DDS-Gen.git | ||
version: v2.4.0 | ||
fastddsgen/thirdparty/idl-parser: | ||
type: git | ||
url: https://github.com/eProsima/IDL-Parser.git | ||
version: v1.5.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0"?> | ||
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?> | ||
<package format="3"> | ||
<name>fastdds_monitor_tutorial</name> | ||
<version>0.0.0</version> | ||
<description>First application as a ROS 2 package to monitor your ROS 2 deployment.</description> | ||
<maintainer email="irenebandera@eprosima.com">Irene Bandera</maintainer> | ||
<maintainer email="raul@eprosima.com">Raul Sanchez-Mateos Lizano</maintainer> | ||
<license>Apache License, Version 2.0</license> | ||
|
||
<buildtool_depend>ament_cmake</buildtool_depend> | ||
|
||
<depend>fastcdr</depend> | ||
<depend>fastrtps</depend> | ||
<depend>fastdds_statistics_backend</depend> | ||
|
||
<export> | ||
<build_type>ament_cmake</build_type> | ||
</export> | ||
</package> |
Oops, something went wrong.