Skip to content

Commit

Permalink
Created beluga_tutorial package #305
Browse files Browse the repository at this point in the history
  • Loading branch information
Alondruck committed Mar 25, 2024
1 parent 143e1ae commit 46c0dfe
Show file tree
Hide file tree
Showing 4 changed files with 101 additions and 0 deletions.
37 changes: 37 additions & 0 deletions beluga_tutorial/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Copyright 2024 Ekumen, Inc.
#
# 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.16)

project(beluga_tutorial)

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

if(NOT CMAKE_BUILD_TYPE)
message(STATUS "Setting build type to 'Release' as none was specified.")
set(CMAKE_BUILD_TYPE
"Release"
CACHE STRING "Build type" FORCE)
endif()

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(
-Wall
-Wconversion
-Wextra
-Werror
-Wpedantic)
endif()

include(cmake/ament.cmake)
30 changes: 30 additions & 0 deletions beluga_tutorial/cmake/ament.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Copyright 2024 Ekumen, Inc.
#
# 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.

set(executable_name ${PROJECT_NAME}_main)

add_executable(${executable_name}
src/main.cpp
)

install(TARGETS ${executable_name}
RUNTIME DESTINATION lib/${PROJECT_NAME}
)

install(DIRECTORY include/ DESTINATION include/${PROJECT_NAME})

if(BUILD_TESTING)
# enable_testing()
# add_subdirectory(test)
endif()
23 changes: 23 additions & 0 deletions beluga_tutorial/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?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>beluga_tutorial</name>
<version>1.0.0</version>

<description>Tutorial to interface with Beluga.</description>

<maintainer email="glpuga@ekumenlabs.com">Gerardo Puga</maintainer>
<maintainer email="michel@ekumenlabs.com">Michel Hidalgo</maintainer>
<maintainer email="nespinosa@ekumenlabs.com">Nahuel Espinosa</maintainer>
<maintainer email="alon.druck@ekumenlabs.com">Alon Druck</maintainer>

<license>Apache License 2.0</license>

<buildtool_depend>cmake</buildtool_depend>

<depend>beluga</depend>

<export>
<build_type>cmake</build_type>
</export>
</package>
11 changes: 11 additions & 0 deletions beluga_tutorial/src/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// https://github.com/Ekumen-OS/beluga/issues/279#issuecomment-1903914387

#include <iostream>
#include <string>

int main()
{
std::cout << "beluga tutorial - main.cpp executed!!" << std::endl;

return 0;
}

0 comments on commit 46c0dfe

Please sign in to comment.