1#ifndef hpp_core_idl__path__planners_hxx__
2#define hpp_core_idl__path__planners_hxx__
24template <
typename _Base,
typename _Storage>
31template <
typename _Base,
typename _Storage>
39template <
typename _Base,
typename _Storage>
44 _ServantBase::deleteThis();
45 }
catch (
const std::exception& e) {
46 throw ::hpp::Error (e.what());
50template <
typename _Base,
typename _Storage>
55 return _ServantBase::deleteIfExpired();
56 }
catch (
const std::exception& e) {
57 throw ::hpp::Error (e.what());
61template <
typename _Base,
typename _Storage>
66 _ServantBase::persistantStorage(persistant);
67 }
catch (
const std::exception& e) {
68 throw ::hpp::Error (e.what());
72template <
typename _Base,
typename _Storage>
77 hpp::core::NodeVector_t nodes = getT()->nodes();
78 hpp::core::matrix_t configs (nodes.size(),
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());
102template <
typename _Base,
typename _Storage>
105 :
hpp::corbaServer::ServantBase<
hpp::core::
Roadmap, _Storage> (server, s)
109template <
typename _Base,
typename _Storage>
117template <
typename _Base,
typename _Storage>
122 _ServantBase::deleteThis();
123 }
catch (
const std::exception& e) {
124 throw ::hpp::Error (e.what());
128template <
typename _Base,
typename _Storage>
133 return _ServantBase::deleteIfExpired();
134 }
catch (
const std::exception& e) {
135 throw ::hpp::Error (e.what());
139template <
typename _Base,
typename _Storage>
144 _ServantBase::persistantStorage(persistant);
145 }
catch (
const std::exception& e) {
146 throw ::hpp::Error (e.what());
150template <
typename _Base,
typename _Storage>
159 }
catch (
const std::exception& e) {
160 throw ::hpp::Error (e.what());
164template <
typename _Base,
typename _Storage>
170 (getT()->addNode (_config));
173 }
catch (
const std::exception& e) {
174 throw ::hpp::Error (e.what());
178template <
typename _Base,
typename _Storage>
187 }
catch (
const std::exception& e) {
188 throw ::hpp::Error (e.what());
192template <
typename _Base,
typename _Storage>
201 }
catch (
const std::exception& e) {
202 throw ::hpp::Error (e.what());
206template <
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());
221template <
typename _Base,
typename _Storage>
226 hpp::core::Nodes_t nodes = getT()->nearestNodes(
228 hpp::core::matrix_t configs (nodes.size(), config.length());
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());
239template <
typename _Base,
typename _Storage>
244 return getT()->nodes().size();
246 }
catch (
const std::exception& e) {
247 throw ::hpp::Error (e.what());
251template <
typename _Base,
typename _Storage>
258 }
catch (
const std::exception& e) {
259 throw ::hpp::Error (e.what());
263template <
typename _Base,
typename _Storage>
268 return getT()->edges().size();
270 }
catch (
const std::exception& e) {
271 throw ::hpp::Error (e.what());
275template <
typename _Base,
typename _Storage>
281 new Path (server_, (*std::next(getT()->edges().begin(),i))->path()));
283 }
catch (
const std::exception& e) {
284 throw ::hpp::Error (e.what());
288template <
typename _Base,
typename _Storage>
297 }
catch (
const std::exception& e) {
298 throw ::hpp::Error (e.what());
313template <
typename _Base,
typename _Storage>
320template <
typename _Base,
typename _Storage>
328template <
typename _Base,
typename _Storage>
333 _ServantBase::deleteThis();
334 }
catch (
const std::exception& e) {
335 throw ::hpp::Error (e.what());
339template <
typename _Base,
typename _Storage>
344 return _ServantBase::deleteIfExpired();
345 }
catch (
const std::exception& e) {
346 throw ::hpp::Error (e.what());
350template <
typename _Base,
typename _Storage>
355 _ServantBase::persistantStorage(persistant);
356 }
catch (
const std::exception& e) {
357 throw ::hpp::Error (e.what());
361template <
typename _Base,
typename _Storage>
367 hpp::core::PathVectorPtr_t __return__ (getT()->solve ());
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());
375template <
typename _Base,
typename _Storage>
381 (getT()->startSolve ());
384 }
catch (
const std::exception& e) {
385 throw ::hpp::Error (e.what());
389template <
typename _Base,
typename _Storage>
395 (getT()->tryConnectInitAndGoals ());
398 }
catch (
const std::exception& e) {
399 throw ::hpp::Error (e.what());
403template <
typename _Base,
typename _Storage>
409 (getT()->oneStep ());
412 }
catch (
const std::exception& e) {
413 throw ::hpp::Error (e.what());
417template <
typename _Base,
typename _Storage>
423 hpp::core::PathVectorPtr_t __return__ (getT()->computePath ());
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());
431template <
typename _Base,
typename _Storage>
437 hpp::core::PathVectorPtr_t __return__ (getT()->finishSolve (_path));
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());
445template <
typename _Base,
typename _Storage>
451 (getT()->interrupt ());
454 }
catch (
const std::exception& e) {
455 throw ::hpp::Error (e.what());
459template <
typename _Base,
typename _Storage>
465 (getT()->maxIterations (n));
468 }
catch (
const std::exception& e) {
469 throw ::hpp::Error (e.what());
473template <
typename _Base,
typename _Storage>
479 (getT()->timeOut (seconds));
482 }
catch (
const std::exception& e) {
483 throw ::hpp::Error (e.what());
487template <
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());
501template <
typename _Base,
typename _Storage>
507 (getT()->stopWhenProblemIsSolved (enable));
510 }
catch (
const std::exception& e) {
511 throw ::hpp::Error (e.what());
526template <
typename _Base,
typename _Storage>
533template <
typename _Base,
typename _Storage>
541template <
typename _Base,
typename _Storage>
546 _ServantBase::deleteThis();
547 }
catch (
const std::exception& e) {
548 throw ::hpp::Error (e.what());
552template <
typename _Base,
typename _Storage>
557 return _ServantBase::deleteIfExpired();
558 }
catch (
const std::exception& e) {
559 throw ::hpp::Error (e.what());
563template <
typename _Base,
typename _Storage>
568 _ServantBase::persistantStorage(persistant);
569 }
catch (
const std::exception& e) {
570 throw ::hpp::Error (e.what());
574template <
typename _Base,
typename _Storage>
580 hpp::core::PathVectorPtr_t __return__ (getT()->optimize (_path));
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());
588template <
typename _Base,
typename _Storage>
594 (getT()->interrupt ());
597 }
catch (
const std::exception& e) {
598 throw ::hpp::Error (e.what());
602template <
typename _Base,
typename _Storage>
608 (getT()->maxIterations (n));
611 }
catch (
const std::exception& e) {
612 throw ::hpp::Error (e.what());
616template <
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
ReturnType::Object_var makeServantDownCast(Server *server, const typename ServantBaseType::Storage &t)
Definition servant-base.hh:407
floatSeq * vectorToFloatSeq(core::vectorIn_t input)
vector_t floatSeqToVector(const floatSeq &dofArray, const size_type expectedSize=-1)
floatSeqSeq * matrixToFloatSeqSeq(core::matrixIn_t input)
Returns a sequence of the rows of the input matrix.
sequence< ConnectedComponent > ConnectedComponentSeq
Definition path_planners.idl:35
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