hpp-corbaserver 4.14.0
Corba server for Humanoid Path Planner applications
Loading...
Searching...
No Matches
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
15
16
17
18//
19// Implementational code for IDL interface hpp::core_idl::ConfigValidation
20//
21namespace hpp {
22
23namespace core_impl {
24template <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}
31template <typename _Base, typename _Storage>
33{
34 // add extra destructor code here
35}
36
37// Methods corresponding to IDL attributes and operations
38
39template <typename _Base, typename _Storage>
40::CORBA::Boolean ConfigValidationServant<_Base, _Storage>::validate (const hpp::floatSeq& config, hpp::core_idl::ValidationReport_out report)
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//
72namespace hpp {
73
74namespace core_impl {
75template <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}
82template <typename _Base, typename _Storage>
84{
85 // add extra destructor code here
86}
87
88// Methods corresponding to IDL attributes and operations
89
90template <typename _Base, typename _Storage>
91void ConfigValidationsServant<_Base, _Storage>::add (hpp::core_idl::ConfigValidation_ptr validation)
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
104template <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
118template <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
132template <typename _Base, typename _Storage>
134{
135 try {
136 // automatically generated code.
137 hpp::core::matrix_t _margins = hpp::corbaServer::floatSeqSeqToMatrix (margins);
138 (getT()->setSecurityMargins (_margins));
139
140
141 } catch (const std::exception& e) {
142 throw ::hpp::Error (e.what());
143 }
144}
145
146template <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
161template <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//
183namespace hpp {
184
185namespace core_impl {
186template <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}
193template <typename _Base, typename _Storage>
195{
196 // add extra destructor code here
197}
198
199// Methods corresponding to IDL attributes and operations
200
201template <typename _Base, typename _Storage>
203{
204 try {
205 // automatically generated code.
206 hpp::core::matrix_t _margins = hpp::corbaServer::floatSeqSeqToMatrix (margins);
207 (getT()->setSecurityMargins (_margins));
208
209
210 } catch (const std::exception& e) {
211 throw ::hpp::Error (e.what());
212 }
213}
214
215template <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
230template <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//
252namespace hpp {
253
254namespace core_impl {
255template <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}
262template <typename _Base, typename _Storage>
264{
265 // add extra destructor code here
266}
267
268// Methods corresponding to IDL attributes and operations
269
270template <typename _Base, typename _Storage>
271::CORBA::Boolean PathValidationServant<_Base, _Storage>::validate (hpp::core_idl::Path_ptr p, ::CORBA::Boolean reverse, hpp::core_idl::Path_out validPart, hpp::core_idl::PathValidationReport_out report)
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;
278 PathValidationReportPtr_t pvr;
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
298template <typename _Base, typename _Storage>
299::CORBA::Boolean PathValidationServant<_Base, _Storage>::validateConfiguration (const hpp::floatSeq& config, hpp::core_idl::ValidationReport_out report)
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;
304 Configuration_t q(corbaServer::floatSeqToVector(config));
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//
329namespace hpp {
330
331namespace core_impl {
332template <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}
339template <typename _Base, typename _Storage>
341{
342 // add extra destructor code here
343}
344
345// Methods corresponding to IDL attributes and operations
346
347template <typename _Base, typename _Storage>
349{
350 try {
351 // automatically generated code.
352 hpp::core::matrix_t _margins = hpp::corbaServer::floatSeqSeqToMatrix (margins);
353 (getT()->setSecurityMargins (_margins));
354
355
356 } catch (const std::exception& e) {
357 throw ::hpp::Error (e.what());
358 }
359}
360
361template <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
376template <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//
398namespace hpp {
399
400namespace core_impl {
401template <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}
408template <typename _Base, typename _Storage>
410{
411 // add extra destructor code here
412}
413
414// Methods corresponding to IDL attributes and operations
415
416template <typename _Base, typename _Storage>
418{
419 try {
420 // automatically generated code.
421 hpp::core::matrix_t _margins = hpp::corbaServer::floatSeqSeqToMatrix (margins);
422 (getT()->setSecurityMargins (_margins));
423
424
425 } catch (const std::exception& e) {
426 throw ::hpp::Error (e.what());
427 }
428}
429
430template <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
445template <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//
467namespace hpp {
468
469namespace core_impl {
470
471namespace pathValidation_impl {
472template <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}
479template <typename _Base, typename _Storage>
481{
482 // add extra destructor code here
483}
484
485// Methods corresponding to IDL attributes and operations
486
487template <typename _Base, typename _Storage>
489{
490 try {
491 // automatically generated code.
492 hpp::core::matrix_t _margins = hpp::corbaServer::floatSeqSeqToMatrix (margins);
493 (getT()->setSecurityMargins (_margins));
494
495
496 } catch (const std::exception& e) {
497 throw ::hpp::Error (e.what());
498 }
499}
500
501template <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
516template <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
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)
vector_t floatSeqToVector(const floatSeq &dofArray, const size_type expectedSize=-1)
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