|
@@ -8,9 +8,12 @@ project(ros_test_pkg)
|
|
|
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
|
|
|
## is used, also find other catkin packages
|
|
|
find_package(catkin REQUIRED COMPONENTS
|
|
|
+ dynamic_reconfigure
|
|
|
roscpp
|
|
|
std_msgs
|
|
|
message_generation
|
|
|
+ actionlib
|
|
|
+ actionlib_msgs
|
|
|
)
|
|
|
|
|
|
## System dependencies are found with CMake's conventions
|
|
@@ -53,23 +56,22 @@ add_message_files(
|
|
|
)
|
|
|
|
|
|
## Generate services in the 'srv' folder
|
|
|
-# add_service_files(
|
|
|
-# FILES
|
|
|
-# Service1.srv
|
|
|
-# Service2.srv
|
|
|
-# )
|
|
|
+add_service_files(
|
|
|
+ FILES
|
|
|
+ mySrv.srv
|
|
|
+)
|
|
|
|
|
|
## Generate actions in the 'action' folder
|
|
|
-# add_action_files(
|
|
|
-# FILES
|
|
|
-# Action1.action
|
|
|
-# Action2.action
|
|
|
-# )
|
|
|
+add_action_files(
|
|
|
+ FILES
|
|
|
+ myAction.action
|
|
|
+)
|
|
|
|
|
|
## Generate added messages and services with any dependencies listed here
|
|
|
generate_messages(
|
|
|
DEPENDENCIES
|
|
|
std_msgs
|
|
|
+ actionlib_msgs
|
|
|
)
|
|
|
|
|
|
################################################
|
|
@@ -87,10 +89,9 @@ generate_messages(
|
|
|
## and list every .cfg file to be processed
|
|
|
|
|
|
## Generate dynamic reconfigure parameters in the 'cfg' folder
|
|
|
-# generate_dynamic_reconfigure_options(
|
|
|
-# cfg/DynReconf1.cfg
|
|
|
-# cfg/DynReconf2.cfg
|
|
|
-# )
|
|
|
+generate_dynamic_reconfigure_options(
|
|
|
+ cfg/dynamic.cfg
|
|
|
+)
|
|
|
|
|
|
###################################
|
|
|
## catkin specific configuration ##
|
|
@@ -136,6 +137,13 @@ include_directories(
|
|
|
add_executable(publish_node src/topic_publisher.cpp)
|
|
|
add_executable(subscribe_node src/topic_subscriber.cpp)
|
|
|
|
|
|
+add_executable(server_node src/server_node.cpp)
|
|
|
+add_executable(client_node src/client_node.cpp)
|
|
|
+
|
|
|
+add_executable(turtlesim_control_node src/control_turtle.cpp)
|
|
|
+
|
|
|
+add_executable(action_server src/action_server.cpp)
|
|
|
+add_executable(action_client src/action_client.cpp)
|
|
|
## Rename C++ executable without prefix
|
|
|
## The above recommended prefix causes long target names, the following renames the
|
|
|
## target back to the shorter version for ease of user use
|
|
@@ -144,9 +152,17 @@ add_executable(subscribe_node src/topic_subscriber.cpp)
|
|
|
|
|
|
## Add cmake target dependencies of the executable
|
|
|
## same as for the library above
|
|
|
-# add_dependencies(${PROJECT_NAME}_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
|
|
|
add_dependencies(publish_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
|
|
|
add_dependencies(subscribe_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
|
|
|
+
|
|
|
+add_dependencies(server_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
|
|
|
+add_dependencies(client_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
|
|
|
+
|
|
|
+add_dependencies(action_server ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
|
|
|
+add_dependencies(action_client ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
|
|
|
+
|
|
|
+add_dependencies(turtlesim_control_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
|
|
|
+
|
|
|
## Specify libraries to link a library or executable target against
|
|
|
target_link_libraries(publish_node
|
|
|
${catkin_LIBRARIES}
|
|
@@ -155,6 +171,23 @@ target_link_libraries(subscribe_node
|
|
|
${catkin_LIBRARIES}
|
|
|
)
|
|
|
|
|
|
+target_link_libraries(server_node
|
|
|
+ ${catkin_LIBRARIES}
|
|
|
+)
|
|
|
+target_link_libraries(client_node
|
|
|
+ ${catkin_LIBRARIES}
|
|
|
+)
|
|
|
+
|
|
|
+target_link_libraries(turtlesim_control_node
|
|
|
+ ${catkin_LIBRARIES}
|
|
|
+)
|
|
|
+
|
|
|
+target_link_libraries(action_server
|
|
|
+ ${catkin_LIBRARIES}
|
|
|
+)
|
|
|
+target_link_libraries(action_client
|
|
|
+ ${catkin_LIBRARIES}
|
|
|
+)
|
|
|
#############
|
|
|
## Install ##
|
|
|
#############
|