hpp-corbaserver  4.13.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.13.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  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>
33 {
34  // add extra destructor code here
35 }
36 
37 // Methods corresponding to IDL attributes and operations
38 
39 template <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 
50 template <typename _Base, typename _Storage>
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 
64 template <typename _Base, typename _Storage>
66 {
67  try {
68  // generated from /local/robotpkg/var/tmp/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-4.13.0/idl/hpp/core_idl/_problem.idl:32
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 
77 template <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 
91 template <typename _Base, typename _Storage>
93 {
94  try {
95  // generated from /local/robotpkg/var/tmp/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-4.13.0/idl/hpp/core_idl/_problem.idl:32
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 
104 template <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 
118 template <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 
132 template <typename _Base, typename _Storage>
134 {
135  try {
136  // generated from /local/robotpkg/var/tmp/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-4.13.0/idl/hpp/core_idl/_problem.idl:32
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 
147 template <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 
161 template <typename _Base, typename _Storage>
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 
175 template <typename _Base, typename _Storage>
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 
189 template <typename _Base, typename _Storage>
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 
203 template <typename _Base, typename _Storage>
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 
217 template <typename _Base, typename _Storage>
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 
231 template <typename _Base, typename _Storage>
233 {
234  try {
235  // automatically generated code.
236 
237  hpp::core::ConfigValidationPtr_t __return__ (getT()->configValidations ());
238 
239  return ::hpp::corbaServer::makeServantDownCast<hpp::core_impl::ConfigValidation,hpp::core_impl::ConfigValidation>(server_, __return__)._retn();
240  } catch (const std::exception& e) {
241  throw ::hpp::Error (e.what());
242  }
243 }
244 
245 template <typename _Base, typename _Storage>
247 {
248  try {
249  // automatically generated code.
250 
251  (getT()->clearConfigValidations ());
252 
253 
254  } catch (const std::exception& e) {
255  throw ::hpp::Error (e.what());
256  }
257 }
258 
259 template <typename _Base, typename _Storage>
261 {
262  try {
263  // automatically generated code.
264  hpp::core::ConfigValidationPtr_t _cfgValidation = ::hpp::corbaServer::reference_to_object<hpp::core::ConfigValidation>(server_, cfgValidation);
265  (getT()->addConfigValidation (_cfgValidation));
266 
267 
268  } catch (const std::exception& e) {
269  throw ::hpp::Error (e.what());
270  }
271 }
272 
273 template <typename _Base, typename _Storage>
275 {
276  try {
277  // automatically generated code.
278 
279  hpp::core::ConfigurationShooterPtr_t __return__ (getT()->configurationShooter ());
280 
281  return ::hpp::corbaServer::makeServantDownCast<hpp::core_impl::ConfigurationShooter,hpp::core_impl::ConfigurationShooter>(server_, __return__)._retn();
282  } catch (const std::exception& e) {
283  throw ::hpp::Error (e.what());
284  }
285 }
286 
287 template <typename _Base, typename _Storage>
289 {
290  try {
291  // automatically generated code.
292  hpp::core::ConfigurationShooterPtr_t _d = ::hpp::corbaServer::reference_to_object<hpp::core::ConfigurationShooter>(server_, d);
293  (getT()->configurationShooter (_d));
294 
295 
296  } catch (const std::exception& e) {
297  throw ::hpp::Error (e.what());
298  }
299 }
300 
301 template <typename _Base, typename _Storage>
303 {
304  try {
305  // automatically generated code.
306 
307  (getT()->filterCollisionPairs ());
308 
309 
310  } catch (const std::exception& e) {
311  throw ::hpp::Error (e.what());
312  }
313 }
314 
315 template <typename _Base, typename _Storage>
317 {
318  try {
319  // automatically generated code.
321  (getT()->setSecurityMargins (_margins));
322 
323 
324  } catch (const std::exception& e) {
325  throw ::hpp::Error (e.what());
326  }
327 }
328 
329 template <typename _Base, typename _Storage>
331 {
332  try {
333  // automatically generated code.
334  hpp::pinocchio::CollisionObjectPtr_t _object = ::hpp::corbaServer::reference_to_object<hpp::pinocchio::CollisionObject>(server_, object);
335  (getT()->addObstacle (_object));
336 
337 
338  } catch (const std::exception& e) {
339  throw ::hpp::Error (e.what());
340  }
341 }
342 
343 template <typename _Base, typename _Storage>
344 void ProblemServant<_Base, _Storage>::setParameter (const char* name, const ::CORBA::Any& value)
345 {
346  try {
347  // generated from /local/robotpkg/var/tmp/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-4.13.0/idl/hpp/core_idl/_problem.idl:32
348  getT()->setParameter(name, hpp::corbaServer::toParameter(value));
349 
350  } catch (const std::exception& e) {
351  throw ::hpp::Error (e.what());
352  }
353 }
354 
355 template <typename _Base, typename _Storage>
356 ::CORBA::Any* ProblemServant<_Base, _Storage>::getParameter (const char* name)
357 {
358  try {
359  // generated from /local/robotpkg/var/tmp/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-4.13.0/idl/hpp/core_idl/_problem.idl:32
360  return hpp::corbaServer::toCorbaAnyPtr(getT()->getParameter(name));
361 
362  } catch (const std::exception& e) {
363  throw ::hpp::Error (e.what());
364  }
365 }
366 
367 // End of implementational code
368 } // namespace core_impl
369 
370 } // namespace hpp
371 
372 
373 
374 
375 
376 #endif // hpp_core_idl____problem_hxx__
377 
void filterCollisionPairs()
Definition: _problem.hh:302
CORBA::Any * toCorbaAnyPtr(const core::Parameter &parameter)
Definition: conversions.hh:167
ProblemServant(::hpp::corbaServer::Server *server, const _Storage &s)
Definition: _problem.hh:25
hpp::core_idl::ConfigValidation_ptr getConfigValidations()
Definition: _problem.hh:232
pinocchio::DevicePtr_t DevicePtr_t
Definition: fwd.hh:74
hpp::pinocchio_idl::Device_ptr robot()
Definition: _problem.hh:51
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:316
Implement CORBA interface `‘Obstacle’&#39;.
Definition: basic-server.hh:35
_objref_CollisionObject * CollisionObject_ptr
Definition: _problem-idl.hh:129
void setParameter(const char *name, const ::CORBA::Any &value)
Definition: _problem.hh:344
void setConstraints(hpp::core_idl::Constraint_ptr constraints)
Definition: _problem.hh:133
_objref_PathValidation * PathValidation_ptr
Definition: _problem-idl.hh:239
sequence< floatSeq > floatSeqSeq
Definition: common.idl:35
Definition: _problem-fwd.hh:30
virtual ~ProblemServant()
Definition: _problem.hh:32
::CORBA::Any * getParameter(const char *name)
Definition: _problem.hh:356
Corba exception travelling through the Corba channel.
Definition: common.idl:26
void deleteThis()
Definition: _problem.hh:40
void setConfigurationShooter(hpp::core_idl::ConfigurationShooter_ptr d)
Definition: _problem.hh:288
hpp::floatSeq * getInitConfig()
Definition: _problem.hh:78
_objref_ConfigValidation * ConfigValidation_ptr
Definition: _problem-idl.hh:213
void setPathValidation(hpp::core_idl::PathValidation_ptr d)
Definition: _problem.hh:218
core::ConfigurationPtr_t ConfigurationPtr_t
Definition: fwd.hh:67
void setSteeringMethod(hpp::core_idl::SteeringMethod_ptr d)
Definition: _problem.hh:190
void addObstacle(hpp::pinocchio_idl::CollisionObject_ptr object)
Definition: _problem.hh:330
_objref_ConfigurationShooter * ConfigurationShooter_ptr
Definition: _problem-idl.hh:265
void setInitConfig(const hpp::floatSeq &init)
Definition: _problem.hh:65
pinocchio::CollisionObjectPtr_t CollisionObjectPtr_t
Definition: fwd.hh:64
ConstraintSetServant< POA_hpp::core_idl::ConstraintSet, hpp::weak_ptr< hpp::core::ConstraintSet > > ConstraintSet
Definition: _constraints-fwd.hh:170
core::Parameter toParameter(const CORBA::Any &any)
Implementation of Hpp module Corba server.
Definition: server.hh:77
void addGoalConfig(const hpp::floatSeq &goal)
Definition: _problem.hh:92
pinocchio::matrix_t matrix_t
Definition: fwd.hh:110
void addConfigValidation(hpp::core_idl::ConfigValidation_ptr cfgValidation)
Definition: _problem.hh:260
_objref_Constraint * Constraint_ptr
Definition: _constraints-idl.hh:219
hpp::core_idl::SteeringMethod_ptr getSteeringMethod()
Definition: _problem.hh:176
hpp::core_idl::ConfigurationShooter_ptr getConfigurationShooter()
Definition: _problem.hh:274
hpp::core_idl::Constraint_ptr getConstraints()
Definition: _problem.hh:119
floatSeq * vectorToFloatSeq(core::vectorIn_t input)
core::SteeringMethodPtr_t SteeringMethodPtr_t
Definition: fwd.hh:102
void setDistance(hpp::core_idl::Distance_ptr d)
Definition: _problem.hh:162
hpp::core_idl::Distance_ptr getDistance()
Definition: _problem.hh:148
void clearConfigValidations()
Definition: _problem.hh:246
sequence< double > floatSeq
Robot configuration is defined by a sequence of dof value.
Definition: common.idl:34
_objref_Device * Device_ptr
Definition: _problem-idl.hh:103
hpp::core_idl::PathValidation_ptr getPathValidation()
Definition: _problem.hh:204
void resetGoalConfigs()
Definition: _problem.hh:105
_objref_Distance * Distance_ptr
Definition: _problem-idl.hh:161