Skip to content

Commit

Permalink
Add srv folder and VehicleCommand.srv service
Browse files Browse the repository at this point in the history
Signed-off-by: Beniamino Pozzan <beniamino.pozzan@gmail.com>
  • Loading branch information
beniaminopozzan committed Nov 14, 2023
1 parent 40d885e commit 5d713f8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
10 changes: 6 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@ find_package(rosidl_default_generators REQUIRED)
set(MSGS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/msg")
file(GLOB PX4_MSGS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${MSGS_DIR}/*.msg")

file(GLOB ROS_MSG_DIR_LIST "${MSGS_DIR}/*.msg")

set(ROS_MSG_DIR_LIST "${ROS_MSG_DIR_LIST}" CACHE INTERNAL "ROS_MSG_DIR_LIST")
# get all srv files
set(SRVS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/srv")
file(GLOB PX4_SRVS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${SRVS_DIR}/*.srv")

# Generate introspection typesupport for C and C++ and IDL files
rosidl_generate_interfaces(${PROJECT_NAME} ${PX4_MSGS}
rosidl_generate_interfaces(${PROJECT_NAME}
${PX4_MSGS}
${PX4_SRVS}
DEPENDENCIES builtin_interfaces
ADD_LINTER_TESTS
)
Expand Down
3 changes: 3 additions & 0 deletions srv/VehicleCommand.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
VehicleCommand request
---
VehicleCommandAck reply

0 comments on commit 5d713f8

Please sign in to comment.