1 #ifndef hpp_core_idl__path__validations_hxx__ 2 #define hpp_core_idl__path__validations_hxx__ 24 template <
typename _Base,
typename _Storage>
31 template <
typename _Base,
typename _Storage>
39 template <
typename _Base,
typename _Storage>
44 using namespace hpp::core;
45 ValidationReportPtr_t vr;
50 std::ostringstream oss; oss << *vr;
51 std::string res = oss.str();
52 report = CORBA::string_dup(res.c_str());
54 report = CORBA::string_dup(
"");
59 }
catch (
const std::exception& e) {
60 throw ::hpp::Error (e.what());
75 template <
typename _Base,
typename _Storage>
82 template <
typename _Base,
typename _Storage>
90 template <
typename _Base,
typename _Storage>
95 hpp::core::ConfigValidationPtr_t _validation = ::hpp::corbaServer::reference_to_object<hpp::core::ConfigValidation>(
server_, validation);
96 (
getT()->add (_validation));
99 }
catch (
const std::exception& e) {
100 throw ::hpp::Error (e.what());
104 template <
typename _Base,
typename _Storage>
113 }
catch (
const std::exception& e) {
114 throw ::hpp::Error (e.what());
118 template <
typename _Base,
typename _Storage>
127 }
catch (
const std::exception& e) {
128 throw ::hpp::Error (e.what());
132 template <
typename _Base,
typename _Storage>
138 (
getT()->setSecurityMargins (_margins));
141 }
catch (
const std::exception& e) {
142 throw ::hpp::Error (e.what());
146 template <
typename _Base,
typename _Storage>
151 std::string _body_a (body_a);
152 std::string _body_b (body_b);
153 (
getT()->setSecurityMarginBetweenBodies (_body_a, _body_b, margin));
156 }
catch (
const std::exception& e) {
157 throw ::hpp::Error (e.what());
161 template <
typename _Base,
typename _Storage>
167 (
getT()->filterCollisionPairs (_relMotion));
170 }
catch (
const std::exception& e) {
171 throw ::hpp::Error (e.what());
185 namespace core_impl {
186 template <
typename _Base,
typename _Storage>
193 template <
typename _Base,
typename _Storage>
201 template <
typename _Base,
typename _Storage>
207 (
getT()->setSecurityMargins (_margins));
210 }
catch (
const std::exception& e) {
211 throw ::hpp::Error (e.what());
215 template <
typename _Base,
typename _Storage>
220 std::string _body_a (body_a);
221 std::string _body_b (body_b);
222 (
getT()->setSecurityMarginBetweenBodies (_body_a, _body_b, margin));
225 }
catch (
const std::exception& e) {
226 throw ::hpp::Error (e.what());
230 template <
typename _Base,
typename _Storage>
236 (
getT()->filterCollisionPairs (_relMotion));
239 }
catch (
const std::exception& e) {
240 throw ::hpp::Error (e.what());
254 namespace core_impl {
255 template <
typename _Base,
typename _Storage>
262 template <
typename _Base,
typename _Storage>
270 template <
typename _Base,
typename _Storage>
275 using namespace hpp::core;
276 PathPtr_t _p (::hpp::corbaServer::reference_to_servant_base<core::Path>(
server_, p)->
get());
280 bool res =
get()->
validate (_p, reverse, vp, pvr);
283 std::ostringstream oss; oss << *pvr;
284 std::string res = oss.str();
285 report = CORBA::string_dup(res.c_str());
287 report = CORBA::string_dup(
"");
290 validPart = ::hpp::corbaServer::makeServant<hpp::core_idl::Path_ptr> (
server_,
new Path (server_, vp));
293 }
catch (
const std::exception& e) {
294 throw ::hpp::Error (e.what());
298 template <
typename _Base,
typename _Storage>
303 using namespace hpp::core;
305 ValidationReportPtr_t vr;
308 std::ostringstream oss; oss << *vr;
309 std::string res = oss.str();
310 report = CORBA::string_dup(res.c_str());
312 report = CORBA::string_dup(
"");
316 }
catch (
const std::exception& e) {
317 throw ::hpp::Error (e.what());
331 namespace core_impl {
332 template <
typename _Base,
typename _Storage>
339 template <
typename _Base,
typename _Storage>
347 template <
typename _Base,
typename _Storage>
353 (
getT()->setSecurityMargins (_margins));
356 }
catch (
const std::exception& e) {
357 throw ::hpp::Error (e.what());
361 template <
typename _Base,
typename _Storage>
366 std::string _body_a (body_a);
367 std::string _body_b (body_b);
368 (
getT()->setSecurityMarginBetweenBodies (_body_a, _body_b, margin));
371 }
catch (
const std::exception& e) {
372 throw ::hpp::Error (e.what());
376 template <
typename _Base,
typename _Storage>
382 (
getT()->filterCollisionPairs (_relMotion));
385 }
catch (
const std::exception& e) {
386 throw ::hpp::Error (e.what());
400 namespace core_impl {
401 template <
typename _Base,
typename _Storage>
408 template <
typename _Base,
typename _Storage>
416 template <
typename _Base,
typename _Storage>
422 (
getT()->setSecurityMargins (_margins));
425 }
catch (
const std::exception& e) {
426 throw ::hpp::Error (e.what());
430 template <
typename _Base,
typename _Storage>
435 std::string _body_a (body_a);
436 std::string _body_b (body_b);
437 (
getT()->setSecurityMarginBetweenBodies (_body_a, _body_b, margin));
440 }
catch (
const std::exception& e) {
441 throw ::hpp::Error (e.what());
445 template <
typename _Base,
typename _Storage>
451 (
getT()->filterCollisionPairs (_relMotion));
454 }
catch (
const std::exception& e) {
455 throw ::hpp::Error (e.what());
469 namespace core_impl {
471 namespace pathValidation_impl {
472 template <
typename _Base,
typename _Storage>
479 template <
typename _Base,
typename _Storage>
487 template <
typename _Base,
typename _Storage>
493 (
getT()->setSecurityMargins (_margins));
496 }
catch (
const std::exception& e) {
497 throw ::hpp::Error (e.what());
501 template <
typename _Base,
typename _Storage>
506 std::string _body_a (body_a);
507 std::string _body_b (body_b);
508 (
getT()->setSecurityMarginBetweenBodies (_body_a, _body_b, margin));
511 }
catch (
const std::exception& e) {
512 throw ::hpp::Error (e.what());
516 template <
typename _Base,
typename _Storage>
522 (
getT()->filterCollisionPairs (_relMotion));
525 }
catch (
const std::exception& e) {
526 throw ::hpp::Error (e.what());
541 #endif // hpp_core_idl__path__validations_hxx__ void setSecurityMarginBetweenBodies(const char *body_a, const char *body_b, hpp::value_type margin)
Definition: path_validations.hh:216
::CORBA::Boolean validateConfiguration(const hpp::floatSeq &config, hpp::core_idl::ValidationReport_out report)
Definition: path_validations.hh:299
void setSecurityMarginBetweenBodies(const char *body_a, const char *body_b, hpp::value_type margin)
Definition: path_validations.hh:502
core::matrix_t floatSeqSeqToMatrix(const floatSeqSeq &input, const size_type expectedRows=-1, const size_type expectedCols=-1)
_CORBA_ObjRef_OUT_arg< _objref_Path, Path_Helper > Path_out
Definition: path_planners-idl.hh:101
virtual ~CollisionValidationServant()
Definition: path_validations.hh:194
void clear()
Definition: path_validations.hh:119
::CORBA::Boolean validate(const hpp::floatSeq &config, hpp::core_idl::ValidationReport_out report)
Definition: path_validations.hh:40
Implement CORBA interface ``Obstacle''.
Definition: basic-server.hh:35
void setSecurityMargins(const hpp::floatSeqSeq &margins)
Definition: path_validations.hh:488
void setSecurityMargins(const hpp::floatSeqSeq &margins)
Definition: path_validations.hh:133
double value_type
Definition: common.idl:18
sequence< floatSeq > floatSeqSeq
Definition: common.idl:35
virtual ~PathValidationServant()
Definition: path_validations.hh:263
PathValidationServant(::hpp::corbaServer::Server *server, const _Storage &s)
Definition: path_validations.hh:256
vector_t floatSeqToVector(const floatSeq &dofArray, const size_type expectedSize=-1)
Server * server_
Definition: servant-base.hh:116
_objref_ConfigValidation * ConfigValidation_ptr
Definition: _problem-idl.hh:217
ConfigValidationServant(::hpp::corbaServer::Server *server, const _Storage &s)
Definition: path_validations.hh:25
ServantBase(Server *server, const Storage &_s)
Definition: servant-base.hh:177
::CORBA::String_out PathValidationReport_out
Definition: path_validations-idl.hh:85
PathServant< POA_hpp::core_idl::Path, hpp::weak_ptr< hpp::core::Path > > Path
Definition: paths-fwd.hh:85
void add(hpp::core_idl::ConfigValidation_ptr validation)
Definition: path_validations.hh:91
pinocchio::Configuration_t Configuration_t
Definition: fwd.hh:66
void filterCollisionPairs(const hpp::core_idl::RelativeMotionMatrix &relMotion)
Definition: path_validations.hh:162
hpp::size_type numberConfigValidations()
Definition: path_validations.hh:105
void setSecurityMarginBetweenBodies(const char *body_a, const char *body_b, hpp::value_type margin)
Definition: path_validations.hh:147
void setSecurityMargins(const hpp::floatSeqSeq &margins)
Definition: path_validations.hh:417
ContinuousValidationServant(::hpp::corbaServer::Server *server, const _Storage &s)
Definition: path_validations.hh:402
Definition: path_validations-fwd.hh:167
virtual ~DiscretizedServant()
Definition: path_validations.hh:480
virtual ~ContinuousValidationServant()
Definition: path_validations.hh:409
intSeqSeq RelativeMotionMatrix
Definition: path_validations.idl:28
void filterCollisionPairs(const hpp::core_idl::RelativeMotionMatrix &relMotion)
Definition: path_validations.hh:231
ConfigValidationsServant(::hpp::corbaServer::Server *server, const _Storage &s)
Definition: path_validations.hh:76
PathValidationsServant(::hpp::corbaServer::Server *server, const _Storage &s)
Definition: path_validations.hh:333
IntMatrix_t intSeqSeqToMatrix(const intSeqSeq &input, const size_type expectedRows=-1, const size_type expectedCols=-1)
Implementation of Hpp module Corba server.
Definition: server.hh:77
virtual ~PathValidationsServant()
Definition: path_validations.hh:340
virtual ~ConfigValidationServant()
Definition: path_validations.hh:32
pinocchio::matrix_t matrix_t
Definition: fwd.hh:110
void setSecurityMargins(const hpp::floatSeqSeq &margins)
Definition: path_validations.hh:202
Definition: path_validations-fwd.hh:33
::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
CollisionValidationServant(::hpp::corbaServer::Server *server, const _Storage &s)
Definition: path_validations.hh:187
void setSecurityMarginBetweenBodies(const char *body_a, const char *body_b, hpp::value_type margin)
Definition: path_validations.hh:431
core::PathValidationReportPtr_t PathValidationReportPtr_t
Definition: fwd.hh:98
virtual ~ConfigValidationsServant()
Definition: path_validations.hh:83
void setSecurityMarginBetweenBodies(const char *body_a, const char *body_b, hpp::value_type margin)
Definition: path_validations.hh:362
StorageElementShPtr_t getT() const
Definition: servant-base.hh:139
void setSecurityMargins(const hpp::floatSeqSeq &margins)
Definition: path_validations.hh:348
Definition: path_validations-fwd.hh:296
_objref_Path * Path_ptr
Definition: path_planners-idl.hh:83
sequence< double > floatSeq
Robot configuration is defined by a sequence of dof value.
Definition: common.idl:34
::CORBA::String_out ValidationReport_out
Definition: path_validations-idl.hh:81
void filterCollisionPairs(const hpp::core_idl::RelativeMotionMatrix &relMotion)
Definition: path_validations.hh:517
core::PathPtr_t PathPtr_t
Definition: fwd.hh:97
void filterCollisionPairs(const hpp::core_idl::RelativeMotionMatrix &relMotion)
Definition: path_validations.hh:446
void filterCollisionPairs(const hpp::core_idl::RelativeMotionMatrix &relMotion)
Definition: path_validations.hh:377
long long size_type
Definition: common.idl:19