Skip to content

Commit

Permalink
Added template files for tf republisher node with frame prefixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin-Oehler committed Jan 24, 2025
1 parent 692c9d5 commit ac87d05
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 0 deletions.
30 changes: 30 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,45 @@
cmake_minimum_required(VERSION 3.8)
project(hector_multi_robot_tools)

# Default to C++17
if (NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
endif ()

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

# Find necessary packages
find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(tf2_msgs REQUIRED)

# Register scripts hook
if (WIN32)
message(FATAL_ERROR "Windows is currently not supported.")
else()
ament_environment_hooks(env_hooks/50.scripts.bash.in)
endif()

include_directories(include)

# add prefix_tf_republisher_node library and executable
add_library(prefix_tf_republisher_node SHARED
include/${PROJECT_NAME}/prefix_tf_republisher_node.hpp
src/prefix_tf_republisher_node.cpp
)
ament_target_dependencies(prefix_tf_republisher_node PUBLIC rclcpp tf2_msgs)

add_executable(prefix_tf_republisher src/prefix_tf_republisher.cpp)
target_link_libraries(prefix_tf_republisher PUBLIC prefix_tf_republisher_node)

# Install library, executable and include folder
install(DIRECTORY include/ DESTINATION include)
install(TARGETS prefix_tf_republisher_node EXPORT ${PROJECT_NAME}-targets LIBRARY DESTINATION lib)
install(TARGETS prefix_tf_republisher DESTINATION lib/${PROJECT_NAME})

# Install directories
install(DIRECTORY
launch
Expand Down
Empty file.
Empty file added src/prefix_tf_republisher.cpp
Empty file.
9 changes: 9 additions & 0 deletions src/prefix_tf_republisher_node.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
int main( int argc, char **argv )
{
// rclcpp::init( argc, argv );
//
//
// rclcpp::spin( node );
// rclcpp::shutdown();
return 0;
}

0 comments on commit ac87d05

Please sign in to comment.