Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
Levi-Armstrong committed Oct 11, 2020
1 parent 728f71e commit f318228
Show file tree
Hide file tree
Showing 227 changed files with 2,175 additions and 699 deletions.
14 changes: 3 additions & 11 deletions tesseract/tesseract/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@ add_code_coverage_all_targets(EXCLUDE ${COVERAGE_EXCLUDE})
# Load variable for clang tidy args, compiler options and cxx version
tesseract_variables()

include(GenerateExportHeader)

# Create target
add_library(${PROJECT_NAME} src/tesseract.cpp src/manipulator_manager.cpp)
target_generate_export_header(${PROJECT_NAME})
target_process_export(${PROJECT_NAME})
target_link_libraries(${PROJECT_NAME} PUBLIC
tesseract::tesseract_urdf
tesseract::tesseract_scene_graph
Expand All @@ -44,20 +42,14 @@ target_clang_tidy(${PROJECT_NAME} ARGUMENTS ${TESSERACT_CLANG_TIDY_ARGS} ENABLE
target_cxx_version(${PROJECT_NAME} PUBLIC VERSION ${TESSERACT_CXX_VERSION})
target_code_coverage(${PROJECT_NAME} ALL EXCLUDE ${COVERAGE_EXCLUDE} ENABLE ${TESSERACT_ENABLE_TESTING})
target_include_directories(${PROJECT_NAME} PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include;${CMAKE_CURRENT_BINARY_DIR}>"
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:include>")
target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC
${Boost_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIRS}
$<TARGET_PROPERTY:tesseract::tesseract_common,INTERFACE_INCLUDE_DIRECTORIES>) #tesseract::tesseract_common Due to bug in catkin, there is an open PR
${EIGEN3_INCLUDE_DIRS})

configure_package(NAMESPACE tesseract TARGETS ${PROJECT_NAME})

install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}_export.h
DESTINATION include/${PROJECT_NAME}
)

# Mark cpp header files for installation
install(DIRECTORY include/${PROJECT_NAME}
DESTINATION include
Expand Down
4 changes: 2 additions & 2 deletions tesseract/tesseract/include/tesseract/manipulator_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ TESSERACT_COMMON_IGNORE_WARNINGS_POP
#include <tesseract_environment/core/environment.h>
#include <tesseract_kinematics/core/forward_kinematics_factory.h>
#include <tesseract_kinematics/core/inverse_kinematics_factory.h>
#include <tesseract/tesseract_export.h>
#include <tesseract/visibility_control.h>

namespace tesseract
{
class TESSERACT_EXPORT ManipulatorManager
class TESSERACT_PUBLIC ManipulatorManager
{
public:
using Ptr = std::shared_ptr<ManipulatorManager>;
Expand Down
4 changes: 2 additions & 2 deletions tesseract/tesseract/include/tesseract/tesseract.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ TESSERACT_COMMON_IGNORE_WARNINGS_POP
#include <tesseract_scene_graph/resource_locator.h>
#include <tesseract/manipulator_manager.h>
#include <tesseract_command_language/manipulator_info.h>
#include <tesseract/tesseract_export.h>
#include <tesseract/visibility_control.h>

namespace tesseract
{
Expand All @@ -60,7 +60,7 @@ using FindTCPCallbackFn = std::function<Eigen::Isometry3d(const tesseract_planni
* It also provides several construction methods for loading from urdf, srdf
*
*/
class TESSERACT_EXPORT Tesseract
class TESSERACT_PUBLIC Tesseract
{
public:
using Ptr = std::shared_ptr<Tesseract>;
Expand Down
4 changes: 2 additions & 2 deletions tesseract/tesseract/include/tesseract/tesseract_init_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ TESSERACT_COMMON_IGNORE_WARNINGS_POP
#include <tesseract_scene_graph/resource_locator.h>
#include <tesseract_scene_graph/graph.h>
#include <tesseract_scene_graph/srdf_model.h>
#include <tesseract/tesseract_export.h>
#include <tesseract/visibility_control.h>

namespace tesseract
{
Expand All @@ -57,7 +57,7 @@ enum class TesseractInitType
Note: Recreating a Tesseract does not guarantee that it is identical to the Tesseract associate with this construction
info since the kinmeatics managers could have changed and it does not include the environment command history. This will
simply recreate the Tesseract as it was at construction. */
struct TESSERACT_EXPORT TesseractInitInfo
struct TESSERACT_PUBLIC TesseractInitInfo
{
using Ptr = std::shared_ptr<TesseractInitInfo>;
using ConstPtr = std::shared_ptr<const TesseractInitInfo>;
Expand Down
61 changes: 61 additions & 0 deletions tesseract/tesseract/include/tesseract/visibility_control.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
// Copyright 2015 Open Source Robotics Foundation, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/* This header must be included by all descartes headers which declare symbols
* which are defined in the descartes library. When not building the descartes
* library, i.e. when using the headers in other package's code, the contents
* of this header change the visibility of certain symbols which the descartes
* library cannot have, but the consuming code must have inorder to link.
*/
#ifndef TESSERACT_VISIBILITY_CONTROL_H
#define TESSERACT_VISIBILITY_CONTROL_H

// This logic was borrowed (then namespaced) from the examples on the gcc wiki:
// https://gcc.gnu.org/wiki/Visibility

// clang-format off
#if defined _WIN32 || defined __CYGWIN__
#ifdef __GNUC__
#define TESSERACT_EXPORT __attribute__ ((dllexport))
#define TESSERACT_IMPORT __attribute__ ((dllimport))
#else
#define TESSERACT_EXPORT __declspec(dllexport)
#define TESSERACT_IMPORT __declspec(dllimport)
#endif
#ifndef TESSERACT_STATIC_LIBRARY
#ifdef TESSERACT_LIBRARY_SHARED
#define TESSERACT_PUBLIC TESSERACT_EXPORT
#else
#define TESSERACT_PUBLIC TESSERACT_IMPORT
#endif
#else
#define TESSERACT_PUBLIC
#endif
#define TESSERACT_PUBLIC_TYPE TESSERACT_PUBLIC
#define TESSERACT_LOCAL
#else
#define TESSERACT_EXPORT __attribute__ ((visibility("default")))
#define TESSERACT_IMPORT
#if __GNUC__ >= 4
#define TESSERACT_PUBLIC __attribute__ ((visibility("default")))
#define TESSERACT_LOCAL __attribute__ ((visibility("hidden")))
#else
#define TESSERACT_PUBLIC
#define TESSERACT_LOCAL
#endif
#define TESSERACT_PUBLIC_TYPE
#endif
// clang-format on

#endif // TESSERACT_VISIBILITY_CONTROL_H
19 changes: 5 additions & 14 deletions tesseract/tesseract_collision/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,9 @@ add_code_coverage_all_targets(EXCLUDE ${COVERAGE_EXCLUDE})
# Load variable for clang tidy args, compiler options and cxx version
tesseract_variables()

include(GenerateExportHeader)

# Create interface for core
add_library(${PROJECT_NAME}_core INTERFACE)
target_process_export(${PROJECT_NAME}_core INTERFACE)
target_link_libraries(${PROJECT_NAME}_core INTERFACE tesseract::tesseract_common tesseract::tesseract_geometry PkgConfig::bullet ${Boost_LIBRARIES})
target_compile_options(${PROJECT_NAME}_core INTERFACE ${TESSERACT_COMPILE_OPTIONS})
target_compile_definitions(${PROJECT_NAME}_core INTERFACE ${TESSERACT_COMPILE_DEFINITIONS})
Expand All @@ -70,15 +69,15 @@ add_library(${PROJECT_NAME}_bullet
src/bullet/tesseract_convex_convex_algorithm.cpp
src/bullet/tesseract_gjk_pair_detector.cpp
)
target_generate_export_header(${PROJECT_NAME}_bullet)
target_process_export(${PROJECT_NAME}_bullet)
target_link_libraries(${PROJECT_NAME}_bullet PUBLIC ${PROJECT_NAME}_core tesseract::tesseract_geometry PkgConfig::bullet console_bridge octomap octomath)
target_compile_options(${PROJECT_NAME}_bullet PRIVATE ${TESSERACT_COMPILE_OPTIONS})
target_compile_definitions(${PROJECT_NAME}_bullet PUBLIC ${TESSERACT_COMPILE_DEFINITIONS})
target_clang_tidy(${PROJECT_NAME}_bullet ARGUMENTS ${TESSERACT_CLANG_TIDY_ARGS} ENABLE ${TESSERACT_ENABLE_CLANG_TIDY})
target_cxx_version(${PROJECT_NAME}_bullet PUBLIC VERSION ${TESSERACT_CXX_VERSION})
target_code_coverage(${PROJECT_NAME}_bullet ALL EXCLUDE ${COVERAGE_EXCLUDE} ENABLE ${TESSERACT_ENABLE_TESTING})
target_include_directories(${PROJECT_NAME}_bullet PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include;${CMAKE_CURRENT_BINARY_DIR}>"
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:include>")
target_include_directories(${PROJECT_NAME}_bullet SYSTEM PUBLIC
${EIGEN3_INCLUDE_DIRS}
Expand All @@ -89,15 +88,15 @@ add_library(${PROJECT_NAME}_fcl
src/fcl/fcl_discrete_managers.cpp
src/fcl/fcl_utils.cpp
src/fcl/fcl_collision_object_wrapper.cpp)
target_generate_export_header(${PROJECT_NAME}_fcl)
target_process_export(${PROJECT_NAME}_fcl)
target_link_libraries(${PROJECT_NAME}_fcl PUBLIC ${PROJECT_NAME}_core tesseract::tesseract_geometry PkgConfig::bullet console_bridge octomap octomath fcl)
target_compile_options(${PROJECT_NAME}_fcl PRIVATE ${TESSERACT_COMPILE_OPTIONS})
target_compile_definitions(${PROJECT_NAME}_fcl PUBLIC ${TESSERACT_COMPILE_DEFINITIONS})
target_clang_tidy(${PROJECT_NAME}_fcl ARGUMENTS ${TESSERACT_CLANG_TIDY_ARGS} ENABLE ${TESSERACT_ENABLE_CLANG_TIDY})
target_cxx_version(${PROJECT_NAME}_fcl PUBLIC VERSION ${TESSERACT_CXX_VERSION})
target_code_coverage(${PROJECT_NAME}_fcl ALL EXCLUDE ${COVERAGE_EXCLUDE} ENABLE ${TESSERACT_ENABLE_TESTING})
target_include_directories(${PROJECT_NAME}_fcl PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include;${CMAKE_CURRENT_BINARY_DIR}>"
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:include>")
target_include_directories(${PROJECT_NAME}_fcl SYSTEM PUBLIC
${EIGEN3_INCLUDE_DIRS}
Expand Down Expand Up @@ -145,14 +144,6 @@ target_include_directories(${PROJECT_NAME}_test_suite_benchmarks SYSTEM INTERFAC

configure_package(NAMESPACE tesseract TARGETS ${PROJECT_NAME}_core ${PROJECT_NAME}_bullet ${PROJECT_NAME}_fcl ${PROJECT_NAME}_test_suite ${PROJECT_NAME}_test_suite_benchmarks create_convex_hull)

# Install export headers
install(
FILES
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}_fcl_export.h
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}_bullet_export.h
DESTINATION include/${PROJECT_NAME}
)

# Mark cpp header files for installation
install(DIRECTORY include/${PROJECT_NAME}
DESTINATION include
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@
#include <tesseract_collision/bullet/bullet_utils.h>
#include <tesseract_collision/core/continuous_contact_manager.h>
#include <tesseract_collision/bullet/tesseract_collision_configuration.h>
#include <tesseract_collision/tesseract_collision_bullet_export.h>
#include <tesseract_collision/bullet/visibility_control.h>

namespace tesseract_collision
{
namespace tesseract_collision_bullet
{
/** @brief A BVH implementaiton of a tesseract contact manager */
class TESSERACT_COLLISION_BULLET_EXPORT BulletCastBVHManager : public ContinuousContactManager
class TESSERACT_COLLISION_BULLET_PUBLIC BulletCastBVHManager : public ContinuousContactManager
{
public:
using Ptr = std::shared_ptr<BulletCastBVHManager>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@
#include <tesseract_collision/bullet/bullet_utils.h>
#include <tesseract_collision/core/continuous_contact_manager.h>
#include <tesseract_collision/bullet/tesseract_collision_configuration.h>
#include <tesseract_collision/tesseract_collision_bullet_export.h>
#include <tesseract_collision/bullet/visibility_control.h>

namespace tesseract_collision
{
namespace tesseract_collision_bullet
{
/** @brief A simple implementaiton of a tesseract manager which does not use BHV */
class TESSERACT_COLLISION_BULLET_EXPORT BulletCastSimpleManager : public ContinuousContactManager
class TESSERACT_COLLISION_BULLET_PUBLIC BulletCastSimpleManager : public ContinuousContactManager
{
public:
using Ptr = std::shared_ptr<BulletCastSimpleManager>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@
#include <tesseract_collision/bullet/bullet_utils.h>
#include <tesseract_collision/core/discrete_contact_manager.h>
#include <tesseract_collision/bullet/tesseract_collision_configuration.h>
#include <tesseract_collision/tesseract_collision_bullet_export.h>
#include <tesseract_collision/bullet/visibility_control.h>

namespace tesseract_collision
{
namespace tesseract_collision_bullet
{
/** @brief A BVH implementaiton of a bullet manager */
class TESSERACT_COLLISION_BULLET_EXPORT BulletDiscreteBVHManager : public DiscreteContactManager
class TESSERACT_COLLISION_BULLET_PUBLIC BulletDiscreteBVHManager : public DiscreteContactManager
{
public:
using Ptr = std::shared_ptr<BulletDiscreteBVHManager>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@
#include <tesseract_collision/bullet/bullet_utils.h>
#include <tesseract_collision/core/discrete_contact_manager.h>
#include <tesseract_collision/bullet/tesseract_collision_configuration.h>
#include <tesseract_collision/tesseract_collision_bullet_export.h>
#include <tesseract_collision/bullet/visibility_control.h>

namespace tesseract_collision
{
namespace tesseract_collision_bullet
{
/** @brief A simple implementaiton of a bullet manager which does not use BHV */
class TESSERACT_COLLISION_BULLET_EXPORT BulletDiscreteSimpleManager : public DiscreteContactManager
class TESSERACT_COLLISION_BULLET_PUBLIC BulletDiscreteSimpleManager : public DiscreteContactManager
{
public:
using Ptr = std::shared_ptr<BulletDiscreteSimpleManager>;
Expand Down
Loading

0 comments on commit f318228

Please sign in to comment.