hpp-corbaserver  4.15.1
Corba server for Humanoid Path Planner applications
path_planners.idl
Go to the documentation of this file.
1 // Copyright (C) 2019 by Joseph Mirabel, LAAS-CNRS.
2 //
3 // This file is part of the hpp-corbaserver.
4 //
5 // This software is provided "as is" without warranty of any kind,
6 // either expressed or implied, including but not limited to the
7 // implied warranties of fitness for a particular purpose.
8 //
9 // See the COPYING file for more information.
10 
11 #ifndef HPP_CORE_PATH_PLANNERS_IDL
12 #define HPP_CORE_PATH_PLANNERS_IDL
13 #include <hpp/common.idl>
14 
15 #include <hpp/core_idl/paths.idl>
16 
17 module hpp
18 {
19  module core_idl {
20  interface Path;
21 
22  interface ConnectedComponent {
24  floatSeqSeq nodes () raises(Error);
25  //* hpp::core::NodeVector_t nodes = getT()->nodes();
26  //* hpp::core::matrix_t configs (nodes.size(),
27  //* nodes[0]->configuration()->size());
28  //* size_type i = 0;
29  //* for (hpp::core::NodeVector_t::const_iterator _node = nodes.begin();
30  //* _node != nodes.end(); ++_node)
31  //* configs.row(i++) = *((*_node)->configuration());
32  //* return corbaServer::matrixToFloatSeqSeq(configs);
33  }; // interface ConnectedComponent
34 
35  typedef sequence<ConnectedComponent> ConnectedComponentSeq;
36 
37  interface Roadmap {
39 
40  void clear () raises (Error);
41 
42  void addNode (in floatSeq config) raises (Error);
43 
44  void addNodeAndEdge (in floatSeq cfgfrom, in floatSeq cfgto, in Path path_) raises (Error);
45  //* core::PathPtr_t path (corbaServer::reference_to_servant_base<core::Path>(server_, path_)->get());
46  //* getT()->addEdge(getT()->addNode(corbaServer::floatSeqToVector(cfgfrom)),
47  //* getT()->addNode(corbaServer::floatSeqToVector(cfgto )), path);
48 
49  void addNodeAndEdges (in floatSeq cfgfrom, in floatSeq cfgto, in Path path_) raises (Error);
50  //* core::PathPtr_t path (corbaServer::reference_to_servant_base<core::Path>(server_, path_)->get());
51  //* getT()->addEdges(getT()->addNode(corbaServer::floatSeqToVector(cfgfrom)),
52  //* getT()->addNode(corbaServer::floatSeqToVector(cfgto )), path);
53 
56  floatSeq nearestNode (in floatSeq config, out value_type distance,
57  in boolean reverse) raises (Error);
58  //* return corbaServer::vectorToFloatSeq(*(getT()->nearestNode(
59  //* corbaServer::floatSeqToVector(config), distance, reverse)->configuration()));
60 
61  floatSeqSeq nearestNodes (in floatSeq config, out size_type k) raises (Error);
62  //* hpp::core::Nodes_t nodes = getT()->nearestNodes(
63  //* corbaServer::floatSeqToVector(config), k);
64  //* hpp::core::matrix_t configs (nodes.size(), config.length());
65  //* size_type i = 0;
66  //* for (hpp::core::Nodes_t::const_iterator _node = nodes.begin(); _node != nodes.end(); ++_node)
67  //* configs.row(i++) = *((*_node)->configuration());
68  //* return corbaServer::matrixToFloatSeqSeq(configs);
69 
70  size_type getNbNodes () raises (Error);
71  //* return getT()->nodes().size();
72 
73  floatSeq getNode (in size_type i) raises (Error);
74  //* return corbaServer::vectorToFloatSeq(*((*std::next(getT()->nodes().begin(), i))->configuration()));
75 
76  size_type getNbEdges () raises (Error);
77  //* return getT()->edges().size();
78 
79  Path getEdge (in size_type i) raises (Error);
80  //* return corbaServer::makeServant<hpp::core_idl::Path_ptr> (server_,
81  //* new Path (server_, (*std::next(getT()->edges().begin(),i))->path()));
82  ConnectedComponentSeq getConnectedComponents () raises(Error);
83  //-> connectedComponents
84  }; // interface Roadmap
85 
86  interface PathPlanner
87  {
89 
90  PathVector solve () raises (Error);
91 
92  void startSolve () raises (Error);
93 
94  void tryConnectInitAndGoals () raises (Error);
95 
96  void oneStep () raises (Error);
97 
98  PathVector computePath () raises (Error);
99 
100  PathVector finishSolve (in PathVector path) raises (Error);
101 
102  void interrupt () raises (Error);
103 
104  void maxIterations (in size_type n) raises (Error);
105 
106  void timeOut(in value_type seconds) raises (Error);
107 
108  Roadmap getRoadmap() raises (Error);
109  //-> roadmap
110 
111  void stopWhenProblemIsSolved(in boolean enable) raises (Error);
112  }; // interface PathPlanner
113 
114  interface PathOptimizer
115  {
117 
118  PathVector optimize (in PathVector path) raises (Error);
119 
120  void interrupt () raises (Error);
121 
122  void maxIterations (in size_type n) raises (Error);
123 
124  void timeOut(in value_type seconds) raises (Error);
125  }; // interface PathOptimizer
126 
127  }; // module core
128 }; // module hpp
129 
130 //* #include <iterator>
131 //* #include <hpp/pinocchio/serialization.hh>
132 //* #include <hpp/core/connected-component.hh>
133 //* #include <hpp/core/path-planner.hh>
134 //* #include <hpp/core/path-optimizer.hh>
135 //* #include <hpp/core/roadmap.hh>
136 //* #include <hpp/core/edge.hh>
137 //* #include <hpp/core/node.hh>
138 //* #include <hpp/core_idl/paths.hh>
139 
140 #endif // HPP_CORE_PATH_PLANNERS_IDL
#define HPP_EXPOSE_MEMORY_DEALLOCATION(ErrorType)
Definition: common.idl:14
Definition: path_planners.idl:37
Definition: path_planners.idl:86
Implement CORBA interface `‘Obstacle’&#39;.
Definition: client.hh:46
double value_type
Definition: common.idl:18
Corba exception travelling through the Corba channel.
Definition: common.idl:26
Definition: path_planners.idl:114
Definition: paths-idl.hh:157
Definition: common-idl.hh:803
sequence< ConnectedComponent > ConnectedComponentSeq
Definition: path_planners.idl:33
Definition: paths.idl:22
Definition: common-idl.hh:689
Definition: path_planners.idl:22
Definition: path_planners-idl.hh:224
Definition: paths.idl:67
long long size_type
Definition: common.idl:19