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

Update constraint graph interface.

parent 96391b97
No related branches found
No related tags found
No related merge requests found
......@@ -18,15 +18,22 @@
# define HPP_MANIPULATION_GRAPH_FWD_HH
#include <hpp/util/pointer.hh>
#include <vector>
namespace hpp {
namespace manipulation {
namespace graph {
HPP_PREDEF_CLASS (Graph);
HPP_PREDEF_CLASS (Node);
HPP_PREDEF_CLASS (Edge);
HPP_PREDEF_CLASS (NodeSelector);
typedef boost::shared_ptr < Graph > GraphPtr_t;
typedef boost::shared_ptr < Node > NodePtr_t;
typedef boost::shared_ptr < Edge > EdgePtr_t;
typedef boost::shared_ptr < NodeSelector > NodeSelectorPtr_t;
typedef std::vector < NodePtr_t > Nodes_t;
typedef std::vector < EdgePtr_t > Edges_t;
typedef std::vector < NodeSelectorPtr_t > NodeSelectors_t;
typedef hpp::core::ConstraintSet ConstraintSet_t;
typedef hpp::core::ConstraintSetPtr_t ConstraintSetPtr_t;
......
......@@ -14,7 +14,6 @@
// 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_GRAPHGRAPH_HH
# define HPP_MANIPULATION_GRAPHGRAPH_HH
......@@ -30,6 +29,11 @@ namespace hpp {
class HPP_MANIPULATION_DLLAPI Graph
{
public:
/// Returns the states of a configuration.
virtual Nodes_t getNode(const Configuration_t config) const;
/// Select randomly outgoing edges of the given nodes.
virtual Edges_t chooseEdge(const Nodes_t& node) const;
private:
/// This list contains a node selector for each end-effector.
......@@ -38,7 +42,7 @@ namespace hpp {
/// A set of constraints that will always be used, for example
/// stability constraints.
ConstraintSetPtr_t constraints_;
}
}; // Class Graph
} // namespace graph
} // namespace manipulation
} // namespace hpp
......
......@@ -29,12 +29,15 @@ namespace hpp {
{
public:
/// Returns the state of a configuration.
virtual Node getState(const Configuration_t config) const;
virtual NodePtr_t getNode(const Configuration_t config) const;
/// Select randomly an outgoing edge of the given node.
virtual EdgePtr_t chooseEdge(const NodePtr_t& node) const;
private:
/// List of the states of one end-effector, ordered by priority.
std::vector< NodeWkPtr_t > orderedStates_;
}; //
}; // Class NodeSelector
} // namespace graph
} // 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