Open cretaceous-creature opened 8 years ago
Please paste result of git diff --ignore-space-change
2016年6月16日木曜日、Chennotifications@github.comさんは書きました:
Refer to Issue #86 https://github.com/start-jsk/jsk_mbzirc/issues/86 [jsk_mbzirc_${files changed}] fix: TX1 problem. Description
- [jsk_mbzirc_common/CMakeLists.txt] fix:
- check if gazebo is available, if not, ignore then.
- [jsk_mbzirc_tasks/CMakeLists.txt] Add feature XXXXXX
- check if gazebo is available, if not, ignore then().
… TX1
You can view, comment on, or merge this pull request online at:
https://github.com/start-jsk/jsk_mbzirc/pull/87 Commit Summary
- As TX1 dont support gazebo, change CMakeLists to build the package in TX1
File Changes
- M jsk_mbzirc_common/CMakeLists.txt https://github.com/start-jsk/jsk_mbzirc/pull/87/files#diff-0 (101)
- M jsk_mbzirc_tasks/CMakeLists.txt https://github.com/start-jsk/jsk_mbzirc/pull/87/files#diff-1 (7)
Patch Links:
- https://github.com/start-jsk/jsk_mbzirc/pull/87.patch
- https://github.com/start-jsk/jsk_mbzirc/pull/87.diff
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/start-jsk/jsk_mbzirc/pull/87, or mute the thread https://github.com/notifications/unsubscribe/AAeG3CK89FKElqUplqUMAD2qvP27C37-ks5qMTu_gaJpZM4I3UFm .
◉ Kei Okada
diff --git a/jsk_mbzirc_common/CMakeLists.txt b/jsk_mbzirc_common/CMakeLists.txt index 74b8d1c..0653a81 100644 --- a/jsk_mbzirc_common/CMakeLists.txt +++ b/jsk_mbzirc_common/CMakeLists.txt @@ -4,54 +4,62 @@ project(jsk_mbzirc_common)
-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)
-################################### -## catkin specific configuration ## -################################### -catkin_package(
-# build plugins -include_directories(include ${Boost_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS} ${GAZE
-add_library(mbzirc_gazebo_truck_plugin src/mbzirc_gazebo_truck_plugin.cpp) -target_link_libraries(mbzirc_gazebo_truck_plugin ${GAZEBO_LIBRARIES} ${catkin_L
-add_library(mbzirc_gazebo_panel_plugin src/mbzirc_gazebo_panel_plugin.cpp) -target_link_libraries(mbzirc_gazebo_panel_plugin ${GAZEBO_LIBRARIES} ${catkin_L
-add_library(mbzirc_gazebo_treasure_plugin src/mbzirc_gazebo_treasure_plugin.cpp -target_link_libraries(mbzirc_gazebo_treasure_plugin ${GAZEBO_LIBRARIES} ${catki
-add_library(mbzirc_gazebo_uav_collision_rule_plugin src/mbzirc_gazebo_uav_colli -target_link_libraries(mbzirc_gazebo_uav_collision_rule_plugin ${GAZEBO_LIBRARIE
-############# -## Install ## -############# -install(TARGETS
-install(DIRECTORY launch gazebo_model
-############# -## Testing ## -############# -if(CATKIN_ENABLE_TESTING)
-find_package(catkin REQUIRED COMPONENTS roscpp gazebo_ros) +find_package(catkin REQUIRED COMPONENTS roscpp)
-find_package(gazebo REQUIRED) +find_package(gazebo_ros QUIET) +if(gazebo_ros_FOUND)
Please merge if no problem.
Please use three backquote for better formatting http://qiita.com/Qiita/items/c686397e4a0f4f11683d
You have to use web interface to get better style layout
'''which part? the git diff output?'''
diff --git a/jsk_mbzirc_common/CMakeLists.txt b/jsk_mbzirc_common/CMakeLists.txt
index 74b8d1c..0653a81 100644
--- a/jsk_mbzirc_common/CMakeLists.txt
+++ b/jsk_mbzirc_common/CMakeLists.txt
@@ -4,54 +4,62 @@ 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)
-###################################
-## catkin specific configuration ##
-###################################
-catkin_package(
+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_DEPENDS
-)
+)
-# build plugins
-include_directories(include ${Boost_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS} ${GAZE
+# build plugins
+include_directories(include ${Boost_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS} ${GA
-add_library(mbzirc_gazebo_truck_plugin src/mbzirc_gazebo_truck_plugin.cpp)
-target_link_libraries(mbzirc_gazebo_truck_plugin ${GAZEBO_LIBRARIES} ${catkin_L
+add_library(mbzirc_gazebo_truck_plugin src/mbzirc_gazebo_truck_plugin.cpp)
+target_link_libraries(mbzirc_gazebo_truck_plugin ${GAZEBO_LIBRARIES} ${catkin
-add_library(mbzirc_gazebo_panel_plugin src/mbzirc_gazebo_panel_plugin.cpp)
-target_link_libraries(mbzirc_gazebo_panel_plugin ${GAZEBO_LIBRARIES} ${catkin_L
+add_library(mbzirc_gazebo_panel_plugin src/mbzirc_gazebo_panel_plugin.cpp)
+target_link_libraries(mbzirc_gazebo_panel_plugin ${GAZEBO_LIBRARIES} ${catkin
-add_library(mbzirc_gazebo_treasure_plugin src/mbzirc_gazebo_treasure_plugin.cpp
-target_link_libraries(mbzirc_gazebo_treasure_plugin ${GAZEBO_LIBRARIES} ${catki
+add_library(mbzirc_gazebo_treasure_plugin src/mbzirc_gazebo_treasure_plugin.c
+target_link_libraries(mbzirc_gazebo_treasure_plugin ${GAZEBO_LIBRARIES} ${cat
-add_library(mbzirc_gazebo_uav_collision_rule_plugin src/mbzirc_gazebo_uav_colli
-target_link_libraries(mbzirc_gazebo_uav_collision_rule_plugin ${GAZEBO_LIBRARIE
+add_library(mbzirc_gazebo_uav_collision_rule_plugin src/mbzirc_gazebo_uav_col
+target_link_libraries(mbzirc_gazebo_uav_collision_rule_plugin ${GAZEBO_LIBRAR
-#############
-## Install ##
-#############
-install(TARGETS
+#############
+## Install ##
+#############
+install(TARGETS
mbzirc_gazebo_truck_plugin mbzirc_gazebo_panel_plugin mbzirc_gazebo_treasur
mbzirc_gazebo_uav_collision_rule_plugin
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
)
-install(DIRECTORY launch gazebo_model
+install(DIRECTORY launch gazebo_model
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
USE_SOURCE_PERMISSIONS)
-#############
-## Testing ##
-#############
-if(CATKIN_ENABLE_TESTING)
+#############
+## Testing ##
+#############
+if(CATKIN_ENABLE_TESTING)
find_package(rostest REQUIRED)
find_package(roslaunch REQUIRED)
find_package(roslint REQUIRED)
@@ -62,4 +70,5 @@ if(CATKIN_ENABLE_TESTING)
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()
\ No newline at end of file
diff --git a/jsk_mbzirc_tasks/CMakeLists.txt b/jsk_mbzirc_tasks/CMakeLists.txt
index 8228503..beabf08 100644
--- a/jsk_mbzirc_tasks/CMakeLists.txt
+++b/jsk_mbzirc_tasks/CMakeLists.txt
@@ -4,10 +4,13 @@ project(jsk_mbzirc_tasks)
''' also the CMakeLists in jsk_mbzirc_tasks..''' ''' like this?'''
-find_package(catkin REQUIRED COMPONENTS roscpp gazebo_ros)
+find_package(catkin REQUIRED COMPONENTS roscpp)
-find_package(gazebo REQUIRED)
+find_package(gazebo_ros QUIET)
+if(gazebo_ros_FOUND)
+find_package(gazebo REQUIRED)
+endif()
You fail to compile? Try update the jsk_mbzirc_common CMakeLists in this PR
Finally, I confirmed the correct result in another TX1 board as follows:
ubuntu@tegra-ubuntu:~/ros/jsk_mbzirc$ catkin build
--------------------------------------------------------------------------
Profile: default
Extending: [cached] /home/ubuntu/ros/uav_ws/devel:/opt/ros/indigo
Workspace: /home/ubuntu/ros/jsk_mbzirc
--------------------------------------------------------------------------
Source Space: [exists] /home/ubuntu/ros/jsk_mbzirc/src
Log Space: [exists] /home/ubuntu/ros/jsk_mbzirc/logs
Build Space: [exists] /home/ubuntu/ros/jsk_mbzirc/build
Devel Space: [exists] /home/ubuntu/ros/jsk_mbzirc/devel
Install Space: [unused] /home/ubuntu/ros/jsk_mbzirc/install
DESTDIR: [unused] None
--------------------------------------------------------------------------
Devel Space Layout: linked
Install Space Layout: None
--------------------------------------------------------------------------
Additional CMake Args: None
Additional Make Args: None
Additional catkin Make Args: None
Internal Make Job Server: True
Cache Job Environments: False
--------------------------------------------------------------------------
Whitelisted Packages: None
Blacklisted Packages: None
--------------------------------------------------------------------------
Workspace configuration appears valid.
--------------------------------------------------------------------------
[build] Found '5' packages in 0.0 seconds.
[build] Package table is up to date.
Starting >>> husky_gazebo
Starting >>> jsk_mbzirc_common
_________________________________________________________________________________________________________________________________________________________________________
Warnings << jsk_mbzirc_common:cmake /home/ubuntu/ros/jsk_mbzirc/logs/jsk_mbzirc_common/build.cmake.002.log
CMake Warning at /home/ubuntu/ros/jsk_mbzirc/src/jsk_mbzirc/jsk_mbzirc_common/CMakeLists.txt:11 (message):
gazebo_ros IS NOT FOUND, so copmile jsk_mbzirc_common
without gazebo
cd /home/ubuntu/ros/jsk_mbzirc/build/jsk_mbzirc_common; catkin build --get-env jsk_mbzirc_common | catkin env -si /usr/bin/cmake /home/ubuntu/ros/jsk_mbzirc/src/jsk_mbzirc/jsk_mbzirc_common --no-warn-unused-cli -DCATKIN_DEVEL_PREFIX=/home/ubuntu/ros/jsk_mbzirc/devel/.private/jsk_mbzirc_common -DCMAKE_INSTALL_PREFIX=/home/ubuntu/ros/jsk_mbzirc/install; cd -
.........................................................................................................................................................................
Finished <<< husky_gazebo [ 0.1 seconds ]
Finished <<< jsk_mbzirc_common [ 0.5 seconds ]
Starting >>> jsk_mbzirc_tasks
Finished <<< jsk_mbzirc_tasks [ 9.2 seconds ]
[build] Summary: All 3 packages succeeded!
[build] Ignored: 2 packages were skipped or are blacklisted.
[build] Warnings: 1 packages succeeded with warnings.
[build] Abandoned: None.
[build] Failed: None.
[build] Runtime: 10.8 seconds total.
[build] Note: Workspace packages have changed, please re-source setup files to use them.
🤔🤔🤔
2016-06-16 22:36 GMT+08:00 趙 漠居 notifications@github.com:
Finally, I confirmed the correct result in another TX1 board as follows:
ubuntu@tegra-ubuntu:~/ros/jsk_mbzirc$ catkin build
Profile: default Extending: [cached] /home/ubuntu/ros/uav_ws/devel:/opt/ros/indigo
Workspace: /home/ubuntu/ros/jsk_mbzirc
Source Space: [exists] /home/ubuntu/ros/jsk_mbzirc/src Log Space: [exists] /home/ubuntu/ros/jsk_mbzirc/logs Build Space: [exists] /home/ubuntu/ros/jsk_mbzirc/build Devel Space: [exists] /home/ubuntu/ros/jsk_mbzirc/devel Install Space: [unused] /home/ubuntu/ros/jsk_mbzirc/install
DESTDIR: [unused] None
Devel Space Layout: linked
Install Space Layout: None
Additional CMake Args: None Additional Make Args: None Additional catkin Make Args: None Internal Make Job Server: True
Cache Job Environments: False
Whitelisted Packages: None
Blacklisted Packages: None
Workspace configuration appears valid.
[build] Found '5' packages in 0.0 seconds. [build] Package table is up to date. Starting >>> husky_gazebo Starting >>> jsk_mbzirc_common
Warnings << jsk_mbzirc_common:cmake /home/ubuntu/ros/jsk_mbzirc/logs/jsk_mbzirc_common/build.cmake.002.log CMake Warning at /home/ubuntu/ros/jsk_mbzirc/src/jsk_mbzirc/jsk_mbzirc_common/CMakeLists.txt:11 (message): gazebo_ros IS NOT FOUND, so copmile jsk_mbzirc_common
without gazebo
cd /home/ubuntu/ros/jsk_mbzirc/build/jsk_mbzirc_common; catkin build --get-env jsk_mbzirc_common | catkin env -si /usr/bin/cmake /home/ubuntu/ros/jsk_mbzirc/src/jsk_mbzirc/jsk_mbzirc_common --no-warn-unused-cli -DCATKIN_DEVEL_PREFIX=/home/ubuntu/ros/jsk_mbzirc/devel/.private/jsk_mbzirc_common -DCMAKE_INSTALL_PREFIX=/home/ubuntu/ros/jsk_mbzirc/install; cd - ......................................................................................................................................................................... Finished <<< husky_gazebo [ 0.1 seconds ] Finished <<< jsk_mbzirc_common [ 0.5 seconds ] Starting >>> jsk_mbzirc_tasks Finished <<< jsk_mbzirc_tasks [ 9.2 seconds ] [build] Summary: All 3 packages succeeded! [build] Ignored: 2 packages were skipped or are blacklisted. [build] Warnings: 1 packages succeeded with warnings. [build] Abandoned: None. [build] Failed: None. [build] Runtime: 10.8 seconds total. [build] Note: Workspace packages have changed, please re-source setup files to use them.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/start-jsk/jsk_mbzirc/pull/87#issuecomment-226504421, or mute the thread https://github.com/notifications/unsubscribe/AIjRmVqT-h3rIfmCr3ngNG6LojvduSG2ks5qMV9wgaJpZM4I3UFm .
gazebo_ros depens gazebo, so you do not need this, please check other parts too
-find_package(gazebo REQUIRED)
+find_package(gazebo_ros QUIET)
+if(gazebo_ros_FOUND)
+find_package(gazebo REQUIRED)
+endif()
sorry in order to let travis pass, I merged #88 PR, Should I revert...
Refer to Issue #86 [jskmbzirc${files changed}] fix: TX1 problem.
Description
… TX1