hpp-corbaserver  4.14.0
Corba server for Humanoid Path Planner applications
path_validations.hh
Go to the documentation of this file.
1 #ifndef hpp_core_idl__path__validations_hxx__
2 #define hpp_core_idl__path__validations_hxx__
3 
4 //
5 // Implemention of IDL interfaces in file /local/robotpkg/var/tmp/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-4.14.0/idl/hpp/core_idl/path_validations.idl
6 //
7 
9 
10 #include <sstream>
11 
12 #include <hpp/corbaserver/fwd.hh>
15 
16 
17 
18 //
19 // Implementational code for IDL interface hpp::core_idl::ConfigValidation
20 //
21 namespace hpp {
22 
23 namespace core_impl {
24 template <typename _Base, typename _Storage>
26  const _Storage& s)
27  : hpp::corbaServer::ServantBase<hpp::core::ConfigValidation, _Storage> (server, s)
28 {
29  // add extra constructor code here
30 }
31 template <typename _Base, typename _Storage>
33 {
34  // add extra destructor code here
35 }
36 
37 // Methods corresponding to IDL attributes and operations
38 
39 template <typename _Base, typename _Storage>
41 {
42  try {
43  // generated from /local/robotpkg/var/tmp/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-4.14.0/idl/hpp/core_idl/path_validations.idl:31
44  using namespace hpp::core;
45  ValidationReportPtr_t vr;
46 
47  bool res = get()->validate (hpp::corbaServer::floatSeqToVector(config), vr);
48 
49  if (vr) {
50  std::ostringstream oss; oss << *vr;
51  std::string res = oss.str();
52  report = CORBA::string_dup(res.c_str());
53  } else {
54  report = CORBA::string_dup("");
55  }
56 
57  return res;
58 
59  } catch (const std::exception& e) {
60  throw ::hpp::Error (e.what());
61  }
62 }
63 
64 // End of implementational code
65 } // namespace core_impl
66 
67 } // namespace hpp
68 
69 //
70 // Implementational code for IDL interface hpp::core_idl::ConfigValidations
71 //
72 namespace hpp {
73 
74 namespace core_impl {
75 template <typename _Base, typename _Storage>
77  const _Storage& s)
78  : hpp::core_impl::ConfigValidationServant<_Base, _Storage> (server, s)
79 {
80  // add extra constructor code here
81 }
82 template <typename _Base, typename _Storage>
84 {
85  // add extra destructor code here
86 }
87 
88 // Methods corresponding to IDL attributes and operations
89 
90 template <typename _Base, typename _Storage>
92 {
93  try {
94  // automatically generated code.
95  hpp::core::ConfigValidationPtr_t _validation = ::hpp::corbaServer::reference_to_object<hpp::core::ConfigValidation>(server_, validation);
96  (getT()->add (_validation));
97 
98 
99  } catch (const std::exception& e) {
100  throw ::hpp::Error (e.what());
101  }
102 }
103 
104 template <typename _Base, typename _Storage>
106 {
107  try {
108  // automatically generated code.
109 
110  hpp::size_type __return__ (getT()->numberConfigValidations ());
111 
112  return __return__;
113  } catch (const std::exception& e) {
114  throw ::hpp::Error (e.what());
115  }
116 }
117 
118 template <typename _Base, typename _Storage>
120 {
121  try {
122  // automatically generated code.
123 
124  (getT()->clear ());
125 
126 
127  } catch (const std::exception& e) {
128  throw ::hpp::Error (e.what());
129  }
130 }
131 
132 template <typename _Base, typename _Storage>
134 {
135  try {
136  // automatically generated code.
138  (getT()->setSecurityMargins (_margins));
139 
140 
141  } catch (const std::exception& e) {
142  throw ::hpp::Error (e.what());
143  }
144 }
145 
146 template <typename _Base, typename _Storage>
148 {
149  try {
150  // automatically generated code.
151  std::string _body_a (body_a);
152  std::string _body_b (body_b);
153  (getT()->setSecurityMarginBetweenBodies (_body_a, _body_b, margin));
154 
155 
156  } catch (const std::exception& e) {
157  throw ::hpp::Error (e.what());
158  }
159 }
160 
161 template <typename _Base, typename _Storage>
163 {
164  try {
165  // automatically generated code.
166  hpp::core::RelativeMotion::matrix_type _relMotion = hpp::corbaServer::intSeqSeqToMatrix (relMotion).cast<hpp::core::RelativeMotion::RelativeMotionType>();
167  (getT()->filterCollisionPairs (_relMotion));
168 
169 
170  } catch (const std::exception& e) {
171  throw ::hpp::Error (e.what());
172  }
173 }
174 
175 // End of implementational code
176 } // namespace core_impl
177 
178 } // namespace hpp
179 
180 //
181 // Implementational code for IDL interface hpp::core_idl::CollisionValidation
182 //
183 namespace hpp {
184 
185 namespace core_impl {
186 template <typename _Base, typename _Storage>
188  const _Storage& s)
189  : hpp::core_impl::ConfigValidationServant<_Base, _Storage> (server, s)
190 {
191  // add extra constructor code here
192 }
193 template <typename _Base, typename _Storage>
195 {
196  // add extra destructor code here
197 }
198 
199 // Methods corresponding to IDL attributes and operations
200 
201 template <typename _Base, typename _Storage>
203 {
204  try {
205  // automatically generated code.
207  (getT()->setSecurityMargins (_margins));
208 
209 
210  } catch (const std::exception& e) {
211  throw ::hpp::Error (e.what());
212  }
213 }
214 
215 template <typename _Base, typename _Storage>
217 {
218  try {
219  // automatically generated code.
220  std::string _body_a (body_a);
221  std::string _body_b (body_b);
222  (getT()->setSecurityMarginBetweenBodies (_body_a, _body_b, margin));
223 
224 
225  } catch (const std::exception& e) {
226  throw ::hpp::Error (e.what());
227  }
228 }
229 
230 template <typename _Base, typename _Storage>
232 {
233  try {
234  // automatically generated code.
235  hpp::core::RelativeMotion::matrix_type _relMotion = hpp::corbaServer::intSeqSeqToMatrix (relMotion).cast<hpp::core::RelativeMotion::RelativeMotionType>();
236  (getT()->filterCollisionPairs (_relMotion));
237 
238 
239  } catch (const std::exception& e) {
240  throw ::hpp::Error (e.what());
241  }
242 }
243 
244 // End of implementational code
245 } // namespace core_impl
246 
247 } // namespace hpp
248 
249 //
250 // Implementational code for IDL interface hpp::core_idl::PathValidation
251 //
252 namespace hpp {
253 
254 namespace core_impl {
255 template <typename _Base, typename _Storage>
257  const _Storage& s)
258  : hpp::corbaServer::ServantBase<hpp::core::PathValidation, _Storage> (server, s)
259 {
260  // add extra constructor code here
261 }
262 template <typename _Base, typename _Storage>
264 {
265  // add extra destructor code here
266 }
267 
268 // Methods corresponding to IDL attributes and operations
269 
270 template <typename _Base, typename _Storage>
272 {
273  try {
274  // generated from /local/robotpkg/var/tmp/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-4.14.0/idl/hpp/core_idl/path_validations.idl:64
275  using namespace hpp::core;
276  PathPtr_t _p (::hpp::corbaServer::reference_to_servant_base<core::Path>(server_, p)->get());
277  PathPtr_t vp;
279 
280  bool res = get()->validate (_p, reverse, vp, pvr);
281 
282  if (pvr) {
283  std::ostringstream oss; oss << *pvr;
284  std::string res = oss.str();
285  report = CORBA::string_dup(res.c_str());
286  } else {
287  report = CORBA::string_dup("");
288  }
289 
290  validPart = ::hpp::corbaServer::makeServant<hpp::core_idl::Path_ptr> (server_, new Path (server_, vp));
291  return res;
292 
293  } catch (const std::exception& e) {
294  throw ::hpp::Error (e.what());
295  }
296 }
297 
298 template <typename _Base, typename _Storage>
300 {
301  try {
302  // generated from /local/robotpkg/var/tmp/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-4.14.0/idl/hpp/core_idl/path_validations.idl:64
303  using namespace hpp::core;
305  ValidationReportPtr_t vr;
306  bool res = get()->validate(q, vr);
307  if (vr) {
308  std::ostringstream oss; oss << *vr;
309  std::string res = oss.str();
310  report = CORBA::string_dup(res.c_str());
311  } else {
312  report = CORBA::string_dup("");
313  }
314  return res;
315 
316  } catch (const std::exception& e) {
317  throw ::hpp::Error (e.what());
318  }
319 }
320 
321 // End of implementational code
322 } // namespace core_impl
323 
324 } // namespace hpp
325 
326 //
327 // Implementational code for IDL interface hpp::core_idl::PathValidations
328 //
329 namespace hpp {
330 
331 namespace core_impl {
332 template <typename _Base, typename _Storage>
334  const _Storage& s)
335  : hpp::core_impl::PathValidationServant<_Base, _Storage> (server, s)
336 {
337  // add extra constructor code here
338 }
339 template <typename _Base, typename _Storage>
341 {
342  // add extra destructor code here
343 }
344 
345 // Methods corresponding to IDL attributes and operations
346 
347 template <typename _Base, typename _Storage>
349 {
350  try {
351  // automatically generated code.
353  (getT()->setSecurityMargins (_margins));
354 
355 
356  } catch (const std::exception& e) {
357  throw ::hpp::Error (e.what());
358  }
359 }
360 
361 template <typename _Base, typename _Storage>
363 {
364  try {
365  // automatically generated code.
366  std::string _body_a (body_a);
367  std::string _body_b (body_b);
368  (getT()->setSecurityMarginBetweenBodies (_body_a, _body_b, margin));
369 
370 
371  } catch (const std::exception& e) {
372  throw ::hpp::Error (e.what());
373  }
374 }
375 
376 template <typename _Base, typename _Storage>
378 {
379  try {
380  // automatically generated code.
381  hpp::core::RelativeMotion::matrix_type _relMotion = hpp::corbaServer::intSeqSeqToMatrix (relMotion).cast<hpp::core::RelativeMotion::RelativeMotionType>();
382  (getT()->filterCollisionPairs (_relMotion));
383 
384 
385  } catch (const std::exception& e) {
386  throw ::hpp::Error (e.what());
387  }
388 }
389 
390 // End of implementational code
391 } // namespace core_impl
392 
393 } // namespace hpp
394 
395 //
396 // Implementational code for IDL interface hpp::core_idl::ContinuousValidation
397 //
398 namespace hpp {
399 
400 namespace core_impl {
401 template <typename _Base, typename _Storage>
403  const _Storage& s)
404  : hpp::core_impl::PathValidationServant<_Base, _Storage> (server, s)
405 {
406  // add extra constructor code here
407 }
408 template <typename _Base, typename _Storage>
410 {
411  // add extra destructor code here
412 }
413 
414 // Methods corresponding to IDL attributes and operations
415 
416 template <typename _Base, typename _Storage>
418 {
419  try {
420  // automatically generated code.
422  (getT()->setSecurityMargins (_margins));
423 
424 
425  } catch (const std::exception& e) {
426  throw ::hpp::Error (e.what());
427  }
428 }
429 
430 template <typename _Base, typename _Storage>
432 {
433  try {
434  // automatically generated code.
435  std::string _body_a (body_a);
436  std::string _body_b (body_b);
437  (getT()->setSecurityMarginBetweenBodies (_body_a, _body_b, margin));
438 
439 
440  } catch (const std::exception& e) {
441  throw ::hpp::Error (e.what());
442  }
443 }
444 
445 template <typename _Base, typename _Storage>
447 {
448  try {
449  // automatically generated code.
450  hpp::core::RelativeMotion::matrix_type _relMotion = hpp::corbaServer::intSeqSeqToMatrix (relMotion).cast<hpp::core::RelativeMotion::RelativeMotionType>();
451  (getT()->filterCollisionPairs (_relMotion));
452 
453 
454  } catch (const std::exception& e) {
455  throw ::hpp::Error (e.what());
456  }
457 }
458 
459 // End of implementational code
460 } // namespace core_impl
461 
462 } // namespace hpp
463 
464 //
465 // Implementational code for IDL interface hpp::core_idl::pathValidation_idl::Discretized
466 //
467 namespace hpp {
468 
469 namespace core_impl {
470 
471 namespace pathValidation_impl {
472 template <typename _Base, typename _Storage>
474  const _Storage& s)
475  : hpp::core_impl::PathValidationServant<_Base, _Storage> (server, s)
476 {
477  // add extra constructor code here
478 }
479 template <typename _Base, typename _Storage>
481 {
482  // add extra destructor code here
483 }
484 
485 // Methods corresponding to IDL attributes and operations
486 
487 template <typename _Base, typename _Storage>
489 {
490  try {
491  // automatically generated code.
493  (getT()->setSecurityMargins (_margins));
494 
495 
496  } catch (const std::exception& e) {
497  throw ::hpp::Error (e.what());
498  }
499 }
500 
501 template <typename _Base, typename _Storage>
503 {
504  try {
505  // automatically generated code.
506  std::string _body_a (body_a);
507  std::string _body_b (body_b);
508  (getT()->setSecurityMarginBetweenBodies (_body_a, _body_b, margin));
509 
510 
511  } catch (const std::exception& e) {
512  throw ::hpp::Error (e.what());
513  }
514 }
515 
516 template <typename _Base, typename _Storage>
518 {
519  try {
520  // automatically generated code.
521  hpp::core::RelativeMotion::matrix_type _relMotion = hpp::corbaServer::intSeqSeqToMatrix (relMotion).cast<hpp::core::RelativeMotion::RelativeMotionType>();
522  (getT()->filterCollisionPairs (_relMotion));
523 
524 
525  } catch (const std::exception& e) {
526  throw ::hpp::Error (e.what());
527  }
528 }
529 
530 // End of implementational code
531 } // namespace pathValidation_impl
532 
533 } // namespace core_impl
534 
535 } // namespace hpp
536 
537 
538 
539 
540 
541 #endif // hpp_core_idl__path__validations_hxx__
542 
_objref_ConfigValidation * ConfigValidation_ptr
Definition: _problem-idl.hh:217
Implementation of Hpp module Corba server.
Definition: server.hh:77
void filterCollisionPairs(const hpp::core_idl::RelativeMotionMatrix &relMotion)
Definition: path_validations.hh:231
virtual ~CollisionValidationServant()
Definition: path_validations.hh:194
CollisionValidationServant(::hpp::corbaServer::Server *server, const _Storage &s)
Definition: path_validations.hh:187
void setSecurityMargins(const hpp::floatSeqSeq &margins)
Definition: path_validations.hh:202
void setSecurityMarginBetweenBodies(const char *body_a, const char *body_b, hpp::value_type margin)
Definition: path_validations.hh:216
Definition: path_validations-fwd.hh:35
ConfigValidationServant(::hpp::corbaServer::Server *server, const _Storage &s)
Definition: path_validations.hh:25
::CORBA::Boolean validate(const hpp::floatSeq &config, hpp::core_idl::ValidationReport_out report)
Definition: path_validations.hh:40
virtual ~ConfigValidationServant()
Definition: path_validations.hh:32
void setSecurityMarginBetweenBodies(const char *body_a, const char *body_b, hpp::value_type margin)
Definition: path_validations.hh:147
hpp::size_type numberConfigValidations()
Definition: path_validations.hh:105
virtual ~ConfigValidationsServant()
Definition: path_validations.hh:83
void setSecurityMargins(const hpp::floatSeqSeq &margins)
Definition: path_validations.hh:133
void filterCollisionPairs(const hpp::core_idl::RelativeMotionMatrix &relMotion)
Definition: path_validations.hh:162
ConfigValidationsServant(::hpp::corbaServer::Server *server, const _Storage &s)
Definition: path_validations.hh:76
void clear()
Definition: path_validations.hh:119
void add(hpp::core_idl::ConfigValidation_ptr validation)
Definition: path_validations.hh:91
void setSecurityMarginBetweenBodies(const char *body_a, const char *body_b, hpp::value_type margin)
Definition: path_validations.hh:431
virtual ~ContinuousValidationServant()
Definition: path_validations.hh:409
ContinuousValidationServant(::hpp::corbaServer::Server *server, const _Storage &s)
Definition: path_validations.hh:402
void filterCollisionPairs(const hpp::core_idl::RelativeMotionMatrix &relMotion)
Definition: path_validations.hh:446
void setSecurityMargins(const hpp::floatSeqSeq &margins)
Definition: path_validations.hh:417
Definition: paths-fwd.hh:28
Definition: path_validations-fwd.hh:169
::CORBA::Boolean validateConfiguration(const hpp::floatSeq &config, hpp::core_idl::ValidationReport_out report)
Definition: path_validations.hh:299
PathValidationServant(::hpp::corbaServer::Server *server, const _Storage &s)
Definition: path_validations.hh:256
::CORBA::Boolean validate(hpp::core_idl::Path_ptr p, ::CORBA::Boolean reverse, hpp::core_idl::Path_out validPart, hpp::core_idl::PathValidationReport_out report)
Definition: path_validations.hh:271
virtual ~PathValidationServant()
Definition: path_validations.hh:263
void setSecurityMarginBetweenBodies(const char *body_a, const char *body_b, hpp::value_type margin)
Definition: path_validations.hh:362
void filterCollisionPairs(const hpp::core_idl::RelativeMotionMatrix &relMotion)
Definition: path_validations.hh:377
virtual ~PathValidationsServant()
Definition: path_validations.hh:340
PathValidationsServant(::hpp::corbaServer::Server *server, const _Storage &s)
Definition: path_validations.hh:333
void setSecurityMargins(const hpp::floatSeqSeq &margins)
Definition: path_validations.hh:348
void setSecurityMargins(const hpp::floatSeqSeq &margins)
Definition: path_validations.hh:488
void setSecurityMarginBetweenBodies(const char *body_a, const char *body_b, hpp::value_type margin)
Definition: path_validations.hh:502
void filterCollisionPairs(const hpp::core_idl::RelativeMotionMatrix &relMotion)
Definition: path_validations.hh:517
virtual ~DiscretizedServant()
Definition: path_validations.hh:480
DiscretizedServant(::hpp::corbaServer::Server *server, const _Storage &s)
Definition: path_validations.hh:473
IntMatrix_t intSeqSeqToMatrix(const intSeqSeq &input, const size_type expectedRows=-1, const size_type expectedCols=-1)
core::matrix_t floatSeqSeqToMatrix(const floatSeqSeq &input, const size_type expectedRows=-1, const size_type expectedCols=-1)
core::PathValidationReportPtr_t PathValidationReportPtr_t
Definition: fwd.hh:98
pinocchio::Configuration_t Configuration_t
Definition: fwd.hh:66
core::PathPtr_t PathPtr_t
Definition: fwd.hh:97
vector_t floatSeqToVector(const floatSeq &dofArray, const size_type expectedSize=-1)
pinocchio::matrix_t matrix_t
Definition: fwd.hh:110
intSeqSeq RelativeMotionMatrix
Definition: path_validations.idl:28
Implement CORBA interface `‘Obstacle’'.
Definition: basic-server.hh:35
long long size_type
Definition: common.idl:19
sequence< double > floatSeq
Robot configuration is defined by a sequence of dof value.
Definition: common.idl:34
sequence< floatSeq > floatSeqSeq
Definition: common.idl:35
double value_type
Definition: common.idl:18
_objref_Path * Path_ptr
Definition: path_planners-idl.hh:83
_CORBA_ObjRef_OUT_arg< _objref_Path, Path_Helper > Path_out
Definition: path_planners-idl.hh:101
::CORBA::String_out ValidationReport_out
Definition: path_validations-idl.hh:81
::CORBA::String_out PathValidationReport_out
Definition: path_validations-idl.hh:85