Skip to content

Commit

Permalink
Add visibility control to all packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Levi-Armstrong committed Oct 8, 2020
1 parent cf27ce0 commit ed9e4e7
Show file tree
Hide file tree
Showing 221 changed files with 842 additions and 687 deletions.
6 changes: 5 additions & 1 deletion tesseract/tesseract/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
cmake_minimum_required(VERSION 3.5.0)
project(tesseract VERSION 0.1.0 LANGUAGES CXX)

set(CMAKE_CXX_VISIBILITY_PRESET hidden)
set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)

find_package(Boost COMPONENTS system REQUIRED)
find_package(console_bridge REQUIRED)
find_package(tesseract_scene_graph REQUIRED)
Expand All @@ -20,7 +23,7 @@ add_code_coverage_all_targets(EXCLUDE ${COVERAGE_EXCLUDE})
tesseract_variables()

# Create target
add_library(${PROJECT_NAME} SHARED src/tesseract.cpp src/manipulator_manager.cpp)
add_library(${PROJECT_NAME} src/tesseract.cpp src/manipulator_manager.cpp)
target_link_libraries(${PROJECT_NAME} PUBLIC
tesseract::tesseract_urdf
tesseract::tesseract_scene_graph
Expand All @@ -32,6 +35,7 @@ target_link_libraries(${PROJECT_NAME} PUBLIC
tesseract::tesseract_command_language
console_bridge)
target_compile_options(${PROJECT_NAME} PRIVATE ${TESSERACT_COMPILE_OPTIONS})
target_compile_definitions(${PROJECT_NAME} PUBLIC ${TESSERACT_COMPILE_DEFINITIONS})
target_clang_tidy(${PROJECT_NAME} ARGUMENTS ${TESSERACT_CLANG_TIDY_ARGS} ENABLE ${TESSERACT_ENABLE_CLANG_TIDY})
target_cxx_version(${PROJECT_NAME} PUBLIC VERSION ${TESSERACT_CXX_VERSION})
target_code_coverage(${PROJECT_NAME} ALL EXCLUDE ${COVERAGE_EXCLUDE} ENABLE ${TESSERACT_ENABLE_TESTING})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ TESSERACT_COMMON_IGNORE_WARNINGS_POP

namespace tesseract
{
class ManipulatorManager
class TESSERACT_PUBLIC ManipulatorManager
{
public:
using Ptr = std::shared_ptr<ManipulatorManager>;
Expand Down
2 changes: 1 addition & 1 deletion tesseract/tesseract/include/tesseract/tesseract.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ using FindTCPCallbackFn = std::function<Eigen::Isometry3d(const tesseract_planni
* It also provides several construction methods for loading from urdf, srdf
*
*/
class Tesseract
class TESSERACT_PUBLIC Tesseract
{
public:
using Ptr = std::shared_ptr<Tesseract>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,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 TesseractInitInfo
struct TESSERACT_PUBLIC TesseractInitInfo
{
using Ptr = std::shared_ptr<TesseractInitInfo>;
using ConstPtr = std::shared_ptr<const TesseractInitInfo>;
Expand Down
13 changes: 10 additions & 3 deletions tesseract/tesseract_collision/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
cmake_minimum_required(VERSION 3.6.0)
project(tesseract_collision VERSION 0.1.0 LANGUAGES CXX)

set(CMAKE_CXX_VISIBILITY_PRESET hidden)
set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)

find_package(Eigen3 REQUIRED)
find_package(Boost COMPONENTS system thread program_options REQUIRED)
find_package(octomap REQUIRED)
Expand Down Expand Up @@ -41,6 +44,7 @@ tesseract_variables()
add_library(${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})
target_clang_tidy(${PROJECT_NAME}_core ARGUMENTS ${TESSERACT_CLANG_TIDY_ARGS} ENABLE ${TESSERACT_ENABLE_CLANG_TIDY})
target_cxx_version(${PROJECT_NAME}_core INTERFACE VERSION ${TESSERACT_CXX_VERSION})
target_code_coverage(${PROJECT_NAME}_core INTERFACE ALL EXCLUDE ${COVERAGE_EXCLUDE} ENABLE ${TESSERACT_ENABLE_TESTING})
Expand All @@ -52,7 +56,7 @@ target_include_directories(${PROJECT_NAME}_core SYSTEM INTERFACE
${Boost_INCLUDE_DIRS})

# Create target for Bullet implementation
add_library(${PROJECT_NAME}_bullet SHARED
add_library(${PROJECT_NAME}_bullet
src/bullet/bullet_cast_bvh_manager.cpp
src/bullet/bullet_cast_simple_manager.cpp
src/bullet/bullet_discrete_bvh_manager.cpp
Expand All @@ -66,6 +70,7 @@ add_library(${PROJECT_NAME}_bullet SHARED
)
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})
Expand All @@ -77,12 +82,13 @@ target_include_directories(${PROJECT_NAME}_bullet SYSTEM PUBLIC
${Boost_INCLUDE_DIRS})

# Create target for FCL implementation
add_library(${PROJECT_NAME}_fcl SHARED
add_library(${PROJECT_NAME}_fcl
src/fcl/fcl_discrete_managers.cpp
src/fcl/fcl_utils.cpp
src/fcl/fcl_collision_object_wrapper.cpp)
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})
Expand All @@ -97,9 +103,9 @@ target_include_directories(${PROJECT_NAME}_fcl SYSTEM PUBLIC
add_executable(create_convex_hull src/create_convex_hull.cpp)
target_link_libraries(create_convex_hull PUBLIC tesseract::tesseract_common tesseract::tesseract_geometry console_bridge PkgConfig::bullet ${Boost_LIBRARIES} octomap octomath)
target_compile_options(create_convex_hull PRIVATE ${TESSERACT_COMPILE_OPTIONS})
target_compile_definitions(create_convex_hull PRIVATE ${TESSERACT_COMPILE_DEFINITIONS})
target_clang_tidy(create_convex_hull ARGUMENTS ${TESSERACT_CLANG_TIDY_ARGS} ENABLE ${TESSERACT_ENABLE_CLANG_TIDY})
target_cxx_version(create_convex_hull PRIVATE VERSION ${TESSERACT_CXX_VERSION})
target_compile_definitions(create_convex_hull PRIVATE "-DBT_USE_DOUBLE_PRECISION")
target_include_directories(create_convex_hull PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>")
target_include_directories(create_convex_hull SYSTEM PUBLIC
${EIGEN3_INCLUDE_DIRS}
Expand All @@ -110,6 +116,7 @@ target_include_directories(create_convex_hull SYSTEM PUBLIC
add_library(${PROJECT_NAME}_test_suite INTERFACE)
target_link_libraries(${PROJECT_NAME}_test_suite INTERFACE tesseract::tesseract_support tesseract::tesseract_geometry ${PROJECT_NAME}_core)
target_compile_options(${PROJECT_NAME}_test_suite INTERFACE ${TESSERACT_COMPILE_OPTIONS})
target_compile_definitions(${PROJECT_NAME}_test_suite INTERFACE ${TESSERACT_COMPILE_DEFINITIONS})
target_clang_tidy(${PROJECT_NAME}_test_suite ARGUMENTS ${TESSERACT_CLANG_TIDY_ARGS} ENABLE ${TESSERACT_ENABLE_CLANG_TIDY})
target_cxx_version(${PROJECT_NAME}_test_suite INTERFACE VERSION ${TESSERACT_CXX_VERSION})
target_code_coverage(${PROJECT_NAME}_test_suite INTERFACE ALL EXCLUDE ${COVERAGE_EXCLUDE} ENABLE ${TESSERACT_ENABLE_TESTING})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
#ifndef TESSERACT_COLLISION_BULLET_CAST_BVH_MANAGERS_H
#define TESSERACT_COLLISION_BULLET_CAST_BVH_MANAGERS_H

#include <tesseract_common/visibility_control.h>
#include <tesseract_collision/bullet/bullet_utils.h>
#include <tesseract_collision/core/continuous_contact_manager.h>
#include <tesseract_collision/bullet/tesseract_collision_configuration.h>
Expand All @@ -50,7 +51,7 @@ namespace tesseract_collision
namespace tesseract_collision_bullet
{
/** @brief A BVH implementaiton of a tesseract contact manager */
class BulletCastBVHManager : public ContinuousContactManager
class TESSERACT_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 @@ -41,6 +41,7 @@
#ifndef TESSERACT_COLLISION_BULLET_CAST_SIMPLE_MANAGERS_H
#define TESSERACT_COLLISION_BULLET_CAST_SIMPLE_MANAGERS_H

#include <tesseract_common/visibility_control.h>
#include <tesseract_collision/bullet/bullet_utils.h>
#include <tesseract_collision/core/continuous_contact_manager.h>
#include <tesseract_collision/bullet/tesseract_collision_configuration.h>
Expand All @@ -50,7 +51,7 @@ namespace tesseract_collision
namespace tesseract_collision_bullet
{
/** @brief A simple implementaiton of a tesseract manager which does not use BHV */
class BulletCastSimpleManager : public ContinuousContactManager
class TESSERACT_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 @@ -41,6 +41,7 @@
#ifndef TESSERACT_COLLISION_BULLET_DISCRETE_BVH_MANAGERS_H
#define TESSERACT_COLLISION_BULLET_DISCRETE_BVH_MANAGERS_H

#include <tesseract_common/visibility_control.h>
#include <tesseract_collision/bullet/bullet_utils.h>
#include <tesseract_collision/core/discrete_contact_manager.h>
#include <tesseract_collision/bullet/tesseract_collision_configuration.h>
Expand All @@ -50,7 +51,7 @@ namespace tesseract_collision
namespace tesseract_collision_bullet
{
/** @brief A BVH implementaiton of a bullet manager */
class BulletDiscreteBVHManager : public DiscreteContactManager
class TESSERACT_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 @@ -41,6 +41,7 @@
#ifndef TESSERACT_COLLISION_BULLET_DISCRETE_SIMPLE_MANAGERS_H
#define TESSERACT_COLLISION_BULLET_DISCRETE_SIMPLE_MANAGERS_H

#include <tesseract_common/visibility_control.h>
#include <tesseract_collision/bullet/bullet_utils.h>
#include <tesseract_collision/core/discrete_contact_manager.h>
#include <tesseract_collision/bullet/tesseract_collision_configuration.h>
Expand All @@ -50,7 +51,7 @@ namespace tesseract_collision
namespace tesseract_collision_bullet
{
/** @brief A simple implementaiton of a bullet manager which does not use BHV */
class BulletDiscreteSimpleManager : public DiscreteContactManager
class TESSERACT_PUBLIC BulletDiscreteSimpleManager : public DiscreteContactManager
{
public:
using Ptr = std::shared_ptr<BulletDiscreteSimpleManager>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ inline Eigen::Isometry3d convertBtToEigen(const btTransform& t)
* It is a wrapper around bullet's collision object which
* contains specific information related to tesseract
*/
class CollisionObjectWrapper : public btCollisionObject
class TESSERACT_LOCAL CollisionObjectWrapper : public btCollisionObject
{
public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
Expand Down Expand Up @@ -222,7 +222,7 @@ using Link2Cow = std::map<std::string, COW::Ptr>;
using Link2ConstCow = std::map<std::string, COW::ConstPtr>;

/** @brief This is a casted collision shape used for checking if an object is collision free between two transforms */
struct CastHullShape : public btConvexShape
struct TESSERACT_LOCAL CastHullShape : public btConvexShape
{
public:
btConvexShape* m_shape;
Expand Down Expand Up @@ -619,7 +619,7 @@ inline btScalar addCastSingleResult(btManifoldPoint& cp,
}

/** @brief This is copied directly out of BulletWorld */
struct TesseractBridgedManifoldResult : public btManifoldResult
struct TESSERACT_LOCAL TesseractBridgedManifoldResult : public btManifoldResult
{
btCollisionWorld::ContactResultCallback& m_resultCallback;

Expand Down Expand Up @@ -676,7 +676,7 @@ struct TesseractBridgedManifoldResult : public btManifoldResult
};

/** @brief The BroadphaseContactResultCallback is used to report contact points */
struct BroadphaseContactResultCallback
struct TESSERACT_LOCAL BroadphaseContactResultCallback
{
ContactTestData& collisions_;
double contact_distance_;
Expand Down Expand Up @@ -707,7 +707,7 @@ struct BroadphaseContactResultCallback
int index1) = 0;
};

struct DiscreteBroadphaseContactResultCallback : public BroadphaseContactResultCallback
struct TESSERACT_LOCAL DiscreteBroadphaseContactResultCallback : public BroadphaseContactResultCallback
{
DiscreteBroadphaseContactResultCallback(ContactTestData& collisions, double contact_distance, bool verbose = false)
: BroadphaseContactResultCallback(collisions, contact_distance, verbose)
Expand All @@ -729,7 +729,7 @@ struct DiscreteBroadphaseContactResultCallback : public BroadphaseContactResultC
}
};

struct CastBroadphaseContactResultCallback : public BroadphaseContactResultCallback
struct TESSERACT_LOCAL CastBroadphaseContactResultCallback : public BroadphaseContactResultCallback
{
CastBroadphaseContactResultCallback(ContactTestData& collisions, double contact_distance, bool verbose = false)
: BroadphaseContactResultCallback(collisions, contact_distance, verbose)
Expand All @@ -751,7 +751,7 @@ struct CastBroadphaseContactResultCallback : public BroadphaseContactResultCallb
}
};

struct TesseractBroadphaseBridgedManifoldResult : public btManifoldResult
struct TESSERACT_LOCAL TesseractBroadphaseBridgedManifoldResult : public btManifoldResult
{
BroadphaseContactResultCallback& result_callback_;

Expand Down Expand Up @@ -816,7 +816,7 @@ struct TesseractBroadphaseBridgedManifoldResult : public btManifoldResult
* If the AABB of two collision objects are overlapping the processOverlap method is called
* and they are checked for collision/distance and the results are stored in collision_.
*/
class TesseractCollisionPairCallback : public btOverlapCallback
class TESSERACT_LOCAL TesseractCollisionPairCallback : public btOverlapCallback
{
const btDispatcherInfo& dispatch_info_;
btCollisionDispatcher* dispatcher_;
Expand Down Expand Up @@ -869,7 +869,7 @@ class TesseractCollisionPairCallback : public btOverlapCallback
};

/** @brief This class is used to filter broadphase */
class TesseractOverlapFilterCallback : public btOverlapFilterCallback
class TESSERACT_LOCAL TesseractOverlapFilterCallback : public btOverlapFilterCallback
{
public:
TesseractOverlapFilterCallback(bool verbose = false) : verbose_(verbose) {}
Expand Down Expand Up @@ -946,7 +946,7 @@ inline COW::Ptr createCollisionObject(const std::string& name,
return new_cow;
}

struct DiscreteCollisionCollector : public btCollisionWorld::ContactResultCallback
struct TESSERACT_LOCAL DiscreteCollisionCollector : public btCollisionWorld::ContactResultCallback
{
ContactTestData& collisions_;
const COW::Ptr cow_;
Expand Down Expand Up @@ -983,7 +983,7 @@ struct DiscreteCollisionCollector : public btCollisionWorld::ContactResultCallba
}
};

struct CastCollisionCollector : public btCollisionWorld::ContactResultCallback
struct TESSERACT_LOCAL CastCollisionCollector : public btCollisionWorld::ContactResultCallback
{
ContactTestData& collisions_;
const COW::Ptr cow_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ namespace tesseract_collision_bullet
* - Compound to Compound
* - Convex to Convex
*/
class TesseractCollisionConfiguration : public btDefaultCollisionConfiguration
class TESSERACT_LOCAL TesseractCollisionConfiguration : public btDefaultCollisionConfiguration
{
public:
TesseractCollisionConfiguration(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ namespace tesseract_collision_bullet
* with the collision shape. I don't believe this will be an issue since all of the other callback in Bullet accept
* both.
*/
class TesseractCompoundCollisionAlgorithm : public btActivatingCollisionAlgorithm // NOLINT
class TESSERACT_LOCAL TesseractCompoundCollisionAlgorithm : public btActivatingCollisionAlgorithm // NOLINT
{
btNodeStack stack2;
btManifoldArray manifoldArray;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ namespace tesseract_collision_bullet
* with the collision shape. I don't believe this will be an issue since all of the other callback in Bullet accept
* both.
*/
class TesseractCompoundCompoundCollisionAlgorithm : public TesseractCompoundCollisionAlgorithm // NOLINT
class TESSERACT_LOCAL TesseractCompoundCompoundCollisionAlgorithm
: public TesseractCompoundCollisionAlgorithm // NOLINT
{
class btHashedSimplePairCache* m_childCollisionAlgorithmCache;
btSimplePairArray m_removePairs;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ namespace tesseract_collision_bullet
*
* Note: This will not be able to be removed.
*/
class TesseractConvexConvexAlgorithm : public btActivatingCollisionAlgorithm
class TESSERACT_LOCAL TesseractConvexConvexAlgorithm : public btActivatingCollisionAlgorithm
{
#ifdef USE_SEPDISTANCE_UTIL2
btConvexSeparatingDistanceUtil m_sepDistance;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ namespace tesseract_collision_bullet
*
* Note: This will not be able to be removed.
*/
class TesseractGjkPairDetector : public btDiscreteCollisionDetectorInterface
class TESSERACT_LOCAL TesseractGjkPairDetector : public btDiscreteCollisionDetectorInterface
{
btVector3 m_cachedSeparatingAxis;
btConvexPenetrationDepthSolver* m_penetrationDepthSolver;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ TESSERACT_COMMON_IGNORE_WARNINGS_POP

namespace tesseract_collision
{
class ContinuousContactManager
class TESSERACT_PUBLIC ContinuousContactManager
{
public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,12 @@
#ifndef TESSERACT_COLLISION_CONTINUOUS_CONTACT_MANAGER_FACTORY_H
#define TESSERACT_COLLISION_CONTINUOUS_CONTACT_MANAGER_FACTORY_H

#include <tesseract_common/visibility_control.h>
#include <tesseract_collision/core/continuous_contact_manager.h>

namespace tesseract_collision
{
class ContinuousContactManagerFactory
class TESSERACT_PUBLIC ContinuousContactManagerFactory
{
public:
using CreateMethod = std::function<ContinuousContactManager::Ptr()>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ TESSERACT_COMMON_IGNORE_WARNINGS_POP

namespace tesseract_collision
{
class DiscreteContactManager
class TESSERACT_PUBLIC DiscreteContactManager
{
public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@
#ifndef TESSERACT_COLLISION_DISCRETE_CONTACT_MANAGER_FACTORY_H
#define TESSERACT_COLLISION_DISCRETE_CONTACT_MANAGER_FACTORY_H

#include <tesseract_common/visibility_control.h>
#include <tesseract_collision/core/discrete_contact_manager.h>

namespace tesseract_collision
{
class DiscreteContactManagerFactory
class TESSERACT_PUBLIC DiscreteContactManagerFactory
{
public:
using CreateMethod = std::function<DiscreteContactManager::Ptr()>;
Expand Down
Loading

0 comments on commit ed9e4e7

Please sign in to comment.