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>
214 }
catch (
const std::exception& e) {
215 throw ::hpp::Error (e.what());
219 template <
typename _Base,
typename _Storage>
228 for (hpp::core::Nodes_t::const_iterator _node = nodes.begin(); _node != nodes.end(); ++_node)
229 configs.row(i++) = (*_node)->configuration();
232 }
catch (
const std::exception& e) {
233 throw ::hpp::Error (e.what());
237 template <
typename _Base,
typename _Storage>
242 return getT()->nodes().size();
244 }
catch (
const std::exception& e) {
245 throw ::hpp::Error (e.what());
249 template <
typename _Base,
typename _Storage>
256 }
catch (
const std::exception& e) {
257 throw ::hpp::Error (e.what());
261 template <
typename _Base,
typename _Storage>
266 return getT()->edges().size();
268 }
catch (
const std::exception& e) {
269 throw ::hpp::Error (e.what());
273 template <
typename _Base,
typename _Storage>
278 return corbaServer::makeServant<hpp::core_idl::Path_ptr> (server_,
279 new Path (server_, (*std::next(getT()->edges().begin(),i))->path()));
281 }
catch (
const std::exception& e) {
282 throw ::hpp::Error (e.what());
286 template <
typename _Base,
typename _Storage>
295 }
catch (
const std::exception& e) {
296 throw ::hpp::Error (e.what());
310 namespace core_impl {
311 template <
typename _Base,
typename _Storage>
318 template <
typename _Base,
typename _Storage>
326 template <
typename _Base,
typename _Storage>
331 _ServantBase::deleteThis();
332 }
catch (
const std::exception& e) {
333 throw ::hpp::Error (e.what());
337 template <
typename _Base,
typename _Storage>
342 return _ServantBase::deleteIfExpired();
343 }
catch (
const std::exception& e) {
344 throw ::hpp::Error (e.what());
348 template <
typename _Base,
typename _Storage>
353 _ServantBase::persistantStorage(persistant);
354 }
catch (
const std::exception& e) {
355 throw ::hpp::Error (e.what());
359 template <
typename _Base,
typename _Storage>
367 return ::hpp::corbaServer::makeServantDownCast<hpp::core_impl::Path,hpp::core_impl::PathVector>(server_, __return__)._retn();
368 }
catch (
const std::exception& e) {
369 throw ::hpp::Error (e.what());
373 template <
typename _Base,
typename _Storage>
379 (getT()->startSolve ());
382 }
catch (
const std::exception& e) {
383 throw ::hpp::Error (e.what());
387 template <
typename _Base,
typename _Storage>
393 (getT()->tryConnectInitAndGoals ());
396 }
catch (
const std::exception& e) {
397 throw ::hpp::Error (e.what());
401 template <
typename _Base,
typename _Storage>
407 (getT()->oneStep ());
410 }
catch (
const std::exception& e) {
411 throw ::hpp::Error (e.what());
415 template <
typename _Base,
typename _Storage>
423 return ::hpp::corbaServer::makeServantDownCast<hpp::core_impl::Path,hpp::core_impl::PathVector>(server_, __return__)._retn();
424 }
catch (
const std::exception& e) {
425 throw ::hpp::Error (e.what());
429 template <
typename _Base,
typename _Storage>
437 return ::hpp::corbaServer::makeServantDownCast<hpp::core_impl::Path,hpp::core_impl::PathVector>(server_, __return__)._retn();
438 }
catch (
const std::exception& e) {
439 throw ::hpp::Error (e.what());
443 template <
typename _Base,
typename _Storage>
449 (getT()->interrupt ());
452 }
catch (
const std::exception& e) {
453 throw ::hpp::Error (e.what());
457 template <
typename _Base,
typename _Storage>
463 (getT()->maxIterations (n));
466 }
catch (
const std::exception& e) {
467 throw ::hpp::Error (e.what());
471 template <
typename _Base,
typename _Storage>
477 (getT()->timeOut (seconds));
480 }
catch (
const std::exception& e) {
481 throw ::hpp::Error (e.what());
485 template <
typename _Base,
typename _Storage>
491 hpp::core::RoadmapPtr_t __return__ (getT()->roadmap ());
493 return ::hpp::corbaServer::makeServantDownCast<hpp::core_impl::Roadmap,hpp::core_impl::Roadmap>(server_, __return__)._retn();
494 }
catch (
const std::exception& e) {
495 throw ::hpp::Error (e.what());
499 template <
typename _Base,
typename _Storage>
505 (getT()->stopWhenProblemIsSolved (enable));
508 }
catch (
const std::exception& e) {
509 throw ::hpp::Error (e.what());
523 namespace core_impl {
524 template <
typename _Base,
typename _Storage>
531 template <
typename _Base,
typename _Storage>
539 template <
typename _Base,
typename _Storage>
544 _ServantBase::deleteThis();
545 }
catch (
const std::exception& e) {
546 throw ::hpp::Error (e.what());
550 template <
typename _Base,
typename _Storage>
555 return _ServantBase::deleteIfExpired();
556 }
catch (
const std::exception& e) {
557 throw ::hpp::Error (e.what());
561 template <
typename _Base,
typename _Storage>
566 _ServantBase::persistantStorage(persistant);
567 }
catch (
const std::exception& e) {
568 throw ::hpp::Error (e.what());
572 template <
typename _Base,
typename _Storage>
580 return ::hpp::corbaServer::makeServantDownCast<hpp::core_impl::Path,hpp::core_impl::PathVector>(server_, __return__)._retn();
581 }
catch (
const std::exception& e) {
582 throw ::hpp::Error (e.what());
586 template <
typename _Base,
typename _Storage>
592 (getT()->interrupt ());
595 }
catch (
const std::exception& e) {
596 throw ::hpp::Error (e.what());
600 template <
typename _Base,
typename _Storage>
606 (getT()->maxIterations (n));
609 }
catch (
const std::exception& e) {
610 throw ::hpp::Error (e.what());
614 template <
typename _Base,
typename _Storage>
620 (getT()->timeOut (seconds));
623 }
catch (
const std::exception& e) {
624 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:551
PathOptimizerServant(::hpp::corbaServer::Server *server, const _Storage &s)
Definition: path_planners.hh:525
hpp::core_idl::PathVector_ptr optimize(hpp::core_idl::PathVector_ptr path)
Definition: path_planners.hh:573
void timeOut(hpp::value_type seconds)
Definition: path_planners.hh:615
void deleteThis()
Definition: path_planners.hh:540
virtual ~PathOptimizerServant()
Definition: path_planners.hh:532
void interrupt()
Definition: path_planners.hh:587
void maxIterations(hpp::size_type n)
Definition: path_planners.hh:601
Definition: path_planners-fwd.hh:160
hpp::core_idl::PathVector_ptr computePath()
Definition: path_planners.hh:416
void tryConnectInitAndGoals()
Definition: path_planners.hh:388
void maxIterations(hpp::size_type n)
Definition: path_planners.hh:458
void oneStep()
Definition: path_planners.hh:402
void stopWhenProblemIsSolved(::CORBA::Boolean enable)
Definition: path_planners.hh:500
void deleteThis()
Definition: path_planners.hh:327
virtual ~PathPlannerServant()
Definition: path_planners.hh:319
hpp::core_idl::Roadmap_ptr getRoadmap()
Definition: path_planners.hh:486
void startSolve()
Definition: path_planners.hh:374
void timeOut(hpp::value_type seconds)
Definition: path_planners.hh:472
PathPlannerServant(::hpp::corbaServer::Server *server, const _Storage &s)
Definition: path_planners.hh:312
void interrupt()
Definition: path_planners.hh:444
hpp::core_idl::PathVector_ptr finishSolve(hpp::core_idl::PathVector_ptr path)
Definition: path_planners.hh:430
hpp::core_idl::PathVector_ptr solve()
Definition: path_planners.hh:360
::CORBA::Boolean deleteIfExpired()
Definition: path_planners.hh:338
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:262
hpp::core_idl::ConnectedComponentSeq * getConnectedComponents()
Definition: path_planners.hh:287
hpp::core_idl::Path_ptr getEdge(hpp::size_type i)
Definition: path_planners.hh:274
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:220
hpp::size_type getNbNodes()
Definition: path_planners.hh:238
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:250
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