From afa39deec5178a6f530a64de9ea1337b64d1a291 Mon Sep 17 00:00:00 2001 From: Alex Henning Date: Mon, 21 Jul 2014 11:22:52 -0400 Subject: [PATCH] Fixed installation of frc_gazebo_plugins and a few minor fixes. Change-Id: I1cb30acb69526455469ad890dfee8edd42958a5d --- .hgignore | 13 ------------- simulation/frc_gazebo_plugins/Makefile | 5 +++++ simulation/frc_gazebo_plugins/clock/CMakeLists.txt | 8 ++++---- .../frc_gazebo_plugins/dc_motor/CMakeLists.txt | 8 ++++---- .../frc_gazebo_plugins/encoder/CMakeLists.txt | 8 ++++---- .../frc_gazebo_plugins/frc_gazebo_plugins.doxy | 8 ++++---- simulation/frc_gazebo_plugins/gyro/CMakeLists.txt | 8 ++++---- .../frc_gazebo_plugins/limit_switch/CMakeLists.txt | 8 ++++---- simulation/frc_gazebo_plugins/msgs/CMakeLists.txt | 2 +- .../pneumatic_piston/CMakeLists.txt | 8 ++++---- .../pneumatic_piston/src/pneumatic_piston.cpp | 2 +- .../frc_gazebo_plugins/potentiometer/CMakeLists.txt | 8 ++++---- .../frc_gazebo_plugins/rangefinder/CMakeLists.txt | 8 ++++---- 13 files changed, 43 insertions(+), 51 deletions(-) delete mode 100644 .hgignore diff --git a/.hgignore b/.hgignore deleted file mode 100644 index 1ae5e257d1..0000000000 --- a/.hgignore +++ /dev/null @@ -1,13 +0,0 @@ -syntax: re -^\.hgignore$ -.*/target(?:/|$) -.*/dist(?:/|$) -eclipse-plugins/.*/bin(?:/|$) - -syntax: glob -wpilibc/build/ -hal/build/ -networktables/cpp/build/ -build/ -networktables/OutlineViewer/nbproject/private -*~ diff --git a/simulation/frc_gazebo_plugins/Makefile b/simulation/frc_gazebo_plugins/Makefile index d74071b112..cd8fcda2d3 100644 --- a/simulation/frc_gazebo_plugins/Makefile +++ b/simulation/frc_gazebo_plugins/Makefile @@ -20,6 +20,7 @@ build: copy-plugins: mkdir -p plugins + cp msgs/build/libgz_msgs.so plugins cp dc_motor/build/libgz_dc_motor.so plugins cp pneumatic_piston/build/libgz_pneumatic_piston.so plugins cp potentiometer/build/libgz_potentiometer.so plugins @@ -41,6 +42,10 @@ clean: clean-docs cd clock && make clean -rm -r plugins +install: all + mkdir -p $(DESTDIR)$(plugin.dir) + install plugins/* $(DESTDIR)$(plugin.dir) + docs: doxygen frc_gazebo_plugins.doxy diff --git a/simulation/frc_gazebo_plugins/clock/CMakeLists.txt b/simulation/frc_gazebo_plugins/clock/CMakeLists.txt index 457dfe0b89..4872c99eb4 100644 --- a/simulation/frc_gazebo_plugins/clock/CMakeLists.txt +++ b/simulation/frc_gazebo_plugins/clock/CMakeLists.txt @@ -7,11 +7,11 @@ if (PKG_CONFIG_FOUND) endif() find_package(gazebo REQUIRED) +find_library(GZ_MSGS libgz_msgs.so ../msgs/build) file(GLOB_RECURSE SRC_FILES src/*.cpp) -file(GLOB_RECURSE MSG_FILES ../msgs/src/*.cc) include_directories(src ${Boost_INCLUDE_DIR} ${GAZEBO_INCLUDE_DIRS} ../msgs/src) -add_library(${PROJECT_NAME} SHARED ${SRC_FILES} ${MSG_FILES}) +add_library(${PROJECT_NAME} SHARED ${SRC_FILES}) -link_directories(${GAZEBO_LIBRARY_DIRS} ../msgs/build) -target_link_libraries(${PROJECT_NAME} ${GAZEBO_LIBRARIES}) \ No newline at end of file +link_directories(${GAZEBO_LIBRARY_DIRS} ../msgs/build/) +target_link_libraries(${PROJECT_NAME} ${GZ_MSGS} ${GAZEBO_LIBRARIES}) diff --git a/simulation/frc_gazebo_plugins/dc_motor/CMakeLists.txt b/simulation/frc_gazebo_plugins/dc_motor/CMakeLists.txt index 4d7db20478..c985f93fcd 100644 --- a/simulation/frc_gazebo_plugins/dc_motor/CMakeLists.txt +++ b/simulation/frc_gazebo_plugins/dc_motor/CMakeLists.txt @@ -7,11 +7,11 @@ if (PKG_CONFIG_FOUND) endif() find_package(gazebo REQUIRED) +find_library(GZ_MSGS libgz_msgs.so ../msgs/build) file(GLOB_RECURSE SRC_FILES src/*.cpp) -file(GLOB_RECURSE MSG_FILES ../msgs/src/*.cc) include_directories(src ${Boost_INCLUDE_DIR} ${GAZEBO_INCLUDE_DIRS} ../msgs/src) -add_library(${PROJECT_NAME} SHARED ${SRC_FILES} ${MSG_FILES}) +add_library(${PROJECT_NAME} SHARED ${SRC_FILES}) -link_directories(${GAZEBO_LIBRARY_DIRS} ../msgs/build) -target_link_libraries(${PROJECT_NAME} ${GAZEBO_LIBRARIES}) \ No newline at end of file +link_directories(${GAZEBO_LIBRARY_DIRS} ../msgs/build/) +target_link_libraries(${PROJECT_NAME} ${GZ_MSGS} ${GAZEBO_LIBRARIES}) diff --git a/simulation/frc_gazebo_plugins/encoder/CMakeLists.txt b/simulation/frc_gazebo_plugins/encoder/CMakeLists.txt index 270d3a2102..707bb7ce98 100644 --- a/simulation/frc_gazebo_plugins/encoder/CMakeLists.txt +++ b/simulation/frc_gazebo_plugins/encoder/CMakeLists.txt @@ -7,11 +7,11 @@ if (PKG_CONFIG_FOUND) endif() find_package(gazebo REQUIRED) +find_library(GZ_MSGS libgz_msgs.so ../msgs/build) file(GLOB_RECURSE SRC_FILES src/*.cpp) -file(GLOB_RECURSE MSG_FILES ../msgs/src/*.cc) include_directories(src ${Boost_INCLUDE_DIR} ${GAZEBO_INCLUDE_DIRS} ../msgs/src) -add_library(${PROJECT_NAME} SHARED ${SRC_FILES} ${MSG_FILES}) +add_library(${PROJECT_NAME} SHARED ${SRC_FILES}) -link_directories(${GAZEBO_LIBRARY_DIRS} ../msgs/build) -target_link_libraries(${PROJECT_NAME} ${GAZEBO_LIBRARIES}) \ No newline at end of file +link_directories(${GAZEBO_LIBRARY_DIRS} ../msgs/build/) +target_link_libraries(${PROJECT_NAME} ${GZ_MSGS} ${GAZEBO_LIBRARIES}) diff --git a/simulation/frc_gazebo_plugins/frc_gazebo_plugins.doxy b/simulation/frc_gazebo_plugins/frc_gazebo_plugins.doxy index eebb3ec6a3..b8912497eb 100644 --- a/simulation/frc_gazebo_plugins/frc_gazebo_plugins.doxy +++ b/simulation/frc_gazebo_plugins/frc_gazebo_plugins.doxy @@ -144,7 +144,7 @@ FULL_PATH_NAMES = YES # will be relative from the directory where doxygen is started. # This tag requires that the tag FULL_PATH_NAMES is set to YES. -STRIP_FROM_PATH = +STRIP_FROM_PATH = # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the # path mentioned in the documentation of a class, which tells the reader which @@ -234,7 +234,7 @@ TCL_SUBST = # members will be omitted, etc. # The default value is: NO. -OPTIMIZE_OUTPUT_FOR_C = YES +OPTIMIZE_OUTPUT_FOR_C = NO # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or # Python sources only. Doxygen will then generate output that is more tailored @@ -1335,7 +1335,7 @@ ECLIPSE_DOC_ID = org.doxygen.Project # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. -DISABLE_INDEX = NO +DISABLE_INDEX = YES # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index # structure should be generated to display hierarchical information. If the tag @@ -1352,7 +1352,7 @@ DISABLE_INDEX = NO # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. -GENERATE_TREEVIEW = NO +GENERATE_TREEVIEW = YES # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that # doxygen will group on one line in the generated HTML documentation. diff --git a/simulation/frc_gazebo_plugins/gyro/CMakeLists.txt b/simulation/frc_gazebo_plugins/gyro/CMakeLists.txt index aca482a89e..2c3a15e89a 100644 --- a/simulation/frc_gazebo_plugins/gyro/CMakeLists.txt +++ b/simulation/frc_gazebo_plugins/gyro/CMakeLists.txt @@ -7,11 +7,11 @@ if (PKG_CONFIG_FOUND) endif() find_package(gazebo REQUIRED) +find_library(GZ_MSGS libgz_msgs.so ../msgs/build) file(GLOB_RECURSE SRC_FILES src/*.cpp) -file(GLOB_RECURSE MSG_FILES ../msgs/src/*.cc) include_directories(src ${Boost_INCLUDE_DIR} ${GAZEBO_INCLUDE_DIRS} ../msgs/src) -add_library(${PROJECT_NAME} SHARED ${SRC_FILES} ${MSG_FILES}) +add_library(${PROJECT_NAME} SHARED ${SRC_FILES}) -link_directories(${GAZEBO_LIBRARY_DIRS} ../msgs/build) -target_link_libraries(${PROJECT_NAME} ${GAZEBO_LIBRARIES}) \ No newline at end of file +link_directories(${GAZEBO_LIBRARY_DIRS} ../msgs/build/) +target_link_libraries(${PROJECT_NAME} ${GZ_MSGS} ${GAZEBO_LIBRARIES}) diff --git a/simulation/frc_gazebo_plugins/limit_switch/CMakeLists.txt b/simulation/frc_gazebo_plugins/limit_switch/CMakeLists.txt index ecf39aa0c6..4935744ee8 100644 --- a/simulation/frc_gazebo_plugins/limit_switch/CMakeLists.txt +++ b/simulation/frc_gazebo_plugins/limit_switch/CMakeLists.txt @@ -7,11 +7,11 @@ if (PKG_CONFIG_FOUND) endif() find_package(gazebo REQUIRED) +find_library(GZ_MSGS libgz_msgs.so ../msgs/build) file(GLOB_RECURSE SRC_FILES src/*.cpp) -file(GLOB_RECURSE MSG_FILES ../msgs/src/*.cc) include_directories(src ${Boost_INCLUDE_DIR} ${GAZEBO_INCLUDE_DIRS} ../msgs/src) -add_library(${PROJECT_NAME} SHARED ${SRC_FILES} ${MSG_FILES}) +add_library(${PROJECT_NAME} SHARED ${SRC_FILES}) -link_directories(${GAZEBO_LIBRARY_DIRS} ../msgs/build) -target_link_libraries(${PROJECT_NAME} ${GAZEBO_LIBRARIES}) \ No newline at end of file +link_directories(${GAZEBO_LIBRARY_DIRS} ../msgs/build/) +target_link_libraries(${PROJECT_NAME} ${GZ_MSGS} ${GAZEBO_LIBRARIES}) diff --git a/simulation/frc_gazebo_plugins/msgs/CMakeLists.txt b/simulation/frc_gazebo_plugins/msgs/CMakeLists.txt index 75926bddf0..b03c4dca99 100644 --- a/simulation/frc_gazebo_plugins/msgs/CMakeLists.txt +++ b/simulation/frc_gazebo_plugins/msgs/CMakeLists.txt @@ -13,4 +13,4 @@ include_directories(src ${Boost_INCLUDE_DIR} ${GAZEBO_INCLUDE_DIRS}) add_library(${PROJECT_NAME} SHARED ${SRC_FILES}) link_directories(${GAZEBO_LIBRARY_DIRS}) -target_link_libraries(${PROJECT_NAME} ${GAZEBO_LIBRARIES}) \ No newline at end of file +target_link_libraries(${PROJECT_NAME} ${GAZEBO_LIBRARIES}) diff --git a/simulation/frc_gazebo_plugins/pneumatic_piston/CMakeLists.txt b/simulation/frc_gazebo_plugins/pneumatic_piston/CMakeLists.txt index bee32a9adc..f4b6206952 100644 --- a/simulation/frc_gazebo_plugins/pneumatic_piston/CMakeLists.txt +++ b/simulation/frc_gazebo_plugins/pneumatic_piston/CMakeLists.txt @@ -7,11 +7,11 @@ if (PKG_CONFIG_FOUND) endif() find_package(gazebo REQUIRED) +find_library(GZ_MSGS libgz_msgs.so ../msgs/build) file(GLOB_RECURSE SRC_FILES src/*.cpp) -file(GLOB_RECURSE MSG_FILES ../msgs/src/*.cc) include_directories(src ${Boost_INCLUDE_DIR} ${GAZEBO_INCLUDE_DIRS} ../msgs/src) -add_library(${PROJECT_NAME} SHARED ${SRC_FILES} ${MSG_FILES}) +add_library(${PROJECT_NAME} SHARED ${SRC_FILES}) -link_directories(${GAZEBO_LIBRARY_DIRS} ../msgs/build) -target_link_libraries(${PROJECT_NAME} ${GAZEBO_LIBRARIES}) \ No newline at end of file +link_directories(${GAZEBO_LIBRARY_DIRS} ../msgs/build/) +target_link_libraries(${PROJECT_NAME} ${GZ_MSGS} ${GAZEBO_LIBRARIES}) diff --git a/simulation/frc_gazebo_plugins/pneumatic_piston/src/pneumatic_piston.cpp b/simulation/frc_gazebo_plugins/pneumatic_piston/src/pneumatic_piston.cpp index 682a2e68bd..b865d26901 100644 --- a/simulation/frc_gazebo_plugins/pneumatic_piston/src/pneumatic_piston.cpp +++ b/simulation/frc_gazebo_plugins/pneumatic_piston/src/pneumatic_piston.cpp @@ -22,7 +22,7 @@ void PneumaticPiston::Load(physics::ModelPtr model, sdf::ElementPtr sdf) { } forward_force = sdf->Get("forward-force"); - reverse_force = -sdf->Get("reverse-force"); + reverse_force = sdf->Get("reverse-force"); if (sdf->HasElement("direction") && sdf->Get("direction") == "reversed") { forward_force = -forward_force; diff --git a/simulation/frc_gazebo_plugins/potentiometer/CMakeLists.txt b/simulation/frc_gazebo_plugins/potentiometer/CMakeLists.txt index a3f630a0a4..a62b006275 100644 --- a/simulation/frc_gazebo_plugins/potentiometer/CMakeLists.txt +++ b/simulation/frc_gazebo_plugins/potentiometer/CMakeLists.txt @@ -7,11 +7,11 @@ if (PKG_CONFIG_FOUND) endif() find_package(gazebo REQUIRED) +find_library(GZ_MSGS libgz_msgs.so ../msgs/build) file(GLOB_RECURSE SRC_FILES src/*.cpp) -file(GLOB_RECURSE MSG_FILES ../msgs/src/*.cc) include_directories(src ${Boost_INCLUDE_DIR} ${GAZEBO_INCLUDE_DIRS} ../msgs/src) -add_library(${PROJECT_NAME} SHARED ${SRC_FILES} ${MSG_FILES}) +add_library(${PROJECT_NAME} SHARED ${SRC_FILES}) -link_directories(${GAZEBO_LIBRARY_DIRS} ../msgs/build) -target_link_libraries(${PROJECT_NAME} ${GAZEBO_LIBRARIES}) \ No newline at end of file +link_directories(${GAZEBO_LIBRARY_DIRS} ../msgs/build/) +target_link_libraries(${PROJECT_NAME} ${GZ_MSGS} ${GAZEBO_LIBRARIES}) diff --git a/simulation/frc_gazebo_plugins/rangefinder/CMakeLists.txt b/simulation/frc_gazebo_plugins/rangefinder/CMakeLists.txt index 60bcd53873..38b95ad06e 100644 --- a/simulation/frc_gazebo_plugins/rangefinder/CMakeLists.txt +++ b/simulation/frc_gazebo_plugins/rangefinder/CMakeLists.txt @@ -7,11 +7,11 @@ if (PKG_CONFIG_FOUND) endif() find_package(gazebo REQUIRED) +find_library(GZ_MSGS libgz_msgs.so ../msgs/build) file(GLOB_RECURSE SRC_FILES src/*.cpp) -file(GLOB_RECURSE MSG_FILES ../msgs/src/*.cc) include_directories(src ${Boost_INCLUDE_DIR} ${GAZEBO_INCLUDE_DIRS} ../msgs/src) -add_library(${PROJECT_NAME} SHARED ${SRC_FILES} ${MSG_FILES}) +add_library(${PROJECT_NAME} SHARED ${SRC_FILES}) -link_directories(${GAZEBO_LIBRARY_DIRS} ../msgs/build) -target_link_libraries(${PROJECT_NAME} ${GAZEBO_LIBRARIES}) \ No newline at end of file +link_directories(${GAZEBO_LIBRARY_DIRS} ../msgs/build/) +target_link_libraries(${PROJECT_NAME} ${GZ_MSGS} ${GAZEBO_LIBRARIES})