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