From a41cf43545bd37298e9529d60f51093653780372 Mon Sep 17 00:00:00 2001 From: sebastianHi Date: Fri, 13 Jun 2025 13:59:11 +0200 Subject: [PATCH] added ros2 wrapper for compiled monitor to be called ros2 run ... --- rtlola_node/CMakeLists.txt | 28 ++++++++++++++++++++++++++++ rtlola_node/package.xml | 18 ++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 rtlola_node/CMakeLists.txt create mode 100644 rtlola_node/package.xml diff --git a/rtlola_node/CMakeLists.txt b/rtlola_node/CMakeLists.txt new file mode 100644 index 0000000..e2ea54b --- /dev/null +++ b/rtlola_node/CMakeLists.txt @@ -0,0 +1,28 @@ +# SPDX-FileCopyrightText: 2023 German Aerospace Center (DLR) +# SPDX-License-Identifier: Apache-2.0 +cmake_minimum_required(VERSION 3.5) +project(rtlola_node) + +find_package(ament_cmake REQUIRED) + +set(MONITOR_EXECUTABLE ${CMAKE_CURRENT_SOURCE_DIR}/../monitor/target/release/rtlola_ros2_monitor) +if(EXISTS ${MONITOR_EXECUTABLE}) + install( + PROGRAMS + ${MONITOR_EXECUTABLE} + DESTINATION lib/${PROJECT_NAME} + ) +else() + set(MONITOR_EXECUTABLE ${CMAKE_CURRENT_SOURCE_DIR}/../monitor/target/debug/rtlola_ros2_monitor) + if(EXISTS ${MONITOR_EXECUTABLE}) + install( + PROGRAMS + ${MONITOR_EXECUTABLE} + DESTINATION lib/${PROJECT_NAME} + ) + else() + message(FATAL_ERROR "Executable not found: ${MONITOR_EXECUTABLE}. Did you run 'cargo build'?") + endif() +endif() + +ament_package() diff --git a/rtlola_node/package.xml b/rtlola_node/package.xml new file mode 100644 index 0000000..ed7285f --- /dev/null +++ b/rtlola_node/package.xml @@ -0,0 +1,18 @@ + + + + + + rtlola_node + 0.0.0 + Wrapper for compiled monitor allows to call ros2 run + root + Apache-2.0 + + ament_cmake + + + + ament_cmake + +