1 #ifndef hpp_core_idl__path__planners_hxx__
2 #define hpp_core_idl__path__planners_hxx__
24 template <
typename _Base,
typename _Storage>
31 template <
typename _Base,
typename _Storage>
39 template <
typename _Base,
typename _Storage>
44 _ServantBase::deleteThis();
45 }
catch (
const std::exception& e) {
46 throw ::hpp::Error (e.what());
50 template <
typename _Base,
typename _Storage>
55 return _ServantBase::deleteIfExpired();
56 }
catch (
const std::exception& e) {
57 throw ::hpp::Error (e.what());
61 template <
typename _Base,
typename _Storage>
66 _ServantBase::persistantStorage(persistant);
67 }
catch (
const std::exception& e) {
68 throw ::hpp::Error (e.what());
72 template <
typename _Base,
typename _Storage>
79 nodes[0]->configuration().size());
81 for (hpp::core::NodeVector_t::const_iterator _node = nodes.begin();
82 _node != nodes.end(); ++_node)
83 configs.row(i++) = (*_node)->configuration();
86 }
catch (
const std::exception& e) {
87 throw ::hpp::Error (e.what());
101 namespace core_impl {
102 template <
typename _Base,
typename _Storage>
105 :
hpp::corbaServer::ServantBase<
hpp::core::
Roadmap, _Storage> (server, s)
109 template <
typename _Base,
typename _Storage>
117 template <
typename _Base,
typename _Storage>
122 _ServantBase::deleteThis();
123 }
catch (
const std::exception& e) {
124 throw ::hpp::Error (e.what());
128 template <
typename _Base,
typename _Storage>
133 return _ServantBase::deleteIfExpired();
134 }
catch (
const std::exception& e) {
135 throw ::hpp::Error (e.what());
139 template <
typename _Base,
typename _Storage>
144 _ServantBase::persistantStorage(persistant);
145 }
catch (
const std::exception& e) {
146 throw ::hpp::Error (e.what());
150 template <
typename _Base,
typename _Storage>
159 }
catch (
const std::exception& e) {
160 throw ::hpp::Error (e.what());
164 template <
typename _Base,
typename _Storage>
170 (getT()->addNode (_config));
173 }
catch (
const std::exception& e) {
174 throw ::hpp::Error (e.what());
178 template <
typename _Base,
typename _Storage>
183 core::PathPtr_t path (corbaServer::reference_to_servant_base<core::Path>(server_, path_)->get());
187 }
catch (
const std::exception& e) {
188 throw ::hpp::Error (e.what());
192 template <
typename _Base,
typename _Storage>
197 core::PathPtr_t path (corbaServer::reference_to_servant_base<core::Path>(server_, path_)->get());
201 }
catch (
const std::exception& e) {
202 throw ::hpp::Error (e.what());
206 template <
typename _Base,
typename _Storage>
211 if (getT()->nodes().size() == 0)
throw std::logic_error(
212 "hpp::core::Roadmap::nearestNode: roadmap is empty");
216 }
catch (
const std::exception& e) {
217 throw ::hpp::Error (e.what());
221 template <
typename _Base,
typename _Storage>
230 for (hpp::core::Nodes_t::const_iterator _node = nodes.begin(); _node != nodes.end(); ++_node)
231 configs.row(i++) = (*_node)->configuration();
234 }
catch (
const std::exception& e) {
235 throw ::hpp::Error (e.what());
239 template <
typename _Base,
typename _Storage>
244 return getT()->nodes().size();
246 }
catch (
const std::exception& e) {
247 throw ::hpp::Error (e.what());
251 template <
typename _Base,
typename _Storage>
258 }
catch (
const std::exception& e) {
259 throw ::hpp::Error (e.what());
263 template <
typename _Base,
typename _Storage>
268 return getT()->edges().size();
270 }
catch (
const std::exception& e) {
271 throw ::hpp::Error (e.what());
275 template <
typename _Base,
typename _Storage>
280 return corbaServer::makeServant<hpp::core_idl::Path_ptr> (server_,
281 new Path (server_, (*std::next(getT()->edges().begin(),i))->path()));
283 }
catch (
const std::exception& e) {
284 throw ::hpp::Error (e.what());
288 template <
typename _Base,
typename _Storage>
297 }
catch (
const std::exception& e) {
298 throw ::hpp::Error (e.what());
312 namespace core_impl {
313 template <
typename _Base,
typename _Storage>
320 template <
typename _Base,
typename _Storage>
328 template <
typename _Base,
typename _Storage>
333 _ServantBase::deleteThis();
334 }
catch (
const std::exception& e) {
335 throw ::hpp::Error (e.what());
339 template <
typename _Base,
typename _Storage>
344 return _ServantBase::deleteIfExpired();
345 }
catch (
const std::exception& e) {
346 throw ::hpp::Error (e.what());
350 template <
typename _Base,
typename _Storage>
355 _ServantBase::persistantStorage(persistant);
356 }
catch (
const std::exception& e) {
357 throw ::hpp::Error (e.what());
361 template <
typename _Base,
typename _Storage>
369 return ::hpp::corbaServer::makeServantDownCast<hpp::core_impl::Path,hpp::core_impl::PathVector>(server_, __return__)._retn();
370 }
catch (
const std::exception& e) {
371 throw ::hpp::Error (e.what());
375 template <
typename _Base,
typename _Storage>
381 (getT()->startSolve ());
384 }
catch (
const std::exception& e) {
385 throw ::hpp::Error (e.what());
389 template <
typename _Base,
typename _Storage>
395 (getT()->tryConnectInitAndGoals ());
398 }
catch (
const std::exception& e) {
399 throw ::hpp::Error (e.what());
403 template <
typename _Base,
typename _Storage>
409 (getT()->oneStep ());
412 }
catch (
const std::exception& e) {
413 throw ::hpp::Error (e.what());
417 template <
typename _Base,
typename _Storage>
425 return ::hpp::corbaServer::makeServantDownCast<hpp::core_impl::Path,hpp::core_impl::PathVector>(server_, __return__)._retn();
426 }
catch (
const std::exception& e) {
427 throw ::hpp::Error (e.what());
431 template <
typename _Base,
typename _Storage>
439 return ::hpp::corbaServer::makeServantDownCast<hpp::core_impl::Path,hpp::core_impl::PathVector>(server_, __return__)._retn();
440 }
catch (
const std::exception& e) {
441 throw ::hpp::Error (e.what());
445 template <
typename _Base,
typename _Storage>
451 (getT()->interrupt ());
454 }
catch (
const std::exception& e) {
455 throw ::hpp::Error (e.what());
459 template <
typename _Base,
typename _Storage>
465 (getT()->maxIterations (n));
468 }
catch (
const std::exception& e) {
469 throw ::hpp::Error (e.what());
473 template <
typename _Base,
typename _Storage>
479 (getT()->timeOut (seconds));
482 }
catch (
const std::exception& e) {
483 throw ::hpp::Error (e.what());
487 template <
typename _Base,
typename _Storage>
493 hpp::core::RoadmapPtr_t __return__ (getT()->roadmap ());
495 return ::hpp::corbaServer::makeServantDownCast<hpp::core_impl::Roadmap,hpp::core_impl::Roadmap>(server_, __return__)._retn();
496 }
catch (
const std::exception& e) {
497 throw ::hpp::Error (e.what());
501 template <
typename _Base,
typename _Storage>
507 (getT()->stopWhenProblemIsSolved (enable));
510 }
catch (
const std::exception& e) {
511 throw ::hpp::Error (e.what());
525 namespace core_impl {
526 template <
typename _Base,
typename _Storage>
533 template <
typename _Base,
typename _Storage>
541 template <
typename _Base,
typename _Storage>
546 _ServantBase::deleteThis();
547 }
catch (
const std::exception& e) {
548 throw ::hpp::Error (e.what());
552 template <
typename _Base,
typename _Storage>
557 return _ServantBase::deleteIfExpired();
558 }
catch (
const std::exception& e) {
559 throw ::hpp::Error (e.what());
563 template <
typename _Base,
typename _Storage>
568 _ServantBase::persistantStorage(persistant);
569 }
catch (
const std::exception& e) {
570 throw ::hpp::Error (e.what());
574 template <
typename _Base,
typename _Storage>
582 return ::hpp::corbaServer::makeServantDownCast<hpp::core_impl::Path,hpp::core_impl::PathVector>(server_, __return__)._retn();
583 }
catch (
const std::exception& e) {
584 throw ::hpp::Error (e.what());
588 template <
typename _Base,
typename _Storage>
594 (getT()->interrupt ());
597 }
catch (
const std::exception& e) {
598 throw ::hpp::Error (e.what());
602 template <
typename _Base,
typename _Storage>
608 (getT()->maxIterations (n));
611 }
catch (
const std::exception& e) {
612 throw ::hpp::Error (e.what());
616 template <
typename _Base,
typename _Storage>
622 (getT()->timeOut (seconds));
625 }
catch (
const std::exception& e) {
626 throw ::hpp::Error (e.what());
bool persistantStorage() const
See persistantStorage(bool)
Definition: servant-base.hh:166
Implementation of Hpp module Corba server.
Definition: server.hh:78
Definition: path_planners-fwd.hh:34
void deleteThis()
Definition: path_planners.hh:40
hpp::floatSeqSeq * nodes()
Definition: path_planners.hh:73
ConnectedComponentServant(::hpp::corbaServer::Server *server, const _Storage &s)
Definition: path_planners.hh:25
virtual ~ConnectedComponentServant()
Definition: path_planners.hh:32
::CORBA::Boolean deleteIfExpired()
Definition: path_planners.hh:51
Definition: path_planners-fwd.hh:238
::CORBA::Boolean deleteIfExpired()
Definition: path_planners.hh:553
PathOptimizerServant(::hpp::corbaServer::Server *server, const _Storage &s)
Definition: path_planners.hh:527
hpp::core_idl::PathVector_ptr optimize(hpp::core_idl::PathVector_ptr path)
Definition: path_planners.hh:575
void timeOut(hpp::value_type seconds)
Definition: path_planners.hh:617
void deleteThis()
Definition: path_planners.hh:542
virtual ~PathOptimizerServant()
Definition: path_planners.hh:534
void interrupt()
Definition: path_planners.hh:589
void maxIterations(hpp::size_type n)
Definition: path_planners.hh:603
Definition: path_planners-fwd.hh:160
hpp::core_idl::PathVector_ptr computePath()
Definition: path_planners.hh:418
void tryConnectInitAndGoals()
Definition: path_planners.hh:390
void maxIterations(hpp::size_type n)
Definition: path_planners.hh:460
void oneStep()
Definition: path_planners.hh:404
void stopWhenProblemIsSolved(::CORBA::Boolean enable)
Definition: path_planners.hh:502
void deleteThis()
Definition: path_planners.hh:329
virtual ~PathPlannerServant()
Definition: path_planners.hh:321
hpp::core_idl::Roadmap_ptr getRoadmap()
Definition: path_planners.hh:488
void startSolve()
Definition: path_planners.hh:376
void timeOut(hpp::value_type seconds)
Definition: path_planners.hh:474
PathPlannerServant(::hpp::corbaServer::Server *server, const _Storage &s)
Definition: path_planners.hh:314
void interrupt()
Definition: path_planners.hh:446
hpp::core_idl::PathVector_ptr finishSolve(hpp::core_idl::PathVector_ptr path)
Definition: path_planners.hh:432
hpp::core_idl::PathVector_ptr solve()
Definition: path_planners.hh:362
::CORBA::Boolean deleteIfExpired()
Definition: path_planners.hh:340
Definition: paths-fwd.hh:29
Definition: path_planners-fwd.hh:82
virtual ~RoadmapServant()
Definition: path_planners.hh:110
hpp::floatSeq * nearestNode(const hpp::floatSeq &config, hpp::value_type &distance, ::CORBA::Boolean reverse)
Definition: path_planners.hh:207
hpp::size_type getNbEdges()
Definition: path_planners.hh:264
hpp::core_idl::ConnectedComponentSeq * getConnectedComponents()
Definition: path_planners.hh:289
hpp::core_idl::Path_ptr getEdge(hpp::size_type i)
Definition: path_planners.hh:276
void clear()
Definition: path_planners.hh:151
void deleteThis()
Definition: path_planners.hh:118
void addNodeAndEdge(const hpp::floatSeq &cfgfrom, const hpp::floatSeq &cfgto, hpp::core_idl::Path_ptr path_)
Definition: path_planners.hh:179
hpp::floatSeqSeq * nearestNodes(const hpp::floatSeq &config, hpp::size_type &k)
Definition: path_planners.hh:222
hpp::size_type getNbNodes()
Definition: path_planners.hh:240
RoadmapServant(::hpp::corbaServer::Server *server, const _Storage &s)
Definition: path_planners.hh:103
::CORBA::Boolean deleteIfExpired()
Definition: path_planners.hh:129
void addNode(const hpp::floatSeq &config)
Definition: path_planners.hh:165
hpp::floatSeq * getNode(hpp::size_type i)
Definition: path_planners.hh:252
void addNodeAndEdges(const hpp::floatSeq &cfgfrom, const hpp::floatSeq &cfgto, hpp::core_idl::Path_ptr path_)
Definition: path_planners.hh:193
core::PathVectorPtr_t PathVectorPtr_t
Definition: fwd.hh:99
pinocchio::vector_t vector_t
Definition: fwd.hh:108
core::NodeVector_t NodeVector_t
Definition: fwd.hh:92
core::PathPtr_t PathPtr_t
Definition: fwd.hh:96
vector_t floatSeqToVector(const floatSeq &dofArray, const size_type expectedSize=-1)
core::Nodes_t Nodes_t
Definition: fwd.hh:91
floatSeq * vectorToFloatSeq(core::vectorIn_t input)
pinocchio::matrix_t matrix_t
Definition: fwd.hh:106
floatSeqSeq * matrixToFloatSeqSeq(core::matrixIn_t input)
Returns a sequence of the rows of the input matrix.
sequence< ConnectedComponent > ConnectedComponentSeq
Definition: path_planners.idl:33
Implement CORBA interface `‘Obstacle’'.
Definition: client.hh:46
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
_objref_Roadmap * Roadmap_ptr
Definition: path_planners-idl.hh:342
_objref_PathVector * PathVector_ptr
Definition: paths-idl.hh:82
Definition: servant-base.hh:451