From 85390c0d4d4ee42d1e15c837c968e399ea43c5da Mon Sep 17 00:00:00 2001 From: Sem van der Hoeven Date: Mon, 24 Apr 2023 12:47:15 +0000 Subject: [PATCH] add height sensor files --- src/height/CMakeLists.txt | 45 ++++++++++++++++++++++++++++++++ src/height/package.xml | 20 ++++++++++++++ src/height/src/height_reader.cpp | 10 +++++++ 3 files changed, 75 insertions(+) create mode 100644 src/height/CMakeLists.txt create mode 100644 src/height/package.xml create mode 100644 src/height/src/height_reader.cpp diff --git a/src/height/CMakeLists.txt b/src/height/CMakeLists.txt new file mode 100644 index 00000000..96011584 --- /dev/null +++ b/src/height/CMakeLists.txt @@ -0,0 +1,45 @@ +cmake_minimum_required(VERSION 3.5) +project(height) + +# Default to C99 +if(NOT CMAKE_C_STANDARD) + set(CMAKE_C_STANDARD 99) +endif() + +# Default to C++14 +if(NOT CMAKE_CXX_STANDARD) + set(CMAKE_CXX_STANDARD 14) +endif() + +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(rclcpp REQUIRED) + +add_executable(height_reader src/height_reader.cpp) +target_include_directories(height_reader PUBLIC + $ + $) +ament_target_dependencies( + height_reader + "rclcpp" +) + +install(TARGETS height_reader + DESTINATION lib/${PROJECT_NAME}) + +if(BUILD_TESTING) + find_package(ament_lint_auto REQUIRED) + # the following line skips the linter which checks for copyrights + # uncomment the line when a copyright and license is not present in all source files + #set(ament_cmake_copyright_FOUND TRUE) + # the following line skips cpplint (only works in a git repo) + # uncomment the line when this package is not in a git repo + #set(ament_cmake_cpplint_FOUND TRUE) + ament_lint_auto_find_test_dependencies() +endif() + +ament_package() diff --git a/src/height/package.xml b/src/height/package.xml new file mode 100644 index 00000000..78221ce1 --- /dev/null +++ b/src/height/package.xml @@ -0,0 +1,20 @@ + + + + height + 0.0.0 + TODO: Package description + ubuntu + TODO: License declaration + + ament_cmake + + rclcpp + + ament_lint_auto + ament_lint_common + + + ament_cmake + + diff --git a/src/height/src/height_reader.cpp b/src/height/src/height_reader.cpp new file mode 100644 index 00000000..6b157114 --- /dev/null +++ b/src/height/src/height_reader.cpp @@ -0,0 +1,10 @@ +#include + +int main(int argc, char ** argv) +{ + (void) argc; + (void) argv; + + printf("hello world height package\n"); + return 0; +}