1 #ifndef hpp_core_idl__path__validations_hxx__ 2 #define hpp_core_idl__path__validations_hxx__ 24 template <
typename _Base,
typename _Storage>
30 template <
typename _Base,
typename _Storage>
38 template <
typename _Base,
typename _Storage>
43 using namespace hpp::core;
44 ValidationReportPtr_t vr;
49 std::ostringstream oss; oss << *vr;
50 std::string res = oss.str();
51 report = CORBA::string_dup(res.c_str());
53 report = CORBA::string_dup(
"");
58 }
catch (
const std::exception& e) {
59 throw ::hpp::Error (e.what());
74 template <
typename _Base,
typename _Storage>
80 template <
typename _Base,
typename _Storage>
88 template <
typename _Base,
typename _Storage>
93 hpp::core::ConfigValidationPtr_t _validation = ::hpp::corbaServer::reference_to_object<hpp::core::ConfigValidation>(
server_, validation);
94 (
getT()->add (_validation));
97 }
catch (
const std::exception& e) {
98 throw ::hpp::Error (e.what());
102 template <
typename _Base,
typename _Storage>
111 }
catch (
const std::exception& e) {
112 throw ::hpp::Error (e.what());
116 template <
typename _Base,
typename _Storage>
125 }
catch (
const std::exception& e) {
126 throw ::hpp::Error (e.what());
130 template <
typename _Base,
typename _Storage>
136 (
getT()->setSecurityMargins (_margins));
139 }
catch (
const std::exception& e) {
140 throw ::hpp::Error (e.what());
144 template <
typename _Base,
typename _Storage>
149 std::string _body_a (body_a);
150 std::string _body_b (body_b);
151 (
getT()->setSecurityMarginBetweenBodies (_body_a, _body_b, margin));
154 }
catch (
const std::exception& e) {
155 throw ::hpp::Error (e.what());
159 template <
typename _Base,
typename _Storage>
165 (
getT()->filterCollisionPairs (_relMotion));
168 }
catch (
const std::exception& e) {
169 throw ::hpp::Error (e.what());
183 namespace core_impl {
184 template <
typename _Base,
typename _Storage>
190 template <
typename _Base,
typename _Storage>
198 template <
typename _Base,
typename _Storage>
204 (
getT()->setSecurityMargins (_margins));
207 }
catch (
const std::exception& e) {
208 throw ::hpp::Error (e.what());
212 template <
typename _Base,
typename _Storage>
217 std::string _body_a (body_a);
218 std::string _body_b (body_b);
219 (
getT()->setSecurityMarginBetweenBodies (_body_a, _body_b, margin));
222 }
catch (
const std::exception& e) {
223 throw ::hpp::Error (e.what());
227 template <
typename _Base,
typename _Storage>
233 (
getT()->filterCollisionPairs (_relMotion));
236 }
catch (
const std::exception& e) {
237 throw ::hpp::Error (e.what());
251 namespace core_impl {
252 template <
typename _Base,
typename _Storage>
258 template <
typename _Base,
typename _Storage>
266 template <
typename _Base,
typename _Storage>
271 using namespace hpp::core;
272 PathPtr_t _p (::hpp::corbaServer::reference_to_servant_base<core::Path>(
server_, p)->
get());
276 bool res =
get()->
validate (_p, reverse, vp, pvr);
279 std::ostringstream oss; oss << *pvr;
280 std::string res = oss.str();
281 report = CORBA::string_dup(res.c_str());
283 report = CORBA::string_dup(
"");
286 validPart = ::hpp::corbaServer::makeServant<hpp::core_idl::Path_ptr> (
server_,
new Path (server_, vp));
289 }
catch (
const std::exception& e) {
290 throw ::hpp::Error (e.what());
304 namespace core_impl {
305 template <
typename _Base,
typename _Storage>
311 template <
typename _Base,
typename _Storage>
319 template <
typename _Base,
typename _Storage>
325 (
getT()->setSecurityMargins (_margins));
328 }
catch (
const std::exception& e) {
329 throw ::hpp::Error (e.what());
333 template <
typename _Base,
typename _Storage>
338 std::string _body_a (body_a);
339 std::string _body_b (body_b);
340 (
getT()->setSecurityMarginBetweenBodies (_body_a, _body_b, margin));
343 }
catch (
const std::exception& e) {
344 throw ::hpp::Error (e.what());
348 template <
typename _Base,
typename _Storage>
354 (
getT()->filterCollisionPairs (_relMotion));
357 }
catch (
const std::exception& e) {
358 throw ::hpp::Error (e.what());
372 namespace core_impl {
373 template <
typename _Base,
typename _Storage>
379 template <
typename _Base,
typename _Storage>
387 template <
typename _Base,
typename _Storage>
393 (
getT()->setSecurityMargins (_margins));
396 }
catch (
const std::exception& e) {
397 throw ::hpp::Error (e.what());
401 template <
typename _Base,
typename _Storage>
406 std::string _body_a (body_a);
407 std::string _body_b (body_b);
408 (
getT()->setSecurityMarginBetweenBodies (_body_a, _body_b, margin));
411 }
catch (
const std::exception& e) {
412 throw ::hpp::Error (e.what());
416 template <
typename _Base,
typename _Storage>
422 (
getT()->filterCollisionPairs (_relMotion));
425 }
catch (
const std::exception& e) {
426 throw ::hpp::Error (e.what());
440 namespace core_impl {
442 namespace pathValidation_impl {
443 template <
typename _Base,
typename _Storage>
449 template <
typename _Base,
typename _Storage>
457 template <
typename _Base,
typename _Storage>
463 (
getT()->setSecurityMargins (_margins));
466 }
catch (
const std::exception& e) {
467 throw ::hpp::Error (e.what());
471 template <
typename _Base,
typename _Storage>
476 std::string _body_a (body_a);
477 std::string _body_b (body_b);
478 (
getT()->setSecurityMarginBetweenBodies (_body_a, _body_b, margin));
481 }
catch (
const std::exception& e) {
482 throw ::hpp::Error (e.what());
486 template <
typename _Base,
typename _Storage>
492 (
getT()->filterCollisionPairs (_relMotion));
495 }
catch (
const std::exception& e) {
496 throw ::hpp::Error (e.what());
511 #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:213
void setSecurityMarginBetweenBodies(const char *body_a, const char *body_b, hpp::value_type margin)
Definition: path_validations.hh:472
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:191
void clear()
Definition: path_validations.hh:117
::CORBA::Boolean validate(const hpp::floatSeq &config, hpp::core_idl::ValidationReport_out report)
Definition: path_validations.hh:39
Implement CORBA interface ``Obstacle''.
Definition: basic-server.hh:27
void setSecurityMargins(const hpp::floatSeqSeq &margins)
Definition: path_validations.hh:458
void setSecurityMargins(const hpp::floatSeqSeq &margins)
Definition: path_validations.hh:131
double value_type
Definition: common.idl:18
sequence< floatSeq > floatSeqSeq
Definition: common.idl:34
virtual ~PathValidationServant()
Definition: path_validations.hh:259
PathValidationServant(::hpp::corbaServer::Server *server, const _Storage &s)
Definition: path_validations.hh:253
vector_t floatSeqToVector(const floatSeq &dofArray, const size_type expectedSize=-1)
Server * server_
Definition: servant-base.hh:97
_objref_ConfigValidation * ConfigValidation_ptr
Definition: _problem-idl.hh:213
ConfigValidationServant(::hpp::corbaServer::Server *server, const _Storage &s)
Definition: path_validations.hh:25
ServantBase(Server *server, const Storage &_s)
Definition: servant-base.hh:165
::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:84
void add(hpp::core_idl::ConfigValidation_ptr validation)
Definition: path_validations.hh:89
void filterCollisionPairs(const hpp::core_idl::RelativeMotionMatrix &relMotion)
Definition: path_validations.hh:160
hpp::size_type numberConfigValidations()
Definition: path_validations.hh:103
void setSecurityMarginBetweenBodies(const char *body_a, const char *body_b, hpp::value_type margin)
Definition: path_validations.hh:145
void setSecurityMargins(const hpp::floatSeqSeq &margins)
Definition: path_validations.hh:388
ContinuousValidationServant(::hpp::corbaServer::Server *server, const _Storage &s)
Definition: path_validations.hh:374
Definition: path_validations-fwd.hh:165
virtual ~DiscretizedServant()
Definition: path_validations.hh:450
virtual ~ContinuousValidationServant()
Definition: path_validations.hh:380
intSeqSeq RelativeMotionMatrix
Definition: path_validations.idl:28
void filterCollisionPairs(const hpp::core_idl::RelativeMotionMatrix &relMotion)
Definition: path_validations.hh:228
ConfigValidationsServant(::hpp::corbaServer::Server *server, const _Storage &s)
Definition: path_validations.hh:75
PathValidationsServant(::hpp::corbaServer::Server *server, const _Storage &s)
Definition: path_validations.hh:306
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:54
virtual ~PathValidationsServant()
Definition: path_validations.hh:312
virtual ~ConfigValidationServant()
Definition: path_validations.hh:31
pinocchio::matrix_t matrix_t
Definition: fwd.hh:87
void setSecurityMargins(const hpp::floatSeqSeq &margins)
Definition: path_validations.hh:199
Definition: path_validations-fwd.hh:32
::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:267
CollisionValidationServant(::hpp::corbaServer::Server *server, const _Storage &s)
Definition: path_validations.hh:185
void setSecurityMarginBetweenBodies(const char *body_a, const char *body_b, hpp::value_type margin)
Definition: path_validations.hh:402
core::PathValidationReportPtr_t PathValidationReportPtr_t
Definition: fwd.hh:75
virtual ~ConfigValidationsServant()
Definition: path_validations.hh:81
void setSecurityMarginBetweenBodies(const char *body_a, const char *body_b, hpp::value_type margin)
Definition: path_validations.hh:334
StorageElementShPtr_t getT() const
Definition: servant-base.hh:121
void setSecurityMargins(const hpp::floatSeqSeq &margins)
Definition: path_validations.hh:320
Definition: path_validations-fwd.hh:290
_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:33
::CORBA::String_out ValidationReport_out
Definition: path_validations-idl.hh:81
void filterCollisionPairs(const hpp::core_idl::RelativeMotionMatrix &relMotion)
Definition: path_validations.hh:487
core::PathPtr_t PathPtr_t
Definition: fwd.hh:74
void filterCollisionPairs(const hpp::core_idl::RelativeMotionMatrix &relMotion)
Definition: path_validations.hh:417
void filterCollisionPairs(const hpp::core_idl::RelativeMotionMatrix &relMotion)
Definition: path_validations.hh:349
long long size_type
Definition: common.idl:19