Skip to content

Commit

Permalink
Merge pull request #1 from Nishida-Lab/devel
Browse files Browse the repository at this point in the history
Devel
  • Loading branch information
maeshu authored Sep 22, 2019
2 parents be3bb7a + d971570 commit a46fec9
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 29 deletions.
34 changes: 26 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ project(moveit_mpp)

add_compile_options(-std=c++11)

find_package(
catkin
REQUIRED
COMPONENTS

find_package(catkin REQUIRED COMPONENTS
moveit_core
moveit_ros_planning
pluginlib
Expand All @@ -16,10 +14,8 @@ find_package(


catkin_package(
INCLUDE_DIRS
include
LIBRARIES
${PROJECT_NAME}
INCLUDE_DIRS include
LIBRARIES ${PROJECT_NAME}
CATKIN_DEPENDS
moveit_core
moveit_ros_planning
Expand All @@ -35,3 +31,25 @@ include_directories(

add_library(${PROJECT_NAME}_planner_manager src/mpp_planner_manager.cpp)
target_link_libraries(${PROJECT_NAME}_planner_manager ${catkin_LIBRARIES})


#############
## Install ##
#############

install(TARGETS ${PROJECT_NAME}_planner_manager
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)

install(DIRECTORY include/
DESTINATION ${CATKIN_GLOBAL_INCLUDE_DESTINATION}
FILES_MATCHING PATTERN "*.h"
)

install(FILES mpp_plugin_description.xml
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})



17 changes: 6 additions & 11 deletions package.xml
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
<?xml version="1.0"?>
<package>
<package format="2">
<name>moveit_mpp</name>
<version>0.1.0</version>
<version>0.0.0</version>
<description>Multi-planner plugin hoster plugin for MoveIt</description>
<author>G.A. vd. Hoorn (TU Delft Robotics Institute)</author>
<maintainer email="[email protected]">G.A. vd. Hoorn (TU Delft Robotics Institute)</maintainer>
<license>Apache2</license>

<buildtool_depend>catkin</buildtool_depend>

<build_depend>moveit_core</build_depend>
<build_depend>moveit_ros_planning</build_depend>
<build_depend>pluginlib</build_depend>
<build_depend>roscpp</build_depend>

<run_depend>moveit_core</run_depend>
<run_depend>moveit_ros_planning</run_depend>
<run_depend>pluginlib</run_depend>
<run_depend>roscpp</run_depend>
<depend>moveit_core</depend>
<depend>moveit_ros_planning</depend>
<depend>pluginlib</depend>
<depend>roscpp</depend>

<export>
<moveit_core plugin="${prefix}/mpp_plugin_description.xml"/>
Expand Down
15 changes: 5 additions & 10 deletions src/mpp_planner_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,6 @@ PlannerStruct resolve_planner(const std::string& planner_str)








MultiPlannerPluginManager::MultiPlannerPluginManager() :
planning_interface::PlannerManager(), pnh_(PARAMETER_NS)
{
Expand Down Expand Up @@ -147,11 +142,10 @@ bool MultiPlannerPluginManager::initialize(const robot_model::RobotModelConstPtr
std::map<std::string, std::string> planners_to_load =
{
{"ompl", "ompl_interface/OMPLPlanner"},
{"ptp" , "moveit_ptp/PtpPlannerManager"},
// {"clik", "constrained_ik/CLIKPlanner"}
{"stomp" , "stomp_moveit/StompPlannerManager"},
{"chomp" , "chomp_interface/CHOMPPlanner"},
};


for (auto const& planner_info : planners_to_load)
{
ROS_INFO_STREAM_NAMED("multi_planner_plugin_manager", "Attempting to load planner plugin '"
Expand All @@ -163,8 +157,9 @@ bool MultiPlannerPluginManager::initialize(const robot_model::RobotModelConstPtr
try
{
auto p = planner_plugin_loader_->createInstance(planner_id);
p->initialize(model, ns + "/" + planner_ns);
planners_[planner_ns] = p;
p->initialize(model, ns + "/");
std::shared_ptr< planning_interface::PlannerManager > s = std::shared_ptr< planning_interface::PlannerManager>( p.get(), [p] ( ... ) mutable { } );
planners_[planner_ns] = s;
}
catch (pluginlib::PluginlibException& ex)
{
Expand Down

0 comments on commit a46fec9

Please sign in to comment.