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

Add class RoadmapNode

parent cea06d2d
No related branches found
No related tags found
No related merge requests found
......@@ -62,6 +62,7 @@ SET (${PROJECT_NAME}_HEADERS
include/hpp/manipulation/problem-solver.hh
include/hpp/manipulation/device.hh
include/hpp/manipulation/roadmap.hh
include/hpp/manipulation/roadmap-node.hh
include/hpp/manipulation/manipulation-planner.hh
include/hpp/manipulation/graph-path-validation.hh
include/hpp/manipulation/graph-steering-method.hh
......
......@@ -51,6 +51,8 @@ namespace hpp {
typedef Problem* ProblemPtr_t;
HPP_PREDEF_CLASS (Roadmap);
typedef boost::shared_ptr <Roadmap> RoadmapPtr_t;
HPP_PREDEF_CLASS (RoadmapNode);
typedef RoadmapNode* RoadmapNodePtr_t;
typedef constraints::RelativeOrientation RelativeOrientation;
typedef constraints::RelativePosition RelativePosition;
typedef constraints::RelativeOrientationPtr_t RelativeOrientationPtr_t;
......
// Copyright (c) 2014 CNRS
// Authors: Joseph Mirabel
//
//
// 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/>.
#ifndef HPP_MANIPULATION_ROADMAP_NODE_HH
# define HPP_MANIPULATION_ROADMAP_NODE_HH
# include <hpp/manipulation/config.hh>
# include <hpp/core/node.hh>
# include <hpp/manipulation/fwd.hh>
# include <hpp/manipulation/graph/fwd.hh>
namespace hpp {
namespace manipulation {
class HPP_MANIPULATION_DLLAPI RoadmapNode : public core::Node
{
public:
enum CachingSystem {
/// The caching system is disabled. The graph::Node containing this
/// node can be obtained by checking the constraints.
CACHE_DISABLED,
/// The chaching system is enabled and up to date.
CACHE_UP_TO_DATE,
/// The chaching system is enabled but the cache is not up to date.
CACHE_NEED_UPDATE
};
static CachingSystem defaultCachingSystem;
RoadmapNode (const ConfigurationPtr_t& configuration) :
core::Node (configuration),
cacheSystem_ (defaultCachingSystem),
node_ ()
{}
RoadmapNode (const ConfigurationPtr_t& configuration,
ConnectedComponentPtr_t cc) :
core::Node (configuration, cc),
cacheSystem_ (defaultCachingSystem),
node_ ()
{}
CachingSystem cachingSystem () const
{
return cacheSystem_;
}
/// Getter for the graph::Node.
graph::NodePtr_t graphNode () const
{
return node_;
}
/// Setter for the graph::Node.
void graphNode (const graph::NodePtr_t& node)
{
if (cacheSystem_ != CACHE_DISABLED) cacheSystem_ = CACHE_UP_TO_DATE;
node_ = node;
}
private:
CachingSystem cacheSystem_;
graph::NodePtr_t node_;
};
} // namespace manipulation
} // namespace hpp
#endif // HPP_MANIPULATION_ROADMAP_NODE_HH
......@@ -25,6 +25,7 @@ ADD_LIBRARY(${LIBRARY_NAME} SHARED
manipulation-planner.cc
problem-solver.cc
roadmap.cc
roadmap-node.cc
device.cc
graph-path-validation.cc
graph-steering-method.cc
......
// Copyright (c) 2015, 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/manipulation/roadmap-node.hh"
namespace hpp {
namespace manipulation {
RoadmapNode::CachingSystem RoadmapNode::defaultCachingSystem = RoadmapNode::CACHE_DISABLED;
} // namespace manipulation
} // namespace hpp
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