Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

As TX1 dont support gazebo, change CMakeLists to build the package in… #87

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 54 additions & 45 deletions jsk_mbzirc_common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,62 +4,71 @@ project(jsk_mbzirc_common)
## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS gazebo_ros std_msgs geometry_msgs)

find_package(gazebo_ros QUIET)

# Depend on system install of Gazebo and SDFormat
find_package(gazebo REQUIRED)
find_package(Boost REQUIRED COMPONENTS thread random)
if(NOT gazebo_ros_FOUND)
message(WARNING "gazebo_ros IS NOT FOUND, so copmile ${PROJECT_NAME}
without gazebo")
endif()

if(gazebo_ros_FOUND)

find_package(catkin REQUIRED COMPONENTS std_msgs geometry_msgs)
# Depend on system install of Gazebo and SDFormat
find_package(gazebo REQUIRED)
find_package(Boost REQUIRED COMPONENTS thread random)

###################################
## catkin specific configuration ##
###################################
catkin_package(
###################################
## catkin specific configuration ##
###################################
catkin_package(
CATKIN_DEPENDS
)
)

# build plugins
include_directories(include ${Boost_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS} ${GAZEBO_INCLUDE_DIRS})
# build plugins
include_directories(include ${Boost_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS} ${GAZEBO_INCLUDE_DIRS})

add_library(mbzirc_gazebo_truck_plugin src/mbzirc_gazebo_truck_plugin.cpp)
target_link_libraries(mbzirc_gazebo_truck_plugin ${GAZEBO_LIBRARIES} ${catkin_LIBRARIES} ${Boost_LIBRARIES})
add_library(mbzirc_gazebo_truck_plugin src/mbzirc_gazebo_truck_plugin.cpp)
target_link_libraries(mbzirc_gazebo_truck_plugin ${GAZEBO_LIBRARIES} ${catkin_LIBRARIES} ${Boost_LIBRARIES})

add_library(mbzirc_gazebo_panel_plugin src/mbzirc_gazebo_panel_plugin.cpp)
target_link_libraries(mbzirc_gazebo_panel_plugin ${GAZEBO_LIBRARIES} ${catkin_LIBRARIES} ${Boost_LIBRARIES})
add_library(mbzirc_gazebo_panel_plugin src/mbzirc_gazebo_panel_plugin.cpp)
target_link_libraries(mbzirc_gazebo_panel_plugin ${GAZEBO_LIBRARIES} ${catkin_LIBRARIES} ${Boost_LIBRARIES})

add_library(mbzirc_gazebo_treasure_plugin src/mbzirc_gazebo_treasure_plugin.cpp)
target_link_libraries(mbzirc_gazebo_treasure_plugin ${GAZEBO_LIBRARIES} ${catkin_LIBRARIES} ${Boost_LIBRARIES})
add_library(mbzirc_gazebo_treasure_plugin src/mbzirc_gazebo_treasure_plugin.cpp)
target_link_libraries(mbzirc_gazebo_treasure_plugin ${GAZEBO_LIBRARIES} ${catkin_LIBRARIES} ${Boost_LIBRARIES})

add_library(mbzirc_gazebo_uav_collision_rule_plugin src/mbzirc_gazebo_uav_collision_rule_plugin.cpp)
target_link_libraries(mbzirc_gazebo_uav_collision_rule_plugin ${GAZEBO_LIBRARIES} ${catkin_LIBRARIES} ${Boost_LIBRARIES})
add_library(mbzirc_gazebo_uav_collision_rule_plugin src/mbzirc_gazebo_uav_collision_rule_plugin.cpp)
target_link_libraries(mbzirc_gazebo_uav_collision_rule_plugin ${GAZEBO_LIBRARIES} ${catkin_LIBRARIES} ${Boost_LIBRARIES})

#############
## Install ##
#############
install(TARGETS
mbzirc_gazebo_truck_plugin mbzirc_gazebo_panel_plugin mbzirc_gazebo_treasure_plugin
mbzirc_gazebo_uav_collision_rule_plugin
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
)
#############
## Install ##
#############
install(TARGETS
mbzirc_gazebo_truck_plugin mbzirc_gazebo_panel_plugin mbzirc_gazebo_treasure_plugin
mbzirc_gazebo_uav_collision_rule_plugin
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
)

install(DIRECTORY launch gazebo_model
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
USE_SOURCE_PERMISSIONS)
install(DIRECTORY launch gazebo_model
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
USE_SOURCE_PERMISSIONS)


#############
## Testing ##
#############
if(CATKIN_ENABLE_TESTING)
find_package(rostest REQUIRED)
find_package(roslaunch REQUIRED)
find_package(roslint REQUIRED)
roslint_cpp()
roslint_python()
roslint_add_test()
roslaunch_add_file_check(launch/mbzirc_arena.launch)
roslaunch_add_file_check(launch/mbzirc_arena_1.launch)
roslaunch_add_file_check(launch/mbzirc_arena_2.launch)
roslaunch_add_file_check(launch/mbzirc_arena_3.launch)
#############
## Testing ##
#############
if(CATKIN_ENABLE_TESTING)
find_package(rostest REQUIRED)
find_package(roslaunch REQUIRED)
find_package(roslint REQUIRED)
roslint_cpp()
roslint_python()
roslint_add_test()
roslaunch_add_file_check(launch/mbzirc_arena.launch)
roslaunch_add_file_check(launch/mbzirc_arena_1.launch)
roslaunch_add_file_check(launch/mbzirc_arena_2.launch)
roslaunch_add_file_check(launch/mbzirc_arena_3.launch)
endif()
endif()
5 changes: 3 additions & 2 deletions jsk_mbzirc_tasks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ project(jsk_mbzirc_tasks)
## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS roscpp gazebo_ros)
find_package(catkin REQUIRED COMPONENTS roscpp)

# Depend on system install of Gazebo and SDFormat
find_package(gazebo REQUIRED)
find_package(gazebo_ros QUIET)


###################################
## catkin specific configuration ##
Expand Down
4 changes: 2 additions & 2 deletions mbzirc.rosinstall
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
# https://github.com/ros-simulation/gazebo_ros_pkgs/pull/460
- git:
local-name: gazebo_ros_pkgs
uri: https://github.com/furushchev/gazebo_ros_pkgs.git
version: fix-camera-util
uri: https://github.com/ros-simulation/gazebo_ros_pkgs.git
version: indigo-devel