hpp-corbaserver  6.0.0
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 
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  //* if (getT()->nodes().size() == 0) throw std::logic_error(
59  //* "hpp::core::Roadmap::nearestNode: roadmap is empty");
60  //* return corbaServer::vectorToFloatSeq(getT()->nearestNode(
61  //* corbaServer::floatSeqToVector(config), distance, reverse)->configuration());
62 
63  floatSeqSeq nearestNodes (in floatSeq config, out size_type k) raises (Error);
64  //* hpp::core::Nodes_t nodes = getT()->nearestNodes(
65  //* corbaServer::floatSeqToVector(config), k);
66  //* hpp::core::matrix_t configs (nodes.size(), config.length());
67  //* size_type i = 0;
68  //* for (hpp::core::Nodes_t::const_iterator _node = nodes.begin(); _node != nodes.end(); ++_node)
69  //* configs.row(i++) = (*_node)->configuration();
70  //* return corbaServer::matrixToFloatSeqSeq(configs);
71 
72  size_type getNbNodes () raises (Error);
73  //* return getT()->nodes().size();
74 
75  floatSeq getNode (in size_type i) raises (Error);
76  //* return corbaServer::vectorToFloatSeq((*std::next(getT()->nodes().begin(), i))->configuration());
77 
78  size_type getNbEdges () raises (Error);
79  //* return getT()->edges().size();
80 
81  Path getEdge (in size_type i) raises (Error);
82  //* return corbaServer::makeServant<hpp::core_idl::Path_ptr> (server_,
83  //* new Path (server_, (*std::next(getT()->edges().begin(),i))->path()));
84  ConnectedComponentSeq getConnectedComponents () raises(Error);
85  //-> connectedComponents
86  }; // interface Roadmap
87 
88  interface PathPlanner
89  {
91 
92  PathVector solve () raises (Error);
93 
94  void startSolve () raises (Error);
95 
96  void tryConnectInitAndGoals () raises (Error);
97 
98  void oneStep () raises (Error);
99 
100  PathVector computePath () raises (Error);
101 
102  PathVector finishSolve (in PathVector path) raises (Error);
103 
104  void interrupt () raises (Error);
105 
106  void maxIterations (in size_type n) raises (Error);
107 
108  void timeOut(in value_type seconds) raises (Error);
109 
110  Roadmap getRoadmap() raises (Error);
111  //-> roadmap
112 
113  void stopWhenProblemIsSolved(in boolean enable) raises (Error);
114  }; // interface PathPlanner
115 
116  interface PathOptimizer
117  {
119 
120  PathVector optimize (in PathVector path) raises (Error);
121 
122  void interrupt () raises (Error);
123 
124  void maxIterations (in size_type n) raises (Error);
125 
126  void timeOut(in value_type seconds) raises (Error);
127  }; // interface PathOptimizer
128 
129  }; // module core
130 }; // module hpp
131 
132 //* #include <iterator>
133 //* #include <hpp/pinocchio/serialization.hh>
134 //* #include <hpp/core/connected-component.hh>
135 //* #include <hpp/core/path-planner.hh>
136 //* #include <hpp/core/path-optimizer.hh>
137 //* #include <hpp/core/roadmap.hh>
138 //* #include <hpp/core/edge.hh>
139 //* #include <hpp/core/node.hh>
140 //* #include <hpp/core_idl/paths.hh>
141 
142 #endif // HPP_CORE_PATH_PLANNERS_IDL
Definition: path_planners-idl.hh:228
Definition: paths-idl.hh:157
Definition: common-idl.hh:803
Definition: common-idl.hh:689
#define HPP_EXPOSE_MEMORY_DEALLOCATION(ErrorType)
Definition: common.idl:14
Corba exception travelling through the Corba channel.
Definition: common.idl:27
Definition: path_planners.idl:22
Definition: path_planners.idl:117
Definition: path_planners.idl:89
Definition: paths.idl:67
Definition: paths.idl:23
Definition: path_planners.idl:37
Implement CORBA interface `‘Obstacle’'.
Definition: client.hh:46
long long size_type
Definition: common.idl:19
double value_type
Definition: common.idl:18