diff --git a/dependencies.rosinstall b/dependencies.rosinstall index 5a376683..5010a96f 100644 --- a/dependencies.rosinstall +++ b/dependencies.rosinstall @@ -1,11 +1,11 @@ - git: local-name: ros_industrial_cmake_boilerplate uri: https://github.com/ros-industrial/ros_industrial_cmake_boilerplate.git - version: 0.4.7 + version: 0.5.3 - git: local-name: tesseract uri: https://github.com/tesseract-robotics/tesseract.git - version: 0.18.1 + version: 0.19.1 - git: local-name: trajopt uri: https://github.com/tesseract-robotics/trajopt.git @@ -13,19 +13,19 @@ - git: local-name: tesseract_planning uri: https://github.com/tesseract-robotics/tesseract_planning.git - version: 0.18.4 + version: 0.19.0 - git: local-name: tesseract_qt uri: https://github.com/tesseract-robotics/tesseract_qt.git - version: 0.18.2 + version: 0.19.0 - git: local-name: descartes_light uri: https://github.com/swri-robotics/descartes_light.git - version: 0.3.1 + version: 0.4.2 - git: local-name: opw_kinematics uri: https://github.com/Jmeyer1292/opw_kinematics.git - version: 0.4.6 + version: 0.5.0 - git: local-name: ifopt uri: https://github.com/ethz-adrl/ifopt.git diff --git a/dependencies_with_ext.rosinstall b/dependencies_with_ext.rosinstall index 89ab384e..b9a42050 100644 --- a/dependencies_with_ext.rosinstall +++ b/dependencies_with_ext.rosinstall @@ -1,7 +1,7 @@ - git: local-name: ros_industrial_cmake_boilerplate uri: https://github.com/ros-industrial/ros_industrial_cmake_boilerplate.git - version: 0.4.7 + version: 0.5.3 - git: local-name: tesseract_ext uri: https://github.com/tesseract-robotics/tesseract_ext.git @@ -9,7 +9,7 @@ - git: local-name: tesseract uri: https://github.com/tesseract-robotics/tesseract.git - version: 0.18.1 + version: 0.19.1 - git: local-name: trajopt uri: https://github.com/tesseract-robotics/trajopt_ros.git @@ -17,19 +17,19 @@ - git: local-name: tesseract_planning uri: https://github.com/tesseract-robotics/tesseract_planning.git - version: 0.18.0 + version: 0.19.0 - git: local-name: tesseract_qt uri: https://github.com/tesseract-robotics/tesseract_qt.git - version: 0.18.0 + version: 0.19.0 - git: local-name: descartes_light uri: https://github.com/swri-robotics/descartes_light.git - version: 0.3.1 + version: 0.4.3 - git: local-name: opw_kinematics uri: https://github.com/Jmeyer1292/opw_kinematics.git - version: 0.4.6 + version: 0.5.0 - git: local-name: ifopt uri: https://github.com/ethz-adrl/ifopt.git diff --git a/tesseract_planning_server/CMakeLists.txt b/tesseract_planning_server/CMakeLists.txt index 073bf855..e22aacee 100644 --- a/tesseract_planning_server/CMakeLists.txt +++ b/tesseract_planning_server/CMakeLists.txt @@ -16,8 +16,8 @@ find_package(catkin REQUIRED COMPONENTS find_package(Boost REQUIRED) find_package(Eigen3 REQUIRED) find_package(tesseract_command_language REQUIRED) -find_package(tesseract_motion_planners REQUIRED) -find_package(tesseract_task_composer REQUIRED) +find_package(tesseract_motion_planners REQUIRED COMPONENTS core simple OPTIONAL_COMPONENTS descartes ompl trajopt trajopt_ifopt) +find_package(tesseract_task_composer REQUIRED COMPONENTS core planning) find_package(tesseract_common REQUIRED) catkin_package( @@ -41,19 +41,38 @@ catkin_package( # Load variable for clang tidy args, compiler options and cxx version tesseract_variables() -add_library(${PROJECT_NAME} SHARED - src/tesseract_planning_server.cpp) -target_link_libraries(${PROJECT_NAME} PUBLIC - tesseract::tesseract_command_language - tesseract::tesseract_motion_planners_core - tesseract::tesseract_motion_planners_simple - tesseract::tesseract_motion_planners_trajopt - tesseract::tesseract_motion_planners_ompl - tesseract::tesseract_motion_planners_descartes - tesseract::tesseract_task_composer - tesseract::tesseract_task_composer_planning - ${catkin_LIBRARIES}) +set(LIB_COMPILE_DEFINITIONS ${TESSERACT_COMPILE_DEFINITIONS}) +set(LIB_SOURCE_LINK_LIBRARIES + tesseract::tesseract_command_language + tesseract::tesseract_motion_planners_core + tesseract::tesseract_motion_planners_simple + tesseract::tesseract_task_composer + tesseract::tesseract_task_composer_planning) + +if(tesseract_motion_planners_trajopt_FOUND) + list(APPEND LIB_SOURCE_LINK_LIBRARIES tesseract::tesseract_motion_planners_trajopt) + list(APPEND LIB_COMPILE_DEFINITIONS "-DTESSERACT_PLANNING_SERVER_HAS_TRAJOPT") +endif() + +if(tesseract_motion_planners_trajopt_ifopt_FOUND) + list(APPEND LIB_SOURCE_LINK_LIBRARIES tesseract::tesseract_motion_planners_trajopt_ifopt) + list(APPEND LIB_COMPILE_DEFINITIONS "-DTESSERACT_PLANNING_SERVER_HAS_TRAJOPT_IFOPT") +endif() + +if(tesseract_motion_planners_ompl_FOUND) + list(APPEND LIB_SOURCE_LINK_LIBRARIES tesseract::tesseract_motion_planners_ompl) + list(APPEND LIB_COMPILE_DEFINITIONS "-DTESSERACT_PLANNING_SERVER_HAS_OMPL") +endif() + +if(tesseract_motion_planners_descartes_FOUND) + list(APPEND LIB_SOURCE_LINK_LIBRARIES tesseract::tesseract_motion_planners_descartes) + list(APPEND LIB_COMPILE_DEFINITIONS "-DTESSERACT_PLANNING_SERVER_HAS_DESCARTES") +endif() + +add_library(${PROJECT_NAME} SHARED src/tesseract_planning_server.cpp) +target_link_libraries(${PROJECT_NAME} PUBLIC ${LIB_SOURCE_LINK_LIBRARIES} ${catkin_LIBRARIES}) target_compile_options(${PROJECT_NAME} PRIVATE ${TESSERACT_COMPILE_OPTIONS}) +target_compile_definitions(${PROJECT_NAME} PUBLIC ${LIB_COMPILE_DEFINITIONS}) target_clang_tidy(${PROJECT_NAME} ARGUMENTS ${TESSERACT_CLANG_TIDY_ARGS} ENABLE ${TESSERACT_ENABLE_CLANG_TIDY}) target_cxx_version(${PROJECT_NAME} PUBLIC VERSION 17) target_include_directories(${PROJECT_NAME} PUBLIC diff --git a/tesseract_planning_server/src/tesseract_planning_server.cpp b/tesseract_planning_server/src/tesseract_planning_server.cpp index 4c2982cd..a1fe1b71 100644 --- a/tesseract_planning_server/src/tesseract_planning_server.cpp +++ b/tesseract_planning_server/src/tesseract_planning_server.cpp @@ -33,24 +33,32 @@ TESSERACT_COMMON_IGNORE_WARNINGS_POP #include #include +#ifdef TESSERACT_PLANNING_SERVER_HAS_DESCARTES #include -#include -#include -#include -#include -#include - -#include -#include #include +#endif + +#ifdef TESSERACT_PLANNING_SERVER_HAS_TRAJOPT +#include #include #include #include -#ifdef TESSERACT_TASK_COMPOSER_HAS_TRAJOPT_IFOPT +#endif + +#ifdef TESSERACT_PLANNING_SERVER_HAS_TRAJOPT_IFOPT +#include #include #include #endif +#ifdef TESSERACT_PLANNING_SERVER_HAS_OMPL +#include +#include +#endif + +#include +#include + #include #include @@ -276,7 +284,14 @@ void TesseractPlanningServer::onMotionPlanningCallback(const tesseract_msgs::Get void TesseractPlanningServer::loadDefaultPlannerProfiles() { + // Add Simple Default Profiles + profiles_->addProfile( + SIMPLE_DEFAULT_NAMESPACE, + tesseract_planning::DEFAULT_PROFILE_KEY, + std::make_shared()); + // Add TrajOpt Default Profiles +#ifdef TESSERACT_PLANNING_SERVER_HAS_TRAJOPT profiles_->addProfile( TRAJOPT_DEFAULT_NAMESPACE, tesseract_planning::DEFAULT_PROFILE_KEY, @@ -289,9 +304,10 @@ void TesseractPlanningServer::loadDefaultPlannerProfiles() TRAJOPT_DEFAULT_NAMESPACE, tesseract_planning::DEFAULT_PROFILE_KEY, std::make_shared()); +#endif // Add TrajOpt IFOPT Default Profiles -#ifdef TESSERACT_TASK_COMPOSER_HAS_TRAJOPT_IFOPT +#ifdef TESSERACT_PLANNING_SERVER_HAS_TRAJOPT_IFOPT profiles_->addProfile( TRAJOPT_IFOPT_DEFAULT_NAMESPACE, tesseract_planning::DEFAULT_PROFILE_KEY, @@ -303,22 +319,20 @@ void TesseractPlanningServer::loadDefaultPlannerProfiles() #endif // Add Descartes Default Profiles +#ifdef TESSERACT_PLANNING_SERVER_HAS_DESCARTES profiles_->addProfile>( DESCARTES_DEFAULT_NAMESPACE, tesseract_planning::DEFAULT_PROFILE_KEY, std::make_shared>()); +#endif // Add OMPL Default Profiles +#ifdef TESSERACT_PLANNING_SERVER_HAS_OMPL profiles_->addProfile( OMPL_DEFAULT_NAMESPACE, tesseract_planning::DEFAULT_PROFILE_KEY, std::make_shared()); - - // Add Simple Default Profiles - profiles_->addProfile( - SIMPLE_DEFAULT_NAMESPACE, - tesseract_planning::DEFAULT_PROFILE_KEY, - std::make_shared()); +#endif } Eigen::Isometry3d TesseractPlanningServer::tfFindTCPOffset(const tesseract_common::ManipulatorInfo& manip_info) diff --git a/tesseract_rosutils/CMakeLists.txt b/tesseract_rosutils/CMakeLists.txt index 7561f84b..9e4c0926 100644 --- a/tesseract_rosutils/CMakeLists.txt +++ b/tesseract_rosutils/CMakeLists.txt @@ -17,11 +17,11 @@ find_package(catkin REQUIRED COMPONENTS find_package(Boost REQUIRED) find_package(Eigen3 REQUIRED) -find_package(tesseract_collision REQUIRED) +find_package(tesseract_collision REQUIRED COMPONENTS core) find_package(tesseract_common REQUIRED) find_package(tesseract_environment REQUIRED) find_package(tesseract_geometry REQUIRED) # This should not be required, must be doing something wrong when creating targets -find_package(tesseract_motion_planners REQUIRED) +find_package(tesseract_motion_planners REQUIRED COMPONENTS core) find_package(tesseract_scene_graph REQUIRED) find_package(tesseract_srdf REQUIRED) find_package(tesseract_visualization REQUIRED) diff --git a/tesseract_rviz/CMakeLists.txt b/tesseract_rviz/CMakeLists.txt index fb8f6389..c503c381 100644 --- a/tesseract_rviz/CMakeLists.txt +++ b/tesseract_rviz/CMakeLists.txt @@ -19,7 +19,6 @@ find_package(catkin REQUIRED COMPONENTS ## System dependencies are found with CMake's conventions find_package(Boost REQUIRED thread date_time system filesystem) find_package(tesseract_environment REQUIRED) -find_package(tesseract_motion_planners REQUIRED) find_package(tesseract_common REQUIRED) find_package(tesseract_visualization REQUIRED) find_package(Eigen3 REQUIRED) @@ -79,7 +78,6 @@ catkin_package( tesseract_environment tesseract_common tesseract_visualization - tesseract_motion_planners ) # Load variable for clang tidy args, compiler options and cxx version