From 83a355f0904499b23d2ac4da12b2a00ea10e7678 Mon Sep 17 00:00:00 2001 From: Joseph Mirabel <jmirabel@laas.fr> Date: Tue, 14 Jan 2020 23:16:18 +0100 Subject: [PATCH] Add end-effector-tracjectory plugin. --- plugins/CMakeLists.txt | 5 ++++ plugins/end-effector-trajectory.cc | 45 ++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 plugins/end-effector-trajectory.cc diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index 7a0c682..77bbad0 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -20,3 +20,8 @@ HPP_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) + +HPP_ADD_PLUGIN(end-effector-trajectory + SOURCES end-effector-trajectory.cc + LINK_DEPENDENCIES ${PROJECT_NAME} + PKG_CONFIG_DEPENDENCIES hpp-core) diff --git a/plugins/end-effector-trajectory.cc b/plugins/end-effector-trajectory.cc new file mode 100644 index 0000000..f2baee7 --- /dev/null +++ b/plugins/end-effector-trajectory.cc @@ -0,0 +1,45 @@ +// 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/steering-method/end-effector-trajectory.hh> +#include <hpp/manipulation/path-planner/end-effector-trajectory.hh> + +namespace hpp { + namespace manipulation { + class EndEffectorTrajectoryPlugin : public core::ProblemSolverPlugin + { + public: + EndEffectorTrajectoryPlugin () + : ProblemSolverPlugin ("EndEffectorTrajectoryPlugin", "0.0") + {} + + protected: + virtual bool impl_initialize (core::ProblemSolverPtr_t ps) + { + ps->pathPlanners.add ("EndEffectorTrajectory", + pathPlanner::EndEffectorTrajectory::createWithRoadmap); + ps->steeringMethods.add ("EndEffectorTrajectory", + steeringMethod::EndEffectorTrajectory::create); + return true; + } + }; + } // namespace manipulation +} // namespace hpp + +HPP_CORE_DEFINE_PLUGIN(hpp::manipulation::EndEffectorTrajectoryPlugin) -- GitLab