This repository has been archived by the owner on Mar 23, 2024. It is now read-only.
-
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.
Refactor Repo into a ROS Package (#15)
* Create new ros package and execute Hello World * added gitignore to keep colcon build files out of repo * change gitignore to files
- Loading branch information
Showing
13 changed files
with
50 additions
and
153 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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
out/ | ||
diagnostics | ||
build/ | ||
install/ | ||
log/ |
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 |
---|---|---|
@@ -1,15 +1,24 @@ | ||
# Top level CMake file for entire Diagnostics app | ||
|
||
# Set CMake version and create project | ||
cmake_minimum_required(VERSION 3.22) | ||
cmake_minimum_required(VERSION 3.8) | ||
project(diagnostics) | ||
|
||
# Set C++ Standard | ||
set(CMAKE_CXX_STANDARD 20) | ||
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
add_compile_options(-Wall -Wextra -Wpedantic) | ||
endif() | ||
|
||
# Import rapidYaml | ||
# find dependencies | ||
find_package(ament_cmake REQUIRED) | ||
find_package(ryml REQUIRED) | ||
# uncomment the following section in order to fill in | ||
# further dependencies manually. | ||
# find_package(<dependency> REQUIRED) | ||
|
||
add_executable(diagnostics src/main/diagnostics.cpp) | ||
target_include_directories(diagnostics PUBLIC | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | ||
$<INSTALL_INTERFACE:include>) | ||
target_compile_features(diagnostics PUBLIC c_std_99 cxx_std_17) # Require C99 and C++17 | ||
|
||
install(TARGETS diagnostics | ||
DESTINATION lib/${PROJECT_NAME}) | ||
|
||
# Add source files | ||
add_subdirectory(config) | ||
add_subdirectory(src) | ||
ament_package() |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,18 @@ | ||
<?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>diagnostics</name> | ||
<version>0.0.0</version> | ||
<description>TODO: Package description</description> | ||
<maintainer email="[email protected]">ros</maintainer> | ||
<license>TODO: License declaration</license> | ||
|
||
<buildtool_depend>ament_cmake</buildtool_depend> | ||
|
||
<test_depend>ament_lint_auto</test_depend> | ||
<test_depend>ament_lint_common</test_depend> | ||
|
||
<export> | ||
<build_type>ament_cmake</build_type> | ||
</export> | ||
</package> |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,17 +0,0 @@ | ||
# Add main.exe | ||
add_executable(diagnostics main.cpp) | ||
|
||
# List of required header files | ||
target_include_directories(diagnostics PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) | ||
|
||
# Modules that main depends on | ||
# ex: target_link_libraries(SailbotDiagnostics_main PRIVATE module1 module2) | ||
target_link_libraries(diagnostics PRIVATE | ||
yaml | ||
ryml::ryml | ||
) | ||
|
||
# Import configuration file | ||
target_compile_definitions( | ||
diagnostics PUBLIC YAML_TEST_PATH="${YAML_TEST_PATH}" | ||
) | ||
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,10 @@ | ||
#include <cstdio> | ||
|
||
int main(int argc, char ** argv) | ||
{ | ||
(void)argc; | ||
(void)argv; | ||
|
||
printf("Welcome to UBC Sailbot diagnostics!\n"); | ||
return 0; | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.