hpp-corbaserver: src/hpp/core_idl/_problem.hh Source File

hpp-corbaserver 9.0.2 Corba server for Humanoid Path Planner applications

_problem.hh
Go to the documentation of this file.
1 #ifndef hpp_core_idl____problem_hxx__
2 #define hpp_core_idl____problem_hxx__
3
4 //
5 // Implemention of IDL interfaces in file /local/robotpkg/var/tmp/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-9.0.2/idl/hpp/core_idl/_problem.idl
6 //
7
8 #include <hpp/core_idl/_problem-fwd.hh>
9
10 #include <sstream>
11
12 #include <hpp/corbaserver/fwd.hh>
13 #include <hpp/corbaserver/conversions.hh>
14 #include "hpp/corbaserver/servant-base.hh"
15
16
17
18 //
19 // Implementational code for IDL interface hpp::core_idl::Problem
20 //
21 namespace hpp {
22
23 namespace core_impl {
24 template <typename _Base, typename _Storage>
25 ProblemServant<_Base, _Storage>::ProblemServant(::hpp::corbaServer::Server* server,
26 const _Storage& s)
27 : hpp::corbaServer::ServantBase<hpp::core::Problem, _Storage> (server, s)
28 {
29 // add extra constructor code here
30 }
31 template <typename _Base, typename _Storage>
32 ProblemServant<_Base, _Storage>::~ProblemServant()
33 {
34 // add extra destructor code here
35 }
36
37 // Methods corresponding to IDL attributes and operations
38
39 template <typename _Base, typename _Storage>
40 void ProblemServant<_Base, _Storage>::deleteThis ()
41 {
42 try {
43 // automatically generated code.
44 _ServantBase::deleteThis();
45 } catch (const std::exception& e) {
46 throw ::hpp::Error (e.what());
47 }
48 }
49
50 template <typename _Base, typename _Storage>
51 ::CORBA::Boolean ProblemServant<_Base, _Storage>::deleteIfExpired ()
52 {
53 try {
54 // automatically generated code.
55 return _ServantBase::deleteIfExpired();
56 } catch (const std::exception& e) {
57 throw ::hpp::Error (e.what());
58 }
59 }
60
61 template <typename _Base, typename _Storage>
62 void ProblemServant<_Base, _Storage>::persistantStorage (::CORBA::Boolean persistant)
63 {
64 try {
65 // automatically generated code.
66 _ServantBase::persistantStorage(persistant);
67 } catch (const std::exception& e) {
68 throw ::hpp::Error (e.what());
69 }
70 }
71
72 template <typename _Base, typename _Storage>
73 hpp::pinocchio_idl::Device_ptr ProblemServant<_Base, _Storage>::robot ()
74 {
75 try {
76 // automatically generated code.
77
78 hpp::pinocchio::DevicePtr_t __return__ (getT()->robot ());
79
80 return ::hpp::corbaServer::makeServantDownCast<hpp::pinocchio_impl::Device,hpp::pinocchio_impl::Device>(server_, __return__)._retn();
81 } catch (const std::exception& e) {
82 throw ::hpp::Error (e.what());
83 }
84 }
85
86 template <typename _Base, typename _Storage>
87 void ProblemServant<_Base, _Storage>::setInitConfig (const hpp::floatSeq& init)
88 {
89 try {
90 // generated from /local/robotpkg/var/tmp/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-9.0.2/idl/hpp/core_idl/_problem.idl:33
91 pinocchio::Configuration_t q (corbaServer::floatSeqToConfig(getT()->robot(), init, true));
92 getT()->initConfig (q);
93
94 } catch (const std::exception& e) {
95 throw ::hpp::Error (e.what());
96 }
97 }
98
99 template <typename _Base, typename _Storage>
100 hpp::floatSeq* ProblemServant<_Base, _Storage>::getInitConfig ()
101 {
102 try {
103 // automatically generated code.
104
105 hpp::floatSeq* __return__ = hpp::corbaServer::vectorToFloatSeq (getT()->initConfig ());
106
107 return __return__;
108 } catch (const std::exception& e) {
109 throw ::hpp::Error (e.what());
110 }
111 }
112
113 template <typename _Base, typename _Storage>
114 void ProblemServant<_Base, _Storage>::addGoalConfig (const hpp::floatSeq& goal)
115 {
116 try {
117 // generated from /local/robotpkg/var/tmp/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-9.0.2/idl/hpp/core_idl/_problem.idl:33
118 pinocchio::Configuration_t q (corbaServer::floatSeqToConfig(getT()->robot(), goal, true));
119 getT()->addGoalConfig (q);
120
121 } catch (const std::exception& e) {
122 throw ::hpp::Error (e.what());
123 }
124 }
125
126 template <typename _Base, typename _Storage>
127 void ProblemServant<_Base, _Storage>::resetGoalConfigs ()
128 {
129 try {
130 // automatically generated code.
131
132 (getT()->resetGoalConfigs ());
133
134
135 } catch (const std::exception& e) {
136 throw ::hpp::Error (e.what());
137 }
138 }
139
140 template <typename _Base, typename _Storage>
141 hpp::core_idl::Constraint_ptr ProblemServant<_Base, _Storage>::getConstraints ()
142 {
143 try {
144 // automatically generated code.
145
146 hpp::core::ConstraintPtr_t __return__ (getT()->constraints ());
147
148 return ::hpp::corbaServer::makeServantDownCast<hpp::core_impl::Constraint,hpp::core_impl::Constraint>(server_, __return__)._retn();
149 } catch (const std::exception& e) {
150 throw ::hpp::Error (e.what());
151 }
152 }
153
154 template <typename _Base, typename _Storage>
155 void ProblemServant<_Base, _Storage>::setConstraints (hpp::core_idl::Constraint_ptr constraints)
156 {
157 try {
158 // generated from /local/robotpkg/var/tmp/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-9.0.2/idl/hpp/core_idl/_problem.idl:33
159 hpp::core::ConstraintPtr_t c = ::hpp::corbaServer::reference_to_servant_base<hpp::core::Constraint>(server_, constraints)->get();
160 hpp::core::ConstraintSetPtr_t cs = HPP_DYNAMIC_PTR_CAST(hpp::core::ConstraintSet, c);
161 if (!cs) throw hpp::Error("Constraint is not of type ConstraintSet");
162 (getT()->constraints (cs));
163
164 } catch (const std::exception& e) {
165 throw ::hpp::Error (e.what());
166 }
167 }
168
169 template <typename _Base, typename _Storage>
170 hpp::core_idl::Distance_ptr ProblemServant<_Base, _Storage>::getDistance ()
171 {
172 try {
173 // automatically generated code.
174
175 hpp::core::DistancePtr_t __return__ (getT()->distance ());
176
177 return ::hpp::corbaServer::makeServantDownCast<hpp::core_impl::Distance,hpp::core_impl::Distance>(server_, __return__)._retn();
178 } catch (const std::exception& e) {
179 throw ::hpp::Error (e.what());
180 }
181 }
182
183 template <typename _Base, typename _Storage>
184 void ProblemServant<_Base, _Storage>::setDistance (hpp::core_idl::Distance_ptr d)
185 {
186 try {
187 // automatically generated code.
188 hpp::core::DistancePtr_t _d = ::hpp::corbaServer::reference_to_object<hpp::core::Distance>(server_, d);
189 (getT()->distance (_d));
190
191
192 } catch (const std::exception& e) {
193 throw ::hpp::Error (e.what());
194 }
195 }
196
197 template <typename _Base, typename _Storage>
198 hpp::core_idl::SteeringMethod_ptr ProblemServant<_Base, _Storage>::getSteeringMethod ()
199 {
200 try {
201 // automatically generated code.
202
203 hpp::core::SteeringMethodPtr_t __return__ (getT()->steeringMethod ());
204
205 return ::hpp::corbaServer::makeServantDownCast<hpp::core_impl::SteeringMethod,hpp::core_impl::SteeringMethod>(server_, __return__)._retn();
206 } catch (const std::exception& e) {
207 throw ::hpp::Error (e.what());
208 }
209 }
210
211 template <typename _Base, typename _Storage>
212 void ProblemServant<_Base, _Storage>::setSteeringMethod (hpp::core_idl::SteeringMethod_ptr d)
213 {
214 try {
215 // automatically generated code.
216 hpp::core::SteeringMethodPtr_t _d = ::hpp::corbaServer::reference_to_object<hpp::core::SteeringMethod>(server_, d);
217 (getT()->steeringMethod (_d));
218
219
220 } catch (const std::exception& e) {
221 throw ::hpp::Error (e.what());
222 }
223 }
224
225 template <typename _Base, typename _Storage>
226 hpp::core_idl::PathValidation_ptr ProblemServant<_Base, _Storage>::getPathValidation ()
227 {
228 try {
229 // automatically generated code.
230
231 hpp::core::PathValidationPtr_t __return__ (getT()->pathValidation ());
232
233 return ::hpp::corbaServer::makeServantDownCast<hpp::core_impl::PathValidation,hpp::core_impl::PathValidation>(server_, __return__)._retn();
234 } catch (const std::exception& e) {
235 throw ::hpp::Error (e.what());
236 }
237 }
238
239 template <typename _Base, typename _Storage>
240 void ProblemServant<_Base, _Storage>::setPathValidation (hpp::core_idl::PathValidation_ptr d)
241 {
242 try {
243 // automatically generated code.
244 hpp::core::PathValidationPtr_t _d = ::hpp::corbaServer::reference_to_object<hpp::core::PathValidation>(server_, d);
245 (getT()->pathValidation (_d));
246
247
248 } catch (const std::exception& e) {
249 throw ::hpp::Error (e.what());
250 }
251 }
252
253 template <typename _Base, typename _Storage>
254 hpp::core_idl::PathProjector_ptr ProblemServant<_Base, _Storage>::getPathProjector ()
255 {
256 try {
257 // automatically generated code.
258
259 hpp::core::PathProjectorPtr_t __return__ (getT()->pathProjector ());
260
261 return ::hpp::corbaServer::makeServantDownCast<hpp::core_impl::PathProjector,hpp::core_impl::PathProjector>(server_, __return__)._retn();
262 } catch (const std::exception& e) {
263 throw ::hpp::Error (e.what());
264 }
265 }
266
267 template <typename _Base, typename _Storage>
268 void ProblemServant<_Base, _Storage>::setPathProjector (hpp::core_idl::PathProjector_ptr p)
269 {
270 try {
271 // automatically generated code.
272 hpp::core::PathProjectorPtr_t _p = ::hpp::corbaServer::reference_to_object<hpp::core::PathProjector>(server_, p);
273 (getT()->pathProjector (_p));
274
275
276 } catch (const std::exception& e) {
277 throw ::hpp::Error (e.what());
278 }
279 }
280
281 template <typename _Base, typename _Storage>
282 hpp::core_idl::ConfigValidation_ptr ProblemServant<_Base, _Storage>::getConfigValidations ()
283 {
284 try {
285 // automatically generated code.
286
287 hpp::core::ConfigValidationPtr_t __return__ (getT()->configValidations ());
288
289 return ::hpp::corbaServer::makeServantDownCast<hpp::core_impl::ConfigValidation,hpp::core_impl::ConfigValidation>(server_, __return__)._retn();
290 } catch (const std::exception& e) {
291 throw ::hpp::Error (e.what());
292 }
293 }
294
295 template <typename _Base, typename _Storage>
296 void ProblemServant<_Base, _Storage>::clearConfigValidations ()
297 {
298 try {
299 // automatically generated code.
300
301 (getT()->clearConfigValidations ());
302
303
304 } catch (const std::exception& e) {
305 throw ::hpp::Error (e.what());
306 }
307 }
308
309 template <typename _Base, typename _Storage>
310 void ProblemServant<_Base, _Storage>::addConfigValidation (hpp::core_idl::ConfigValidation_ptr cfgValidation)
311 {
312 try {
313 // automatically generated code.
314 hpp::core::ConfigValidationPtr_t _cfgValidation = ::hpp::corbaServer::reference_to_object<hpp::core::ConfigValidation>(server_, cfgValidation);
315 (getT()->addConfigValidation (_cfgValidation));
316
317
318 } catch (const std::exception& e) {
319 throw ::hpp::Error (e.what());
320 }
321 }
322
323 template <typename _Base, typename _Storage>
324 hpp::core_idl::ConfigurationShooter_ptr ProblemServant<_Base, _Storage>::getConfigurationShooter ()
325 {
326 try {
327 // automatically generated code.
328
329 hpp::core::ConfigurationShooterPtr_t __return__ (getT()->configurationShooter ());
330
331 return ::hpp::corbaServer::makeServantDownCast<hpp::core_impl::ConfigurationShooter,hpp::core_impl::ConfigurationShooter>(server_, __return__)._retn();
332 } catch (const std::exception& e) {
333 throw ::hpp::Error (e.what());
334 }
335 }
336
337 template <typename _Base, typename _Storage>
338 void ProblemServant<_Base, _Storage>::setConfigurationShooter (hpp::core_idl::ConfigurationShooter_ptr d)
339 {
340 try {
341 // automatically generated code.
342 hpp::core::ConfigurationShooterPtr_t _d = ::hpp::corbaServer::reference_to_object<hpp::core::ConfigurationShooter>(server_, d);
343 (getT()->configurationShooter (_d));
344
345
346 } catch (const std::exception& e) {
347 throw ::hpp::Error (e.what());
348 }
349 }
350
351 template <typename _Base, typename _Storage>
352 void ProblemServant<_Base, _Storage>::filterCollisionPairs ()
353 {
354 try {
355 // automatically generated code.
356
357 (getT()->filterCollisionPairs ());
358
359
360 } catch (const std::exception& e) {
361 throw ::hpp::Error (e.what());
362 }
363 }
364
365 template <typename _Base, typename _Storage>
366 void ProblemServant<_Base, _Storage>::setSecurityMargins (const hpp::floatSeqSeq& margins)
367 {
368 try {
369 // automatically generated code.
370 hpp::core::matrix_t _margins = hpp::corbaServer::floatSeqSeqToMatrix (margins);
371 (getT()->setSecurityMargins (_margins));
372
373
374 } catch (const std::exception& e) {
375 throw ::hpp::Error (e.what());
376 }
377 }
378
379 template <typename _Base, typename _Storage>
380 void ProblemServant<_Base, _Storage>::addObstacle (hpp::pinocchio_idl::CollisionObject_ptr object)
381 {
382 try {
383 // automatically generated code.
384 hpp::pinocchio::CollisionObjectPtr_t _object = ::hpp::corbaServer::reference_to_object<hpp::pinocchio::CollisionObject>(server_, object);
385 (getT()->addObstacle (_object));
386
387
388 } catch (const std::exception& e) {
389 throw ::hpp::Error (e.what());
390 }
391 }
392
393 template <typename _Base, typename _Storage>
394 void ProblemServant<_Base, _Storage>::setParameter (const char* name, const ::CORBA::Any& value)
395 {
396 try {
397 // generated from /local/robotpkg/var/tmp/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-9.0.2/idl/hpp/core_idl/_problem.idl:33
398 getT()->setParameter(name, hpp::corbaServer::toParameter(value));
399
400 } catch (const std::exception& e) {
401 throw ::hpp::Error (e.what());
402 }
403 }
404
405 template <typename _Base, typename _Storage>
406 ::CORBA::Any* ProblemServant<_Base, _Storage>::getParameter (const char* name)
407 {
408 try {
409 // generated from /local/robotpkg/var/tmp/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-9.0.2/idl/hpp/core_idl/_problem.idl:33
410 return hpp::corbaServer::toCorbaAnyPtr(getT()->getParameter(name));
411
412 } catch (const std::exception& e) {
413 throw ::hpp::Error (e.what());
414 }
415 }
416
417 // End of implementational code
418 } // namespace core_impl
419
420 } // namespace hpp
421
422
423
424
425
426 #endif // hpp_core_idl____problem_hxx__
427
Constraint_ptr
_objref_Constraint * Constraint_ptr
Definition: _constraints-idl.hh:219
_problem-fwd.hh
Distance_ptr
_objref_Distance * Distance_ptr
Definition: _problem-idl.hh:165
ConfigValidation_ptr
_objref_ConfigValidation * ConfigValidation_ptr
Definition: _problem-idl.hh:217
PathValidation_ptr
_objref_PathValidation * PathValidation_ptr
Definition: _problem-idl.hh:269
ConfigurationShooter_ptr
_objref_ConfigurationShooter * ConfigurationShooter_ptr
Definition: _problem-idl.hh:295
Device_ptr
_objref_Device * Device_ptr
Definition: _problem-idl.hh:107
PathProjector_ptr
_objref_PathProjector * PathProjector_ptr
Definition: _problem-idl.hh:243
CollisionObject_ptr
_objref_CollisionObject * CollisionObject_ptr
Definition: _problem-idl.hh:133
SteeringMethod_ptr
_objref_SteeringMethod * SteeringMethod_ptr
Definition: _problem-idl.hh:191
hpp::corbaServer::ServantBase< hpp::core::Problem, _Storage >::persistantStorage
bool persistantStorage() const
See persistantStorage(bool)
Definition: servant-base.hh:166
hpp::corbaServer::Server
Implementation of Hpp module Corba server.
Definition: server.hh:78
hpp::core::ConstraintSet
hpp::core_impl::ProblemServant
Definition: _problem-fwd.hh:33
hpp::core_impl::ProblemServant::filterCollisionPairs
void filterCollisionPairs()
Definition: _problem.hh:352
hpp::core_impl::ProblemServant::setConfigurationShooter
void setConfigurationShooter(hpp::core_idl::ConfigurationShooter_ptr d)
Definition: _problem.hh:338
hpp::core_impl::ProblemServant::getSteeringMethod
hpp::core_idl::SteeringMethod_ptr getSteeringMethod()
Definition: _problem.hh:198
hpp::core_impl::ProblemServant::deleteIfExpired
::CORBA::Boolean deleteIfExpired()
Definition: _problem.hh:51
hpp::core_impl::ProblemServant::setPathProjector
void setPathProjector(hpp::core_idl::PathProjector_ptr p)
Definition: _problem.hh:268
hpp::core_impl::ProblemServant::ProblemServant
ProblemServant(::hpp::corbaServer::Server *server, const _Storage &s)
Definition: _problem.hh:25
hpp::core_impl::ProblemServant::setInitConfig
void setInitConfig(const hpp::floatSeq &init)
Definition: _problem.hh:87
hpp::core_impl::ProblemServant::setDistance
void setDistance(hpp::core_idl::Distance_ptr d)
Definition: _problem.hh:184
hpp::core_impl::ProblemServant::getPathProjector
hpp::core_idl::PathProjector_ptr getPathProjector()
Definition: _problem.hh:254
hpp::core_impl::ProblemServant::~ProblemServant
virtual ~ProblemServant()
Definition: _problem.hh:32
hpp::core_impl::ProblemServant::getParameter
::CORBA::Any * getParameter(const char *name)
Definition: _problem.hh:406
hpp::core_impl::ProblemServant::resetGoalConfigs
void resetGoalConfigs()
Definition: _problem.hh:127
hpp::core_impl::ProblemServant::setPathValidation
void setPathValidation(hpp::core_idl::PathValidation_ptr d)
Definition: _problem.hh:240
hpp::core_impl::ProblemServant::addGoalConfig
void addGoalConfig(const hpp::floatSeq &goal)
Definition: _problem.hh:114
hpp::core_impl::ProblemServant::getConfigValidations
hpp::core_idl::ConfigValidation_ptr getConfigValidations()
Definition: _problem.hh:282
hpp::core_impl::ProblemServant::deleteThis
void deleteThis()
Definition: _problem.hh:40
hpp::core_impl::ProblemServant::addConfigValidation
void addConfigValidation(hpp::core_idl::ConfigValidation_ptr cfgValidation)
Definition: _problem.hh:310
hpp::core_impl::ProblemServant::getConstraints
hpp::core_idl::Constraint_ptr getConstraints()
Definition: _problem.hh:141
hpp::core_impl::ProblemServant::setConstraints
void setConstraints(hpp::core_idl::Constraint_ptr constraints)
Definition: _problem.hh:155
hpp::core_impl::ProblemServant::getPathValidation
hpp::core_idl::PathValidation_ptr getPathValidation()
Definition: _problem.hh:226
hpp::core_impl::ProblemServant::setSecurityMargins
void setSecurityMargins(const hpp::floatSeqSeq &margins)
Definition: _problem.hh:366
hpp::core_impl::ProblemServant::getConfigurationShooter
hpp::core_idl::ConfigurationShooter_ptr getConfigurationShooter()
Definition: _problem.hh:324
hpp::core_impl::ProblemServant::addObstacle
void addObstacle(hpp::pinocchio_idl::CollisionObject_ptr object)
Definition: _problem.hh:380
hpp::core_impl::ProblemServant::robot
hpp::pinocchio_idl::Device_ptr robot()
Definition: _problem.hh:73
hpp::core_impl::ProblemServant::clearConfigValidations
void clearConfigValidations()
Definition: _problem.hh:296
hpp::core_impl::ProblemServant::getInitConfig
hpp::floatSeq * getInitConfig()
Definition: _problem.hh:100
hpp::core_impl::ProblemServant::setParameter
void setParameter(const char *name, const ::CORBA::Any &value)
Definition: _problem.hh:394
hpp::core_impl::ProblemServant::getDistance
hpp::core_idl::Distance_ptr getDistance()
Definition: _problem.hh:170
hpp::core_impl::ProblemServant::setSteeringMethod
void setSteeringMethod(hpp::core_idl::SteeringMethod_ptr d)
Definition: _problem.hh:212
conversions.hh
hpp::Error
Corba exception travelling through the Corba channel.
Definition: common.idl:27
fwd.hh
init
void init(const ConfigurationShooterWkPtr_t &weak)
d
const Derived & d
hpp::corbaServer::floatSeqToConfig
Configuration_t floatSeqToConfig(const DevicePtr_t &robot, const floatSeq &dofArray, bool throwIfNotNormalized)
hpp::corbaServer::floatSeqSeqToMatrix
core::matrix_t floatSeqSeqToMatrix(const floatSeqSeq &input, const size_type expectedRows=-1, const size_type expectedCols=-1)
hpp::corbaServer::vectorToFloatSeq
floatSeq * vectorToFloatSeq(core::vectorIn_t input)
hpp::corbaServer::toCorbaAnyPtr
CORBA::Any * toCorbaAnyPtr(const core::Parameter &parameter)
Definition: conversions.hh:164
hpp::corbaServer::toParameter
core::Parameter toParameter(const CORBA::Any &any)
hpp::core::PathValidationPtr_t
shared_ptr< PathValidation > PathValidationPtr_t
hpp::core::DistancePtr_t
shared_ptr< Distance > DistancePtr_t
hpp::core::ConstraintPtr_t
shared_ptr< Constraint > ConstraintPtr_t
hpp::core::ConfigurationShooterPtr_t
shared_ptr< ConfigurationShooter > ConfigurationShooterPtr_t
hpp::core::PathProjectorPtr_t
shared_ptr< PathProjector > PathProjectorPtr_t
hpp::core::SteeringMethodPtr_t
shared_ptr< SteeringMethod > SteeringMethodPtr_t
hpp::core::ConfigValidationPtr_t
shared_ptr< ConfigValidation > ConfigValidationPtr_t
hpp::core::ConstraintSetPtr_t
shared_ptr< ConstraintSet > ConstraintSetPtr_t
hpp::core::matrix_t
pinocchio::matrix_t matrix_t
hpp::pinocchio::DevicePtr_t
shared_ptr< Device > DevicePtr_t
hpp::pinocchio::Configuration_t
vector_t Configuration_t
distance
value_type distance(const DevicePtr_t &robot, ConfigurationIn_t q1, ConfigurationIn_t q2)
hpp::pinocchio::CollisionObjectPtr_t
shared_ptr< CollisionObject > CollisionObjectPtr_t
hpp
Implement CORBA interface `‘Obstacle’'.
hpp::floatSeq
sequence< double > floatSeq
Robot configuration is defined by a sequence of dof value.
Definition: common.idl:34
hpp::floatSeqSeq
sequence< floatSeq > floatSeqSeq
Definition: common.idl:35
HPP_DYNAMIC_PTR_CAST
#define HPP_DYNAMIC_PTR_CAST(t, x)
servant-base.hh