forked from freefloating-gazebo/freefloating_gazebo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
56 lines (45 loc) · 1.89 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
cmake_minimum_required(VERSION 2.8.3)
project(freefloating_gazebo)
find_package(catkin REQUIRED COMPONENTS
gazebo_ros
urdf
control_toolbox
rostime
message_generation
)
find_package(gazebo REQUIRED)
find_package(Eigen3)
add_message_files(
FILES
BodySetpoint.msg
)
# build messages
generate_messages(
DEPENDENCIES geometry_msgs
)
catkin_package(
INCLUDE_DIRS include
LIBRARIES ${PROJECT_NAME}
DEPENDS
gazebo_ros
control_toolbox
rostime
)
link_directories(${GAZEBO_LIBRARY_DIRS})
include_directories(include ${Boost_INCLUDE_DIR} ${catkin_INCLUDE_DIRS} ${GAZEBO_INCLUDE_DIRS} ${EIGEN3_INCLUDE_DIRS})
add_definitions(${EIGEN3_DEFINITIONS})
# world plugin to simulate buoyancy and viscous force
add_library(freefloating_gazebo_fluid src/freefloating_gazebo_fluid.cpp include/freefloating_gazebo/freefloating_gazebo_fluid.h)
target_link_libraries(freefloating_gazebo_fluid ${catkin_LIBRARIES} ${GAZEBO_LIBRARIES})
add_dependencies(freefloating_gazebo_fluid freefloating_gazebo_generate_messages_cpp)
# model plugin subscribes to body and joint efforts and applies them in Gazebo
add_library(freefloating_gazebo_control src/freefloating_gazebo_control.cpp include/freefloating_gazebo/freefloating_gazebo_control.h)
target_link_libraries(freefloating_gazebo_control ${catkin_LIBRARIES} ${GAZEBO_LIBRARIES})
add_dependencies(freefloating_gazebo_control freefloating_gazebo_generate_messages_cpp)
# node to perform PID control for body (thrusters) and joints
add_executable(pid_control src/freefloating_pids_main.cpp
src/freefloating_pids.cpp include/freefloating_gazebo/freefloating_pids.h
src/freefloating_pids_body.cpp include/freefloating_gazebo/freefloating_pids_body.h
src/freefloating_pids_joint.cpp include/freefloating_gazebo/freefloating_pids_joint.h)
target_link_libraries(pid_control ${catkin_LIBRARIES})
add_dependencies(pid_control freefloating_gazebo_generate_messages_cpp)