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 <[email protected]>
  • Loading branch information
beniaminopozzan committed Nov 4, 2023
1 parent af99aa3 commit dec469d
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 dec469d

Please sign in to comment.