Skip to content

Commit

Permalink
Created base structure for littlebot_hardware_communication class
Browse files Browse the repository at this point in the history
  • Loading branch information
NestorDP committed Dec 11, 2024
1 parent 7d5fcda commit 78e4c9f
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 40 deletions.
35 changes: 29 additions & 6 deletions littlebot_base/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,50 @@ find_package(controller_manager REQUIRED)
find_package(controller_manager_msgs REQUIRED)
find_package(hardware_interface REQUIRED)
find_package(pluginlib REQUIRED)
# find_package(Protobuf REQUIRED)

include_directories(include)

# Print some protobuf info (optional)
# message(STATUS "Using Protocol Buffers: ${Protobuf_VERSION}")
# message(STATUS "Protobuf include directory: ${Protobuf_INCLUDE_DIRS}")
# message(STATUS "Protobuf libraries: ${Protobuf_LIBRARIES}")

# Add your proto file
# set(PROTO_FILES
# src/littlebot_protocol.proto
# )

# Generate sources and headers from .proto
# protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS ${PROTO_FILES})

# Add include directories
# include_directories(
# ${Protobuf_INCLUDE_DIRS}
# ${CMAKE_CURRENT_BINARY_DIR} # This is where generated files will be
# )

# create ament index resource which references the libraries in the binary dir
set(node_plugins "")

# Hardware interface
add_library(littlebot_hardware SHARED
src/littlebot_hardware.cpp)
add_library(littlebot_hardware_component SHARED
src/littlebot_hardware_component.cpp
src/littlebot_hardware_communication.cpp
# ${PROTO_SRCS}
# ${PROTO_HDRS}
)

ament_target_dependencies( littlebot_hardware
ament_target_dependencies(littlebot_hardware_component
hardware_interface
pluginlib
rclcpp)

pluginlib_export_plugin_description_file(hardware_interface littlebot_hardware.xml)
pluginlib_export_plugin_description_file(hardware_interface littlebot_hardware_component.xml)

## INSTALL
install( TARGETS
littlebot_hardware
littlebot_hardware_component
LIBRARY DESTINATION lib
RUNTIME DESTINATION lib/${PROJECT_NAME}
)
Expand All @@ -60,7 +83,7 @@ ament_export_include_directories(
include
)
ament_export_libraries(
littlebot_hardware
littlebot_hardware_component
)
ament_export_dependencies(
hardware_interface
Expand Down
34 changes: 0 additions & 34 deletions littlebot_base/littlebot_hardware.xml

This file was deleted.

0 comments on commit 78e4c9f

Please sign in to comment.