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

Conversation

cretaceous-creature
Copy link
Collaborator

@cretaceous-creature cretaceous-creature commented Jun 16, 2016

Refer to Issue #86
[jsk_mbzirc_${files changed}] fix: TX1 problem.

Description

  • [jsk_mbzirc_common/CMakeLists.txt] fix: TX1
    • check if gazebo is available, if not, ignore then.
  • [jsk_mbzirc_tasks/CMakeLists.txt]
    • check if gazebo is available, if not, ignore then().

… TX1

@k-okada
Copy link
Member

k-okada commented Jun 16, 2016

Please paste result of
git diff --ignore-space-change

2016年6月16日木曜日、[email protected]さんは書きました:

Refer to Issue #86 #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:

#87
Commit Summary

  • As TX1 dont support gazebo, change CMakeLists to build the package
    in TX1

File Changes

Patch Links:


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#87, or mute the thread
https://github.com/notifications/unsubscribe/AAeG3CK89FKElqUplqUMAD2qvP27C37-ks5qMTu_gaJpZM4I3UFm
.

◉ Kei Okada

@cretaceous-creature
Copy link
Collaborator Author

cretaceous-creature commented Jun 16, 2016

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)

-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()

@cretaceous-creature
Copy link
Collaborator Author

Please merge if no problem.

@k-okada
Copy link
Member

k-okada commented Jun 16, 2016

Please use three backquote for better formatting
http://qiita.com/Qiita/items/c686397e4a0f4f11683d

@k-okada
Copy link
Member

k-okada commented Jun 16, 2016

You have to use web interface to get better style layout

@cretaceous-creature
Copy link
Collaborator Author

cretaceous-creature commented Jun 16, 2016

'''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()

@cretaceous-creature
Copy link
Collaborator Author

You fail to compile?
Try update the jsk_mbzirc_common CMakeLists in this PR

@tongtybj
Copy link
Member

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.

@cretaceous-creature
Copy link
Collaborator Author

🤔🤔🤔

2016-06-16 22:36 GMT+08:00 趙 漠居 [email protected]:

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
#87 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AIjRmVqT-h3rIfmCr3ngNG6LojvduSG2ks5qMV9wgaJpZM4I3UFm
.

@k-okada
Copy link
Member

k-okada commented Jun 16, 2016

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()

@cretaceous-creature
Copy link
Collaborator Author

sorry in order to let travis pass, I merged #88 PR,
Should I revert...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants