From 3f2380ef04c39fbad17e14217552a58f815639cc Mon Sep 17 00:00:00 2001 From: Alexandre Vannobel <41082816+alexvannobel@users.noreply.github.com> Date: Fri, 10 May 2019 07:56:41 -0400 Subject: [PATCH] Make Protobuf installation optional Changed the build.sh script to keep the google include folder, changed the CMakeLists.txt and the readme to make protobuf installation optional --- build.sh | 9 +-------- kortex_actuator_driver/CMakeLists.txt | 1 + kortex_device_manager/CMakeLists.txt | 1 + kortex_driver/CMakeLists.txt | 1 + kortex_vision_config_driver/CMakeLists.txt | 1 + readme.md | 13 +++++++------ 6 files changed, 12 insertions(+), 14 deletions(-) diff --git a/build.sh b/build.sh index 98e0ce5b..a965fb89 100755 --- a/build.sh +++ b/build.sh @@ -23,14 +23,7 @@ if [ "${RESULT}" -ne 0 ]; then exit $? fi -rm -r kortex_api/cpp/linux_gcc_x86-64/include/ src/ros_kortex/kortex_api/include/google/ -RESULT=$? -if [ "${RESULT}" -ne 0 ]; then - echo "ERROR while deleting unused include folder. code = ${RESULT}" - exit $? -fi - -cp -R kortex_api/cpp/linux_gcc_x86-64/lib/release/ src/ros_kortex/kortex_api/lib/ +cp -R kortex_api/cpp/linux_gcc_x86-64/lib/ src/ros_kortex/kortex_api/lib/ RESULT=$? if [ "${RESULT}" -ne 0 ]; then echo "ERROR while copying the kortex api library. code = ${RESULT}" diff --git a/kortex_actuator_driver/CMakeLists.txt b/kortex_actuator_driver/CMakeLists.txt index ba91bc50..0bc7c872 100644 --- a/kortex_actuator_driver/CMakeLists.txt +++ b/kortex_actuator_driver/CMakeLists.txt @@ -24,6 +24,7 @@ catkin_package() include_directories(include ${catkin_INCLUDE_DIRS}) include_directories(include ${PROJECT_SOURCE_DIR}/src) +include_directories(include ${PROJECT_SOURCE_DIR}/../kortex_api/include) include_directories(include ${PROJECT_SOURCE_DIR}/../kortex_api/include/client) include_directories(include ${PROJECT_SOURCE_DIR}/../kortex_api/include/client_stubs) include_directories(include ${PROJECT_SOURCE_DIR}/../kortex_api/include/messages) diff --git a/kortex_device_manager/CMakeLists.txt b/kortex_device_manager/CMakeLists.txt index 877ad4a8..3629e59c 100644 --- a/kortex_device_manager/CMakeLists.txt +++ b/kortex_device_manager/CMakeLists.txt @@ -23,6 +23,7 @@ catkin_package() include_directories(include ${catkin_INCLUDE_DIRS}) include_directories(include ${PROJECT_SOURCE_DIR}/src) +include_directories(include ${PROJECT_SOURCE_DIR}/../kortex_api/include) include_directories(include ${PROJECT_SOURCE_DIR}/../kortex_api/include/client) include_directories(include ${PROJECT_SOURCE_DIR}/../kortex_api/include/client_stubs) include_directories(include ${PROJECT_SOURCE_DIR}/../kortex_api/include/messages) diff --git a/kortex_driver/CMakeLists.txt b/kortex_driver/CMakeLists.txt index 31f1c4c0..dfa90f8a 100644 --- a/kortex_driver/CMakeLists.txt +++ b/kortex_driver/CMakeLists.txt @@ -24,6 +24,7 @@ catkin_package() include_directories(include ${catkin_INCLUDE_DIRS}) include_directories(include ${PROJECT_SOURCE_DIR}/src) +include_directories(include ${PROJECT_SOURCE_DIR}/../kortex_api/include) include_directories(include ${PROJECT_SOURCE_DIR}/../kortex_api/include/client) include_directories(include ${PROJECT_SOURCE_DIR}/../kortex_api/include/client_stubs) include_directories(include ${PROJECT_SOURCE_DIR}/../kortex_api/include/messages) diff --git a/kortex_vision_config_driver/CMakeLists.txt b/kortex_vision_config_driver/CMakeLists.txt index 2a387f48..5e9e60d5 100644 --- a/kortex_vision_config_driver/CMakeLists.txt +++ b/kortex_vision_config_driver/CMakeLists.txt @@ -24,6 +24,7 @@ catkin_package() include_directories(include ${catkin_INCLUDE_DIRS}) include_directories(include ${PROJECT_SOURCE_DIR}/src) +include_directories(include ${PROJECT_SOURCE_DIR}/../kortex_api/include) include_directories(include ${PROJECT_SOURCE_DIR}/../kortex_api/include/client) include_directories(include ${PROJECT_SOURCE_DIR}/../kortex_api/include/client_stubs) include_directories(include ${PROJECT_SOURCE_DIR}/../kortex_api/include/messages) diff --git a/readme.md b/readme.md index 20ce32fa..8d73d602 100644 --- a/readme.md +++ b/readme.md @@ -50,11 +50,6 @@ This package contains the URDF and the STL of a complete Gen3 robot. A more deta This package contains all the header files and the libraries required by the Kortex C++ API. A more detailed [description](kortex_api/readme.md) can be found in the package subdirectory. ## Setup -### Install protobuf -The protobuf compiler is required if you need to re-generate the original package code. - -1. git clone https://github.com/protocolbuffers/protobuf --branch 3.5.1.1 (you must use this specific version) -2. Follow these [instructions](https://github.com/protocolbuffers/protobuf/blob/master/src/README.md) to build and install protobuf and its compiler. ### Download the API and extract it to the kortex_api/include and kortex_api/lib folders The build.sh script automates this process. To launch it, go to the root of your catkin_workspace and execute : @@ -63,7 +58,13 @@ This will download the API, unzip it to the right folder and build the project w You can also download and unzip the API manually by following these [instructions](kortex_api/readme.md). -## kortex_gazebo +### Install protobuf [OPTIONAL] +The protobuf compiler is not required if you want to use the package as is, but is required if you need to [re-generate](./generate_all.sh) the .MSG, .SRV and auto-generated Kortex-ROS C++ wrapper files. + +1. git clone https://github.com/protocolbuffers/protobuf --branch 3.5.1.1 (you must use this specific version) +2. Follow these [instructions](https://github.com/protocolbuffers/protobuf/blob/master/src/README.md) to build and install protobuf and its compiler. + +## kortex gazebo This package is not completed yet but will be available in a future version. ## kortex_moveit_config