From 08ca880da3d5ccf8a8858cd9c4b2f7da13006196 Mon Sep 17 00:00:00 2001 From: Joseph Mirabel <jmirabel@laas.fr> Date: Thu, 31 Jul 2014 10:34:39 +0200 Subject: [PATCH] Add class Problem --- CMakeLists.txt | 1 + include/hpp/manipulation/problem.hh | 51 +++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 include/hpp/manipulation/problem.hh diff --git a/CMakeLists.txt b/CMakeLists.txt index 2872f7af..4627f4af 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,6 +45,7 @@ SET (${PROJECT_NAME}_HEADERS include/hpp/manipulation/axial-handle.hh include/hpp/manipulation/handle.hh include/hpp/manipulation/object.hh + include/hpp/manipulation/problem.hh include/hpp/manipulation/problem-solver.hh include/hpp/manipulation/robot.hh include/hpp/manipulation/manipulation-planner.hh diff --git a/include/hpp/manipulation/problem.hh b/include/hpp/manipulation/problem.hh new file mode 100644 index 00000000..8914fe00 --- /dev/null +++ b/include/hpp/manipulation/problem.hh @@ -0,0 +1,51 @@ +// Copyright (c) 2014, LAAS-CNRS +// 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/problem.hh> + +#include "hpp/manipulation/robot.hh" +#include "hpp/manipulation/graph/graph.hh" +#include "hpp/manipulation/fwd.hh" + +namespace hpp { + namespace manipulation { + class HPP_MANIPULATION_DLLAPI Problem : public core::Problem + { + public: + /// Constructor + Problem (RobotPtr_t robot) : core::Problem (robot), + graph_() + { + } + + /// Set the graph of constraints + void constraintGraph (const graph::GraphPtr_t& graph) + { + graph_ = graph; + } + + /// Get the graph of constraints + graph::GraphPtr_t constraintGraph () const + { + return graph_; + } + + private: + /// The graph of constraints + graph::GraphPtr_t graph_; + }; + } // namespace manipulation +} // namespace hpp -- GitLab