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