Skip to content
Snippets Groups Projects
Commit 97e31d0e authored by Joseph Mirabel's avatar Joseph Mirabel Committed by Joseph Mirabel
Browse files

Add plugin manipulation-spline-gradient-based.

parent 324aff3d
No related branches found
No related tags found
No related merge requests found
...@@ -30,6 +30,8 @@ SET(PROJECT_DESCRIPTION "Classes for manipulation planning.") ...@@ -30,6 +30,8 @@ SET(PROJECT_DESCRIPTION "Classes for manipulation planning.")
SETUP_HPP_PROJECT() SETUP_HPP_PROJECT()
LIST(APPEND PKG_CONFIG_ADDITIONAL_VARIABLES cmake_plugin)
# Activate test using UR5 if requested # Activate test using UR5 if requested
SET (TEST_UR5 FALSE CACHE BOOL "Activate tests using ur5") SET (TEST_UR5 FALSE CACHE BOOL "Activate tests using ur5")
...@@ -103,6 +105,7 @@ SET (${PROJECT_NAME}_HEADERS ...@@ -103,6 +105,7 @@ SET (${PROJECT_NAME}_HEADERS
) )
ADD_SUBDIRECTORY(src) ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(plugins)
ADD_SUBDIRECTORY(tests) ADD_SUBDIRECTORY(tests)
# Add dependency toward hpp-manipulation library in pkg-config file. # Add dependency toward hpp-manipulation library in pkg-config file.
......
# Copyright (c) 2019, Joseph Mirabel
# Authors: Joseph Mirabel (joseph.mirabel@laas.fr)
#
# This file is part of hpp-manipulation.
# hpp-manipulation is free software: you can redistribute it
# and/or modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation, either version
# 3 of the License, or (at your option) any later version.
#
# hpp-manipulation is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Lesser Public License for more details. You should have
# received a copy of the GNU Lesser General Public License along with
# hpp-manipulation. If not, see <http://www.gnu.org/licenses/>.
INCLUDE(${HPP_CORE_CMAKE_PLUGIN})
ADD_PLUGIN(manipulation-spline-gradient-based
SOURCES spline-gradient-based.cc
LINK_DEPENDENCIES ${PROJECT_NAME} ${PROJECT_NAME}-gpl hpp-core-gpl
PKG_CONFIG_DEPENDENCIES hpp-core)
// Copyright (c) 2019, Joseph Mirabel
// Authors: Joseph Mirabel (joseph.mirabel@laas.fr)
//
// This file is part of hpp-manipulation.
// hpp-manipulation is free software: you can redistribute it
// and/or modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation, either version
// 3 of the License, or (at your option) any later version.
//
// hpp-manipulation is distributed in the hope that it will be
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Lesser Public License for more details. You should have
// received a copy of the GNU Lesser General Public License along with
// hpp-manipulation. If not, see <http://www.gnu.org/licenses/>.
#include <hpp/core/plugin.hh>
#include <hpp/core/problem-solver.hh>
#include <hpp/manipulation/path-optimization/spline-gradient-based.hh>
namespace hpp {
namespace manipulation {
class SplineGradientBasedPlugin : public core::ProblemSolverPlugin
{
public:
SplineGradientBasedPlugin ()
: ProblemSolverPlugin ("SplineGradientBasedPlugin", "0.0")
{}
protected:
virtual bool impl_initialize (core::ProblemSolverPtr_t ps)
{
// ps->pathOptimizers.add ("SplineGradientBased_cannonical1",pathOptimization::SplineGradientBased<core::path::CanonicalPolynomeBasis, 1>::createFromCore);
// ps->pathOptimizers.add ("SplineGradientBased_cannonical2",pathOptimization::SplineGradientBased<core::path::CanonicalPolynomeBasis, 2>::createFromCore);
// ps->pathOptimizers.add ("SplineGradientBased_cannonical3",pathOptimization::SplineGradientBased<core::path::CanonicalPolynomeBasis, 3>::createFromCore);
ps->pathOptimizers.add ("SplineGradientBased_bezier1",pathOptimization::SplineGradientBased<core::path::BernsteinBasis, 1>::createFromCore);
// ps->pathOptimizers.add ("SplineGradientBased_bezier2",pathOptimization::SplineGradientBased<core::path::BernsteinBasis, 2>::createFromCore);
ps->pathOptimizers.add ("SplineGradientBased_bezier3",pathOptimization::SplineGradientBased<core::path::BernsteinBasis, 3>::createFromCore);
return true;
}
};
} // namespace manipulation
} // namespace hpp
HPP_CORE_DEFINE_PLUGIN(hpp::manipulation::SplineGradientBasedPlugin)
...@@ -47,7 +47,6 @@ SET(SOURCES ...@@ -47,7 +47,6 @@ SET(SOURCES
graph/dot.cc graph/dot.cc
path-optimization/random-shortcut.cc path-optimization/random-shortcut.cc
path-optimization/spline-gradient-based.cc
path-optimization/enforce-transition-semantic.cc path-optimization/enforce-transition-semantic.cc
problem-target/state.cc problem-target/state.cc
...@@ -73,3 +72,17 @@ IF(HPP_WHOLEBODY_STEP_FOUND) ...@@ -73,3 +72,17 @@ IF(HPP_WHOLEBODY_STEP_FOUND)
ENDIF(HPP_WHOLEBODY_STEP_FOUND) ENDIF(HPP_WHOLEBODY_STEP_FOUND)
INSTALL(TARGETS ${LIBRARY_NAME} DESTINATION lib) INSTALL(TARGETS ${LIBRARY_NAME} DESTINATION lib)
ADD_LIBRARY(${LIBRARY_NAME}-gpl SHARED
path-optimization/spline-gradient-based.cc
)
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME}-gpl hpp-core)
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME}-gpl hpp-statistics)
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME}-gpl hpp-constraints)
IF(HPP_WHOLEBODY_STEP_FOUND)
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME}-gpl hpp-wholebody-step)
ENDIF(HPP_WHOLEBODY_STEP_FOUND)
TARGET_LINK_LIBRARIES(${LIBRARY_NAME}-gpl ${LIBRARY_NAME} hpp-core-gpl)
INSTALL(TARGETS ${LIBRARY_NAME}-gpl DESTINATION lib)
...@@ -52,7 +52,6 @@ ...@@ -52,7 +52,6 @@
#include "hpp/manipulation/graph-optimizer.hh" #include "hpp/manipulation/graph-optimizer.hh"
#include "hpp/manipulation/graph-path-validation.hh" #include "hpp/manipulation/graph-path-validation.hh"
#include "hpp/manipulation/graph-node-optimizer.hh" #include "hpp/manipulation/graph-node-optimizer.hh"
#include "hpp/manipulation/path-optimization/spline-gradient-based.hh"
#include "hpp/manipulation/path-optimization/random-shortcut.hh" #include "hpp/manipulation/path-optimization/random-shortcut.hh"
#include "hpp/manipulation/path-optimization/enforce-transition-semantic.hh" #include "hpp/manipulation/path-optimization/enforce-transition-semantic.hh"
#include "hpp/manipulation/problem-target/state.hh" #include "hpp/manipulation/problem-target/state.hh"
...@@ -130,13 +129,6 @@ namespace hpp { ...@@ -130,13 +129,6 @@ namespace hpp {
pathProjectors.add ("RecursiveHermite", pathProjectors.add ("RecursiveHermite",
createPathProjector <core::pathProjector::RecursiveHermite>); createPathProjector <core::pathProjector::RecursiveHermite>);
// pathOptimizers.add ("SplineGradientBased_cannonical1",pathOptimization::SplineGradientBased<core::path::CanonicalPolynomeBasis, 1>::createFromCore);
// pathOptimizers.add ("SplineGradientBased_cannonical2",pathOptimization::SplineGradientBased<core::path::CanonicalPolynomeBasis, 2>::createFromCore);
// pathOptimizers.add ("SplineGradientBased_cannonical3",pathOptimization::SplineGradientBased<core::path::CanonicalPolynomeBasis, 3>::createFromCore);
pathOptimizers.add ("SplineGradientBased_bezier1",pathOptimization::SplineGradientBased<core::path::BernsteinBasis, 1>::createFromCore);
// pathOptimizers.add ("SplineGradientBased_bezier2",pathOptimization::SplineGradientBased<core::path::BernsteinBasis, 2>::createFromCore);
pathOptimizers.add ("SplineGradientBased_bezier3",pathOptimization::SplineGradientBased<core::path::BernsteinBasis, 3>::createFromCore);
steeringMethods.add ("Graph-SteeringMethodStraight", steeringMethods.add ("Graph-SteeringMethodStraight",
steeringMethod::Graph::create <core::SteeringMethodStraight>); steeringMethod::Graph::create <core::SteeringMethodStraight>);
steeringMethods.add ("Graph-Straight", steeringMethods.add ("Graph-Straight",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment