Line |
Branch |
Exec |
Source |
1 |
|
|
#ifndef hpp_manipulation_idl____path__planners_hxx__ |
2 |
|
|
#define hpp_manipulation_idl____path__planners_hxx__ |
3 |
|
|
|
4 |
|
|
// |
5 |
|
|
// Implemention of IDL interfaces in file /root/robotpkg/path/py-hpp-manipulation-corba/work/hpp-manipulation-corba-6.0.0/idl/hpp/manipulation_idl/_path_planners.idl |
6 |
|
|
// |
7 |
|
|
|
8 |
|
|
#include <hpp/manipulation_idl/_path_planners-fwd.hh> |
9 |
|
|
|
10 |
|
|
#include <sstream> |
11 |
|
|
|
12 |
|
|
#include <hpp/corbaserver/fwd.hh> |
13 |
|
|
#include <hpp/corbaserver/conversions.hh> |
14 |
|
|
#include "hpp/corbaserver/servant-base.hh" |
15 |
|
|
|
16 |
|
|
|
17 |
|
|
|
18 |
|
|
// |
19 |
|
|
// Implementational code for IDL interface hpp::manipulation_idl::Roadmap |
20 |
|
|
// |
21 |
|
|
namespace hpp { |
22 |
|
|
|
23 |
|
|
namespace manipulation_impl { |
24 |
|
|
template <typename _Base, typename _Storage> |
25 |
|
✗ |
RoadmapServant<_Base, _Storage>::RoadmapServant(::hpp::corbaServer::Server* server, |
26 |
|
|
const _Storage& s) |
27 |
|
✗ |
: hpp::core_impl::RoadmapServant<_Base, _Storage> (server, s) |
28 |
|
|
{ |
29 |
|
|
// add extra constructor code here |
30 |
|
|
} |
31 |
|
|
template <typename _Base, typename _Storage> |
32 |
|
✗ |
RoadmapServant<_Base, _Storage>::~RoadmapServant() |
33 |
|
|
{ |
34 |
|
|
// add extra destructor code here |
35 |
|
|
} |
36 |
|
|
|
37 |
|
|
// Methods corresponding to IDL attributes and operations |
38 |
|
|
|
39 |
|
|
template <typename _Base, typename _Storage> |
40 |
|
✗ |
void RoadmapServant<_Base, _Storage>::constraintGraph (hpp::manipulation_idl::graph_idl::Graph_ptr graph) |
41 |
|
|
{ |
42 |
|
|
try { |
43 |
|
|
// automatically generated code. |
44 |
|
✗ |
hpp::manipulation::graph::GraphPtr_t _graph = ::hpp::corbaServer::reference_to_object<hpp::manipulation::graph::Graph>(server_, graph); |
45 |
|
✗ |
(getT()->constraintGraph (_graph)); |
46 |
|
|
|
47 |
|
|
|
48 |
|
✗ |
} catch (const std::exception& e) { |
49 |
|
✗ |
throw ::hpp::Error (e.what()); |
50 |
|
|
} |
51 |
|
|
} |
52 |
|
|
|
53 |
|
|
// End of implementational code |
54 |
|
|
} // namespace manipulation_impl |
55 |
|
|
|
56 |
|
|
} // namespace hpp |
57 |
|
|
|
58 |
|
|
// |
59 |
|
|
// Implementational code for IDL interface hpp::manipulation_idl::pathPlanner_idl::IkSolverInitialization |
60 |
|
|
// |
61 |
|
|
namespace hpp { |
62 |
|
|
|
63 |
|
|
namespace manipulation_impl { |
64 |
|
|
|
65 |
|
|
namespace pathPlanner_impl { |
66 |
|
|
template <typename _Base, typename _Storage> |
67 |
|
✗ |
IkSolverInitializationServant<_Base, _Storage>::IkSolverInitializationServant(::hpp::corbaServer::Server* server, |
68 |
|
|
const _Storage& s) |
69 |
|
✗ |
: hpp::corbaServer::ServantBase<hpp::manipulation::pathPlanner::IkSolverInitialization, _Storage> (server, s) |
70 |
|
|
{ |
71 |
|
|
// add extra constructor code here |
72 |
|
|
} |
73 |
|
|
template <typename _Base, typename _Storage> |
74 |
|
✗ |
IkSolverInitializationServant<_Base, _Storage>::~IkSolverInitializationServant() |
75 |
|
|
{ |
76 |
|
|
// add extra destructor code here |
77 |
|
|
} |
78 |
|
|
|
79 |
|
|
// Methods corresponding to IDL attributes and operations |
80 |
|
|
|
81 |
|
|
// End of implementational code |
82 |
|
|
} // namespace pathPlanner_impl |
83 |
|
|
|
84 |
|
|
} // namespace manipulation_impl |
85 |
|
|
|
86 |
|
|
} // namespace hpp |
87 |
|
|
|
88 |
|
|
// |
89 |
|
|
// Implementational code for IDL interface hpp::manipulation_idl::pathPlanner_idl::EndEffectorTrajectory |
90 |
|
|
// |
91 |
|
|
namespace hpp { |
92 |
|
|
|
93 |
|
|
namespace manipulation_impl { |
94 |
|
|
|
95 |
|
|
namespace pathPlanner_impl { |
96 |
|
|
template <typename _Base, typename _Storage> |
97 |
|
✗ |
EndEffectorTrajectoryServant<_Base, _Storage>::EndEffectorTrajectoryServant(::hpp::corbaServer::Server* server, |
98 |
|
|
const _Storage& s) |
99 |
|
✗ |
: hpp::core_impl::PathPlannerServant<_Base, _Storage> (server, s) |
100 |
|
|
{ |
101 |
|
|
// add extra constructor code here |
102 |
|
|
} |
103 |
|
|
template <typename _Base, typename _Storage> |
104 |
|
✗ |
EndEffectorTrajectoryServant<_Base, _Storage>::~EndEffectorTrajectoryServant() |
105 |
|
|
{ |
106 |
|
|
// add extra destructor code here |
107 |
|
|
} |
108 |
|
|
|
109 |
|
|
// Methods corresponding to IDL attributes and operations |
110 |
|
|
|
111 |
|
|
template <typename _Base, typename _Storage> |
112 |
|
✗ |
::CORBA::Long EndEffectorTrajectoryServant<_Base, _Storage>::getNRandomConfig () |
113 |
|
|
{ |
114 |
|
|
try { |
115 |
|
|
// automatically generated code. |
116 |
|
|
|
117 |
|
✗ |
::CORBA::Long __return__ (getT()->nRandomConfig ()); |
118 |
|
|
|
119 |
|
✗ |
return __return__; |
120 |
|
✗ |
} catch (const std::exception& e) { |
121 |
|
✗ |
throw ::hpp::Error (e.what()); |
122 |
|
|
} |
123 |
|
|
} |
124 |
|
|
|
125 |
|
|
template <typename _Base, typename _Storage> |
126 |
|
✗ |
void EndEffectorTrajectoryServant<_Base, _Storage>::setNRandomConfig (::CORBA::Long n) |
127 |
|
|
{ |
128 |
|
|
try { |
129 |
|
|
// automatically generated code. |
130 |
|
|
|
131 |
|
✗ |
(getT()->nRandomConfig (n)); |
132 |
|
|
|
133 |
|
|
|
134 |
|
✗ |
} catch (const std::exception& e) { |
135 |
|
✗ |
throw ::hpp::Error (e.what()); |
136 |
|
|
} |
137 |
|
|
} |
138 |
|
|
|
139 |
|
|
template <typename _Base, typename _Storage> |
140 |
|
✗ |
::CORBA::Long EndEffectorTrajectoryServant<_Base, _Storage>::getNDiscreteSteps () |
141 |
|
|
{ |
142 |
|
|
try { |
143 |
|
|
// automatically generated code. |
144 |
|
|
|
145 |
|
✗ |
::CORBA::Long __return__ (getT()->nDiscreteSteps ()); |
146 |
|
|
|
147 |
|
✗ |
return __return__; |
148 |
|
✗ |
} catch (const std::exception& e) { |
149 |
|
✗ |
throw ::hpp::Error (e.what()); |
150 |
|
|
} |
151 |
|
|
} |
152 |
|
|
|
153 |
|
|
template <typename _Base, typename _Storage> |
154 |
|
✗ |
void EndEffectorTrajectoryServant<_Base, _Storage>::setNDiscreteSteps (::CORBA::Long n) |
155 |
|
|
{ |
156 |
|
|
try { |
157 |
|
|
// automatically generated code. |
158 |
|
|
|
159 |
|
✗ |
(getT()->nDiscreteSteps (n)); |
160 |
|
|
|
161 |
|
|
|
162 |
|
✗ |
} catch (const std::exception& e) { |
163 |
|
✗ |
throw ::hpp::Error (e.what()); |
164 |
|
|
} |
165 |
|
|
} |
166 |
|
|
|
167 |
|
|
template <typename _Base, typename _Storage> |
168 |
|
✗ |
::CORBA::Boolean EndEffectorTrajectoryServant<_Base, _Storage>::getCheckFeasibilityOnly () |
169 |
|
|
{ |
170 |
|
|
try { |
171 |
|
|
// automatically generated code. |
172 |
|
|
|
173 |
|
✗ |
::CORBA::Boolean __return__ (getT()->checkFeasibilityOnly ()); |
174 |
|
|
|
175 |
|
✗ |
return __return__; |
176 |
|
✗ |
} catch (const std::exception& e) { |
177 |
|
✗ |
throw ::hpp::Error (e.what()); |
178 |
|
|
} |
179 |
|
|
} |
180 |
|
|
|
181 |
|
|
template <typename _Base, typename _Storage> |
182 |
|
✗ |
void EndEffectorTrajectoryServant<_Base, _Storage>::setCheckFeasibilityOnly (::CORBA::Boolean n) |
183 |
|
|
{ |
184 |
|
|
try { |
185 |
|
|
// automatically generated code. |
186 |
|
|
|
187 |
|
✗ |
(getT()->checkFeasibilityOnly (n)); |
188 |
|
|
|
189 |
|
|
|
190 |
|
✗ |
} catch (const std::exception& e) { |
191 |
|
✗ |
throw ::hpp::Error (e.what()); |
192 |
|
|
} |
193 |
|
|
} |
194 |
|
|
|
195 |
|
|
template <typename _Base, typename _Storage> |
196 |
|
✗ |
void EndEffectorTrajectoryServant<_Base, _Storage>::setIkSolverInitialization (hpp::manipulation_idl::pathPlanner_idl::IkSolverInitialization_ptr solver) |
197 |
|
|
{ |
198 |
|
|
try { |
199 |
|
|
// automatically generated code. |
200 |
|
✗ |
hpp::manipulation::pathPlanner::IkSolverInitializationPtr_t _solver = ::hpp::corbaServer::reference_to_object<hpp::manipulation::pathPlanner::IkSolverInitialization>(server_, solver); |
201 |
|
✗ |
(getT()->ikSolverInitialization (_solver)); |
202 |
|
|
|
203 |
|
|
|
204 |
|
✗ |
} catch (const std::exception& e) { |
205 |
|
✗ |
throw ::hpp::Error (e.what()); |
206 |
|
|
} |
207 |
|
|
} |
208 |
|
|
|
209 |
|
|
// End of implementational code |
210 |
|
|
} // namespace pathPlanner_impl |
211 |
|
|
|
212 |
|
|
} // namespace manipulation_impl |
213 |
|
|
|
214 |
|
|
} // namespace hpp |
215 |
|
|
|
216 |
|
|
// |
217 |
|
|
// Implementational code for IDL interface hpp::manipulation_idl::pathPlanner_idl::TransitionPlanner |
218 |
|
|
// |
219 |
|
|
namespace hpp { |
220 |
|
|
|
221 |
|
|
namespace manipulation_impl { |
222 |
|
|
|
223 |
|
|
namespace pathPlanner_impl { |
224 |
|
|
template <typename _Base, typename _Storage> |
225 |
|
✗ |
TransitionPlannerServant<_Base, _Storage>::TransitionPlannerServant(::hpp::corbaServer::Server* server, |
226 |
|
|
const _Storage& s) |
227 |
|
✗ |
: hpp::core_impl::PathPlannerServant<_Base, _Storage> (server, s) |
228 |
|
|
{ |
229 |
|
|
// add extra constructor code here |
230 |
|
|
} |
231 |
|
|
template <typename _Base, typename _Storage> |
232 |
|
✗ |
TransitionPlannerServant<_Base, _Storage>::~TransitionPlannerServant() |
233 |
|
|
{ |
234 |
|
|
// add extra destructor code here |
235 |
|
|
} |
236 |
|
|
|
237 |
|
|
// Methods corresponding to IDL attributes and operations |
238 |
|
|
|
239 |
|
|
template <typename _Base, typename _Storage> |
240 |
|
✗ |
hpp::core_idl::PathVector_ptr TransitionPlannerServant<_Base, _Storage>::planPath (const hpp::floatSeq& qInit, const hpp::floatSeqSeq& qGoals, ::CORBA::Boolean resetRoadmap) |
241 |
|
|
{ |
242 |
|
|
try { |
243 |
|
|
// automatically generated code. |
244 |
|
✗ |
hpp::core::vector_t _qInit = hpp::corbaServer::floatSeqToVector (qInit); |
245 |
|
✗ |
hpp::core::matrix_t _qGoals = hpp::corbaServer::floatSeqSeqToMatrix (qGoals); |
246 |
|
✗ |
hpp::core::PathVectorPtr_t __return__ (getT()->planPath (_qInit, _qGoals, resetRoadmap)); |
247 |
|
|
|
248 |
|
✗ |
return ::hpp::corbaServer::makeServantDownCast<hpp::core_impl::Path,hpp::core_impl::PathVector>(server_, __return__)._retn(); |
249 |
|
✗ |
} catch (const std::exception& e) { |
250 |
|
✗ |
throw ::hpp::Error (e.what()); |
251 |
|
|
} |
252 |
|
|
} |
253 |
|
|
|
254 |
|
|
template <typename _Base, typename _Storage> |
255 |
|
✗ |
hpp::core_idl::Path_ptr TransitionPlannerServant<_Base, _Storage>::directPath (const hpp::floatSeq& q1, const hpp::floatSeq& q2, ::CORBA::Boolean validate, ::CORBA::Boolean& success, ::CORBA::String_out status) |
256 |
|
|
{ |
257 |
|
|
try { |
258 |
|
|
// automatically generated code. |
259 |
|
✗ |
hpp::core::vector_t _q1 = hpp::corbaServer::floatSeqToVector (q1); |
260 |
|
✗ |
hpp::core::vector_t _q2 = hpp::corbaServer::floatSeqToVector (q2); |
261 |
|
✗ |
std::string _status; |
262 |
|
✗ |
hpp::core::PathPtr_t __return__ (getT()->directPath (_q1, _q2, validate, success, _status)); |
263 |
|
✗ |
status = hpp::corbaServer::c_str (_status); |
264 |
|
✗ |
return ::hpp::corbaServer::makeServantDownCast<hpp::core_impl::Path,hpp::core_impl::Path>(server_, __return__)._retn(); |
265 |
|
✗ |
} catch (const std::exception& e) { |
266 |
|
✗ |
throw ::hpp::Error (e.what()); |
267 |
|
|
} |
268 |
|
|
} |
269 |
|
|
|
270 |
|
|
template <typename _Base, typename _Storage> |
271 |
|
✗ |
::CORBA::Boolean TransitionPlannerServant<_Base, _Storage>::validateConfiguration (const hpp::floatSeq& config, hpp::manipulation_idl::size_t id, hpp::manipulation_idl::ValidationReport_out report) |
272 |
|
|
{ |
273 |
|
|
try { |
274 |
|
|
// generated from /root/robotpkg/path/py-hpp-manipulation-corba/work/hpp-manipulation-corba-6.0.0/idl/hpp/manipulation_idl/_path_planners.idl:76 |
275 |
|
|
using namespace hpp::core; |
276 |
|
✗ |
Configuration_t q(corbaServer::floatSeqToVector(config)); |
277 |
|
✗ |
ValidationReportPtr_t vr; |
278 |
|
✗ |
bool res = getT()->validateConfiguration(q, id, vr); |
279 |
|
✗ |
if (vr) { |
280 |
|
✗ |
std::ostringstream oss; oss << *vr; |
281 |
|
✗ |
std::string res = oss.str(); |
282 |
|
✗ |
report = CORBA::string_dup(res.c_str()); |
283 |
|
✗ |
} else { |
284 |
|
✗ |
report = CORBA::string_dup(""); |
285 |
|
|
} |
286 |
|
✗ |
return res; |
287 |
|
|
|
288 |
|
✗ |
} catch (const std::exception& e) { |
289 |
|
✗ |
throw ::hpp::Error (e.what()); |
290 |
|
|
} |
291 |
|
|
} |
292 |
|
|
|
293 |
|
|
template <typename _Base, typename _Storage> |
294 |
|
✗ |
hpp::core_idl::PathVector_ptr TransitionPlannerServant<_Base, _Storage>::optimizePath (hpp::core_idl::Path_ptr path) |
295 |
|
|
{ |
296 |
|
|
try { |
297 |
|
|
// automatically generated code. |
298 |
|
✗ |
hpp::core::PathPtr_t _path = ::hpp::corbaServer::reference_to_object<hpp::core::Path>(server_, path); |
299 |
|
✗ |
hpp::core::PathVectorPtr_t __return__ (getT()->optimizePath (_path)); |
300 |
|
|
|
301 |
|
✗ |
return ::hpp::corbaServer::makeServantDownCast<hpp::core_impl::Path,hpp::core_impl::PathVector>(server_, __return__)._retn(); |
302 |
|
✗ |
} catch (const std::exception& e) { |
303 |
|
✗ |
throw ::hpp::Error (e.what()); |
304 |
|
|
} |
305 |
|
|
} |
306 |
|
|
|
307 |
|
|
template <typename _Base, typename _Storage> |
308 |
|
✗ |
hpp::core_idl::PathVector_ptr TransitionPlannerServant<_Base, _Storage>::timeParameterization (hpp::core_idl::PathVector_ptr path) |
309 |
|
|
{ |
310 |
|
|
try { |
311 |
|
|
// automatically generated code. |
312 |
|
✗ |
hpp::core::PathVectorPtr_t _path = ::hpp::corbaServer::reference_to_object<hpp::core::PathVector>(server_, path); |
313 |
|
✗ |
hpp::core::PathVectorPtr_t __return__ (getT()->timeParameterization (_path)); |
314 |
|
|
|
315 |
|
✗ |
return ::hpp::corbaServer::makeServantDownCast<hpp::core_impl::Path,hpp::core_impl::PathVector>(server_, __return__)._retn(); |
316 |
|
✗ |
} catch (const std::exception& e) { |
317 |
|
✗ |
throw ::hpp::Error (e.what()); |
318 |
|
|
} |
319 |
|
|
} |
320 |
|
|
|
321 |
|
|
template <typename _Base, typename _Storage> |
322 |
|
✗ |
void TransitionPlannerServant<_Base, _Storage>::setReedsAndSheppSteeringMethod (::CORBA::Double turningRadius) |
323 |
|
|
{ |
324 |
|
|
try { |
325 |
|
|
// automatically generated code. |
326 |
|
|
|
327 |
|
✗ |
(getT()->setReedsAndSheppSteeringMethod (turningRadius)); |
328 |
|
|
|
329 |
|
|
|
330 |
|
✗ |
} catch (const std::exception& e) { |
331 |
|
✗ |
throw ::hpp::Error (e.what()); |
332 |
|
|
} |
333 |
|
|
} |
334 |
|
|
|
335 |
|
|
template <typename _Base, typename _Storage> |
336 |
|
✗ |
void TransitionPlannerServant<_Base, _Storage>::setEdge (::CORBA::Long id) |
337 |
|
|
{ |
338 |
|
|
try { |
339 |
|
|
// automatically generated code. |
340 |
|
|
|
341 |
|
✗ |
(getT()->setEdge (id)); |
342 |
|
|
|
343 |
|
|
|
344 |
|
✗ |
} catch (const std::exception& e) { |
345 |
|
✗ |
throw ::hpp::Error (e.what()); |
346 |
|
|
} |
347 |
|
|
} |
348 |
|
|
|
349 |
|
|
template <typename _Base, typename _Storage> |
350 |
|
✗ |
void TransitionPlannerServant<_Base, _Storage>::setPathProjector (const char* pathProjectorType, ::CORBA::Double tolerance) |
351 |
|
|
{ |
352 |
|
|
try { |
353 |
|
|
// generated from /root/robotpkg/path/py-hpp-manipulation-corba/work/hpp-manipulation-corba-6.0.0/idl/hpp/manipulation_idl/_path_planners.idl:76 |
354 |
|
✗ |
std::string _pathProjectorType (pathProjectorType); |
355 |
|
✗ |
core::ProblemSolverPtr_t ps = server_->problemSolver(); |
356 |
|
✗ |
core::PathProjectorBuilder_t factory(ps->pathProjectors.get |
357 |
|
✗ |
(_pathProjectorType)); |
358 |
|
✗ |
core::PathProjectorPtr_t pathProjector(factory(getT()-> |
359 |
|
|
innerProblem(), tolerance)); |
360 |
|
✗ |
(getT()->pathProjector (pathProjector)); |
361 |
|
|
|
362 |
|
✗ |
} catch (const std::exception& e) { |
363 |
|
✗ |
throw ::hpp::Error (e.what()); |
364 |
|
|
} |
365 |
|
|
} |
366 |
|
|
|
367 |
|
|
template <typename _Base, typename _Storage> |
368 |
|
✗ |
void TransitionPlannerServant<_Base, _Storage>::clearPathOptimizers () |
369 |
|
|
{ |
370 |
|
|
try { |
371 |
|
|
// automatically generated code. |
372 |
|
|
|
373 |
|
✗ |
(getT()->clearPathOptimizers ()); |
374 |
|
|
|
375 |
|
|
|
376 |
|
✗ |
} catch (const std::exception& e) { |
377 |
|
✗ |
throw ::hpp::Error (e.what()); |
378 |
|
|
} |
379 |
|
|
} |
380 |
|
|
|
381 |
|
|
template <typename _Base, typename _Storage> |
382 |
|
✗ |
void TransitionPlannerServant<_Base, _Storage>::addPathOptimizer (const char* pathOptimizerType) |
383 |
|
|
{ |
384 |
|
|
try { |
385 |
|
|
// generated from /root/robotpkg/path/py-hpp-manipulation-corba/work/hpp-manipulation-corba-6.0.0/idl/hpp/manipulation_idl/_path_planners.idl:76 |
386 |
|
✗ |
std::string _pathOptimizerType (pathOptimizerType); |
387 |
|
✗ |
core::ProblemSolverPtr_t ps = server_->problemSolver(); |
388 |
|
✗ |
core::PathOptimizerBuilder_t factory(ps->pathOptimizers.get |
389 |
|
✗ |
(_pathOptimizerType)); |
390 |
|
✗ |
core::PathOptimizerPtr_t pathOptimizer(factory(getT()-> |
391 |
|
|
problem())); |
392 |
|
✗ |
(getT()->addPathOptimizer (pathOptimizer)); |
393 |
|
|
|
394 |
|
✗ |
} catch (const std::exception& e) { |
395 |
|
✗ |
throw ::hpp::Error (e.what()); |
396 |
|
|
} |
397 |
|
|
} |
398 |
|
|
|
399 |
|
|
template <typename _Base, typename _Storage> |
400 |
|
✗ |
void TransitionPlannerServant<_Base, _Storage>::setParameter (const char* name, const ::CORBA::Any& value) |
401 |
|
|
{ |
402 |
|
|
try { |
403 |
|
|
// generated from /root/robotpkg/path/py-hpp-manipulation-corba/work/hpp-manipulation-corba-6.0.0/idl/hpp/manipulation_idl/_path_planners.idl:76 |
404 |
|
✗ |
getT()->innerProblem()->setParameter(name, |
405 |
|
|
hpp::corbaServer::toParameter(value)); |
406 |
|
|
|
407 |
|
✗ |
} catch (const std::exception& e) { |
408 |
|
✗ |
throw ::hpp::Error (e.what()); |
409 |
|
|
} |
410 |
|
|
} |
411 |
|
|
|
412 |
|
|
// End of implementational code |
413 |
|
|
} // namespace pathPlanner_impl |
414 |
|
|
|
415 |
|
|
} // namespace manipulation_impl |
416 |
|
|
|
417 |
|
|
} // namespace hpp |
418 |
|
|
|
419 |
|
|
|
420 |
|
|
|
421 |
|
|
|
422 |
|
|
|
423 |
|
|
#endif // hpp_manipulation_idl____path__planners_hxx__ |
424 |
|
|
|
425 |
|
|
|