Directory: | ./ |
---|---|
File: | src/hpp/pinocchio_idl/robots.hh |
Date: | 2024-12-13 15:50:05 |
Exec | Total | Coverage | |
---|---|---|---|
Lines: | 35 | 201 | 17.4% |
Branches: | 30 | 446 | 6.7% |
Line | Branch | Exec | Source |
---|---|---|---|
1 | #ifndef hpp_pinocchio_idl__robots_hxx__ | ||
2 | #define hpp_pinocchio_idl__robots_hxx__ | ||
3 | |||
4 | // | ||
5 | // Implemention of IDL interfaces in file /root/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-6.0.0/idl/hpp/pinocchio_idl/robots.idl | ||
6 | // | ||
7 | |||
8 | #include <hpp/pinocchio_idl/robots-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::pinocchio_idl::CenterOfMassComputation | ||
20 | // | ||
21 | namespace hpp { | ||
22 | |||
23 | namespace pinocchio_impl { | ||
24 | template <typename _Base, typename _Storage> | ||
25 | ✗ | CenterOfMassComputationServant<_Base, _Storage>::CenterOfMassComputationServant(::hpp::corbaServer::Server* server, | |
26 | const _Storage& s) | ||
27 | ✗ | : hpp::corbaServer::ServantBase<hpp::pinocchio::CenterOfMassComputation, _Storage> (server, s) | |
28 | { | ||
29 | // add extra constructor code here | ||
30 | } | ||
31 | template <typename _Base, typename _Storage> | ||
32 | ✗ | CenterOfMassComputationServant<_Base, _Storage>::~CenterOfMassComputationServant() | |
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 CenterOfMassComputationServant<_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 CenterOfMassComputationServant<_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 CenterOfMassComputationServant<_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 | ✗ | void CenterOfMassComputationServant<_Base, _Storage>::compute () | |
74 | { | ||
75 | try { | ||
76 | // automatically generated code. | ||
77 | |||
78 | ✗ | (getT()->compute ()); | |
79 | |||
80 | |||
81 | ✗ | } catch (const std::exception& e) { | |
82 | ✗ | throw ::hpp::Error (e.what()); | |
83 | } | ||
84 | } | ||
85 | |||
86 | template <typename _Base, typename _Storage> | ||
87 | ✗ | hpp::floatSeq* CenterOfMassComputationServant<_Base, _Storage>::com () | |
88 | { | ||
89 | try { | ||
90 | // automatically generated code. | ||
91 | |||
92 | ✗ | hpp::floatSeq* __return__ = hpp::corbaServer::vectorToFloatSeq (getT()->com ()); | |
93 | |||
94 | ✗ | return __return__; | |
95 | ✗ | } catch (const std::exception& e) { | |
96 | ✗ | throw ::hpp::Error (e.what()); | |
97 | } | ||
98 | } | ||
99 | |||
100 | template <typename _Base, typename _Storage> | ||
101 | ✗ | hpp::value_type CenterOfMassComputationServant<_Base, _Storage>::mass () | |
102 | { | ||
103 | try { | ||
104 | // automatically generated code. | ||
105 | |||
106 | ✗ | hpp::value_type __return__ (getT()->mass ()); | |
107 | |||
108 | ✗ | return __return__; | |
109 | ✗ | } catch (const std::exception& e) { | |
110 | ✗ | throw ::hpp::Error (e.what()); | |
111 | } | ||
112 | } | ||
113 | |||
114 | template <typename _Base, typename _Storage> | ||
115 | ✗ | hpp::floatSeqSeq* CenterOfMassComputationServant<_Base, _Storage>::jacobian () | |
116 | { | ||
117 | try { | ||
118 | // automatically generated code. | ||
119 | |||
120 | ✗ | hpp::floatSeqSeq* __return__ = hpp::corbaServer::matrixToFloatSeqSeq (getT()->jacobian ()); | |
121 | |||
122 | ✗ | return __return__; | |
123 | ✗ | } catch (const std::exception& e) { | |
124 | ✗ | throw ::hpp::Error (e.what()); | |
125 | } | ||
126 | } | ||
127 | |||
128 | // End of implementational code | ||
129 | } // namespace pinocchio_impl | ||
130 | |||
131 | } // namespace hpp | ||
132 | |||
133 | // | ||
134 | // Implementational code for IDL interface hpp::pinocchio_idl::Device | ||
135 | // | ||
136 | namespace hpp { | ||
137 | |||
138 | namespace pinocchio_impl { | ||
139 | template <typename _Base, typename _Storage> | ||
140 | 2 | DeviceServant<_Base, _Storage>::DeviceServant(::hpp::corbaServer::Server* server, | |
141 | const _Storage& s) | ||
142 |
2/4✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
✓ Branch 7 taken 2 times.
✗ Branch 8 not taken.
|
2 | : hpp::corbaServer::ServantBase<hpp::pinocchio::Device, _Storage> (server, s) |
143 | { | ||
144 | // add extra constructor code here | ||
145 | 2 | } | |
146 | template <typename _Base, typename _Storage> | ||
147 | 8 | DeviceServant<_Base, _Storage>::~DeviceServant() | |
148 | { | ||
149 | // add extra destructor code here | ||
150 | 8 | } | |
151 | |||
152 | // Methods corresponding to IDL attributes and operations | ||
153 | |||
154 | template <typename _Base, typename _Storage> | ||
155 | ✗ | void DeviceServant<_Base, _Storage>::deleteThis () | |
156 | { | ||
157 | try { | ||
158 | // automatically generated code. | ||
159 | ✗ | _ServantBase::deleteThis(); | |
160 | ✗ | } catch (const std::exception& e) { | |
161 | ✗ | throw ::hpp::Error (e.what()); | |
162 | } | ||
163 | } | ||
164 | |||
165 | template <typename _Base, typename _Storage> | ||
166 | ✗ | ::CORBA::Boolean DeviceServant<_Base, _Storage>::deleteIfExpired () | |
167 | { | ||
168 | try { | ||
169 | // automatically generated code. | ||
170 | ✗ | return _ServantBase::deleteIfExpired(); | |
171 | ✗ | } catch (const std::exception& e) { | |
172 | ✗ | throw ::hpp::Error (e.what()); | |
173 | } | ||
174 | } | ||
175 | |||
176 | template <typename _Base, typename _Storage> | ||
177 | ✗ | void DeviceServant<_Base, _Storage>::persistantStorage (::CORBA::Boolean persistant) | |
178 | { | ||
179 | try { | ||
180 | // automatically generated code. | ||
181 | ✗ | _ServantBase::persistantStorage(persistant); | |
182 | ✗ | } catch (const std::exception& e) { | |
183 | ✗ | throw ::hpp::Error (e.what()); | |
184 | } | ||
185 | } | ||
186 | |||
187 | template <typename _Base, typename _Storage> | ||
188 | ✗ | char* DeviceServant<_Base, _Storage>::name () | |
189 | { | ||
190 | try { | ||
191 | // automatically generated code. | ||
192 | |||
193 | ✗ | char* __return__ = ::hpp::corbaServer::c_str (getT()->name ()); | |
194 | |||
195 | ✗ | return __return__; | |
196 | ✗ | } catch (const std::exception& e) { | |
197 | ✗ | throw ::hpp::Error (e.what()); | |
198 | } | ||
199 | } | ||
200 | |||
201 | template <typename _Base, typename _Storage> | ||
202 | ✗ | hpp::floatSeq* DeviceServant<_Base, _Storage>::neutralConfiguration () | |
203 | { | ||
204 | try { | ||
205 | // automatically generated code. | ||
206 | |||
207 | ✗ | hpp::floatSeq* __return__ = hpp::corbaServer::vectorToFloatSeq (getT()->neutralConfiguration ()); | |
208 | |||
209 | ✗ | return __return__; | |
210 | ✗ | } catch (const std::exception& e) { | |
211 | ✗ | throw ::hpp::Error (e.what()); | |
212 | } | ||
213 | } | ||
214 | |||
215 | template <typename _Base, typename _Storage> | ||
216 | 1 | hpp::size_type DeviceServant<_Base, _Storage>::configSize () | |
217 | { | ||
218 | try { | ||
219 | // automatically generated code. | ||
220 | |||
221 |
2/4✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
|
1 | hpp::size_type __return__ (getT()->configSize ()); |
222 | |||
223 | 1 | return __return__; | |
224 | ✗ | } catch (const std::exception& e) { | |
225 | ✗ | throw ::hpp::Error (e.what()); | |
226 | } | ||
227 | } | ||
228 | |||
229 | template <typename _Base, typename _Storage> | ||
230 | 1 | hpp::size_type DeviceServant<_Base, _Storage>::numberDof () | |
231 | { | ||
232 | try { | ||
233 | // automatically generated code. | ||
234 | |||
235 |
2/4✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
|
1 | hpp::size_type __return__ (getT()->numberDof ()); |
236 | |||
237 | 1 | return __return__; | |
238 | ✗ | } catch (const std::exception& e) { | |
239 | ✗ | throw ::hpp::Error (e.what()); | |
240 | } | ||
241 | } | ||
242 | |||
243 | template <typename _Base, typename _Storage> | ||
244 | ✗ | void DeviceServant<_Base, _Storage>::integrate (const hpp::floatSeq& config_in, const hpp::floatSeq& velocity, hpp::floatSeq_out result) | |
245 | { | ||
246 | try { | ||
247 | // generated from /root/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-6.0.0/idl/hpp/pinocchio_idl/robots.idl:29 | ||
248 | ✗ | hpp::pinocchio::DevicePtr_t d = getT(); | |
249 | ✗ | hpp::pinocchio::Configuration_t res (d->configSize()); | |
250 | ✗ | hpp::pinocchio::integrate<false, hpp::pinocchio::DefaultLieGroupMap> (d, | |
251 | ::hpp::corbaServer::floatSeqToVector(config_in, d->configSize()), | ||
252 | ::hpp::corbaServer::floatSeqToVector(velocity , d->numberDof()), | ||
253 | res); | ||
254 | ✗ | result = ::hpp::corbaServer::vectorToFloatSeq (res); | |
255 | |||
256 | ✗ | } catch (const std::exception& e) { | |
257 | ✗ | throw ::hpp::Error (e.what()); | |
258 | } | ||
259 | } | ||
260 | |||
261 | template <typename _Base, typename _Storage> | ||
262 | ✗ | void DeviceServant<_Base, _Storage>::difference (const hpp::floatSeq& q1, const hpp::floatSeq& q2, hpp::floatSeq_out result) | |
263 | { | ||
264 | try { | ||
265 | // generated from /root/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-6.0.0/idl/hpp/pinocchio_idl/robots.idl:29 | ||
266 | ✗ | hpp::pinocchio::DevicePtr_t d = getT(); | |
267 | ✗ | hpp::pinocchio::Configuration_t res (d->numberDof()); | |
268 | ✗ | hpp::pinocchio::difference<hpp::pinocchio::DefaultLieGroupMap> (d, | |
269 | ::hpp::corbaServer::floatSeqToVector(q1, d->configSize()), | ||
270 | ::hpp::corbaServer::floatSeqToVector(q2, d->configSize()), | ||
271 | res); | ||
272 | ✗ | result = ::hpp::corbaServer::vectorToFloatSeq (res); | |
273 | |||
274 | ✗ | } catch (const std::exception& e) { | |
275 | ✗ | throw ::hpp::Error (e.what()); | |
276 | } | ||
277 | } | ||
278 | |||
279 | template <typename _Base, typename _Storage> | ||
280 | ✗ | void DeviceServant<_Base, _Storage>::interpolate (const hpp::floatSeq& q1, const hpp::floatSeq& q2, ::CORBA::Float u, hpp::floatSeq_out result) | |
281 | { | ||
282 | try { | ||
283 | // generated from /root/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-6.0.0/idl/hpp/pinocchio_idl/robots.idl:29 | ||
284 | ✗ | hpp::pinocchio::DevicePtr_t d = getT(); | |
285 | ✗ | hpp::pinocchio::Configuration_t res (d->configSize()); | |
286 | ✗ | hpp::pinocchio::interpolate<hpp::pinocchio::DefaultLieGroupMap> (d, | |
287 | ::hpp::corbaServer::floatSeqToVector(q1, d->configSize()), | ||
288 | ::hpp::corbaServer::floatSeqToVector(q2, d->configSize()), | ||
289 | ✗ | u, | |
290 | res); | ||
291 | ✗ | result = ::hpp::corbaServer::vectorToFloatSeq (res); | |
292 | |||
293 | ✗ | } catch (const std::exception& e) { | |
294 | ✗ | throw ::hpp::Error (e.what()); | |
295 | } | ||
296 | } | ||
297 | |||
298 | template <typename _Base, typename _Storage> | ||
299 | ✗ | void DeviceServant<_Base, _Storage>::saturate (const hpp::floatSeq& qin, hpp::floatSeq_out qout, hpp::boolSeq_out saturation) | |
300 | { | ||
301 | try { | ||
302 | // generated from /root/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-6.0.0/idl/hpp/pinocchio_idl/robots.idl:29 | ||
303 | ✗ | hpp::pinocchio::DevicePtr_t d = getT(); | |
304 | ✗ | hpp::pinocchio::Configuration_t q (::hpp::corbaServer::floatSeqToVector(qin)); | |
305 | ✗ | hpp::pinocchio::ArrayXb sat (d->numberDof()); | |
306 | ✗ | hpp::pinocchio::saturate (d, q, sat); | |
307 | ✗ | qout = ::hpp::corbaServer::vectorToFloatSeq (q); | |
308 | ✗ | saturation = ::hpp::corbaServer::toBoolSeq(sat.data(), sat.data()+sat.size()); | |
309 | |||
310 | ✗ | } catch (const std::exception& e) { | |
311 | ✗ | throw ::hpp::Error (e.what()); | |
312 | } | ||
313 | } | ||
314 | |||
315 | template <typename _Base, typename _Storage> | ||
316 | ✗ | void DeviceServant<_Base, _Storage>::replaceGeometryByConvexHull (const hpp::Names_t& geometryNames) | |
317 | { | ||
318 | try { | ||
319 | // generated from /root/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-6.0.0/idl/hpp/pinocchio_idl/robots.idl:29 | ||
320 | ✗ | hpp::pinocchio::DevicePtr_t d = getT(); | |
321 | ✗ | hpp::pinocchio::replaceGeometryByConvexHull(d->geomModel(), | |
322 | ::hpp::corbaServer::toStrings<std::vector<std::string> >(geometryNames)); | ||
323 | ✗ | d->createGeomData(); | |
324 | |||
325 | ✗ | } catch (const std::exception& e) { | |
326 | ✗ | throw ::hpp::Error (e.what()); | |
327 | } | ||
328 | } | ||
329 | |||
330 | template <typename _Base, typename _Storage> | ||
331 | 2 | hpp::floatSeq* DeviceServant<_Base, _Storage>::getCurrentConfiguration () | |
332 | { | ||
333 | try { | ||
334 | // automatically generated code. | ||
335 | |||
336 |
4/8✓ Branch 1 taken 2 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 2 times.
✗ Branch 6 not taken.
✓ Branch 8 taken 2 times.
✗ Branch 9 not taken.
✓ Branch 11 taken 2 times.
✗ Branch 12 not taken.
|
2 | hpp::floatSeq* __return__ = hpp::corbaServer::vectorToFloatSeq (getT()->currentConfiguration ()); |
337 | |||
338 | 2 | return __return__; | |
339 | ✗ | } catch (const std::exception& e) { | |
340 | ✗ | throw ::hpp::Error (e.what()); | |
341 | } | ||
342 | } | ||
343 | |||
344 | template <typename _Base, typename _Storage> | ||
345 | 1 | ::CORBA::Boolean DeviceServant<_Base, _Storage>::setCurrentConfiguration (const hpp::floatSeq& configuration) | |
346 | { | ||
347 | try { | ||
348 | // automatically generated code. | ||
349 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
1 | hpp::core::vector_t _configuration = hpp::corbaServer::floatSeqToVector (configuration); |
350 |
3/6✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 8 taken 1 times.
✗ Branch 9 not taken.
|
1 | ::CORBA::Boolean __return__ (getT()->currentConfiguration (_configuration)); |
351 | |||
352 | 1 | return __return__; | |
353 |
0/2✗ Branch 2 not taken.
✗ Branch 3 not taken.
|
1 | } catch (const std::exception& e) { |
354 | ✗ | throw ::hpp::Error (e.what()); | |
355 | } | ||
356 | } | ||
357 | |||
358 | template <typename _Base, typename _Storage> | ||
359 | 1 | hpp::floatSeq* DeviceServant<_Base, _Storage>::getCurrentVelocity () | |
360 | { | ||
361 | try { | ||
362 | // automatically generated code. | ||
363 | |||
364 |
4/8✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 8 taken 1 times.
✗ Branch 9 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
|
1 | hpp::floatSeq* __return__ = hpp::corbaServer::vectorToFloatSeq (getT()->currentVelocity ()); |
365 | |||
366 | 1 | return __return__; | |
367 | ✗ | } catch (const std::exception& e) { | |
368 | ✗ | throw ::hpp::Error (e.what()); | |
369 | } | ||
370 | } | ||
371 | |||
372 | template <typename _Base, typename _Storage> | ||
373 | 1 | ::CORBA::Boolean DeviceServant<_Base, _Storage>::setCurrentVelocity (const hpp::floatSeq& velocity) | |
374 | { | ||
375 | try { | ||
376 | // automatically generated code. | ||
377 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
1 | hpp::core::vector_t _velocity = hpp::corbaServer::floatSeqToVector (velocity); |
378 |
3/6✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 8 taken 1 times.
✗ Branch 9 not taken.
|
1 | ::CORBA::Boolean __return__ (getT()->currentVelocity (_velocity)); |
379 | |||
380 | 1 | return __return__; | |
381 |
0/2✗ Branch 2 not taken.
✗ Branch 3 not taken.
|
1 | } catch (const std::exception& e) { |
382 | ✗ | throw ::hpp::Error (e.what()); | |
383 | } | ||
384 | } | ||
385 | |||
386 | template <typename _Base, typename _Storage> | ||
387 | 1 | hpp::floatSeq* DeviceServant<_Base, _Storage>::getCurrentAcceleration () | |
388 | { | ||
389 | try { | ||
390 | // automatically generated code. | ||
391 | |||
392 |
4/8✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 8 taken 1 times.
✗ Branch 9 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
|
1 | hpp::floatSeq* __return__ = hpp::corbaServer::vectorToFloatSeq (getT()->currentAcceleration ()); |
393 | |||
394 | 1 | return __return__; | |
395 | ✗ | } catch (const std::exception& e) { | |
396 | ✗ | throw ::hpp::Error (e.what()); | |
397 | } | ||
398 | } | ||
399 | |||
400 | template <typename _Base, typename _Storage> | ||
401 | 1 | ::CORBA::Boolean DeviceServant<_Base, _Storage>::setCurrentAcceleration (const hpp::floatSeq& acceleration) | |
402 | { | ||
403 | try { | ||
404 | // automatically generated code. | ||
405 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
1 | hpp::core::vector_t _acceleration = hpp::corbaServer::floatSeqToVector (acceleration); |
406 |
3/6✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 8 taken 1 times.
✗ Branch 9 not taken.
|
1 | ::CORBA::Boolean __return__ (getT()->currentAcceleration (_acceleration)); |
407 | |||
408 | 1 | return __return__; | |
409 |
0/2✗ Branch 2 not taken.
✗ Branch 3 not taken.
|
1 | } catch (const std::exception& e) { |
410 | ✗ | throw ::hpp::Error (e.what()); | |
411 | } | ||
412 | } | ||
413 | |||
414 | template <typename _Base, typename _Storage> | ||
415 | ✗ | ::CORBA::Short DeviceServant<_Base, _Storage>::computationFlag () | |
416 | { | ||
417 | try { | ||
418 | // automatically generated code. | ||
419 | |||
420 | ✗ | ::CORBA::Short __return__ (getT()->computationFlag ()); | |
421 | |||
422 | ✗ | return __return__; | |
423 | ✗ | } catch (const std::exception& e) { | |
424 | ✗ | throw ::hpp::Error (e.what()); | |
425 | } | ||
426 | } | ||
427 | |||
428 | template <typename _Base, typename _Storage> | ||
429 | ✗ | void DeviceServant<_Base, _Storage>::controlComputation (::CORBA::Short flag) | |
430 | { | ||
431 | try { | ||
432 | // generated from /root/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-6.0.0/idl/hpp/pinocchio_idl/robots.idl:29 | ||
433 | ✗ | getT()->controlComputation(hpp::pinocchio::Computation_t(flag)); | |
434 | |||
435 | ✗ | } catch (const std::exception& e) { | |
436 | ✗ | throw ::hpp::Error (e.what()); | |
437 | } | ||
438 | } | ||
439 | |||
440 | template <typename _Base, typename _Storage> | ||
441 | ✗ | void DeviceServant<_Base, _Storage>::computeForwardKinematics (::CORBA::Short computationFlag) | |
442 | { | ||
443 | try { | ||
444 | // automatically generated code. | ||
445 | |||
446 | ✗ | (getT()->computeForwardKinematics (computationFlag)); | |
447 | |||
448 | |||
449 | ✗ | } catch (const std::exception& e) { | |
450 | ✗ | throw ::hpp::Error (e.what()); | |
451 | } | ||
452 | } | ||
453 | |||
454 | template <typename _Base, typename _Storage> | ||
455 | ✗ | void DeviceServant<_Base, _Storage>::computeFramesForwardKinematics () | |
456 | { | ||
457 | try { | ||
458 | // automatically generated code. | ||
459 | |||
460 | ✗ | (getT()->computeFramesForwardKinematics ()); | |
461 | |||
462 | |||
463 | ✗ | } catch (const std::exception& e) { | |
464 | ✗ | throw ::hpp::Error (e.what()); | |
465 | } | ||
466 | } | ||
467 | |||
468 | template <typename _Base, typename _Storage> | ||
469 | ✗ | void DeviceServant<_Base, _Storage>::updateGeometryPlacements () | |
470 | { | ||
471 | try { | ||
472 | // automatically generated code. | ||
473 | |||
474 | ✗ | (getT()->updateGeometryPlacements ()); | |
475 | |||
476 | |||
477 | ✗ | } catch (const std::exception& e) { | |
478 | ✗ | throw ::hpp::Error (e.what()); | |
479 | } | ||
480 | } | ||
481 | |||
482 | template <typename _Base, typename _Storage> | ||
483 | ✗ | hpp::frame_index DeviceServant<_Base, _Storage>::getFrameByName (const char* name) | |
484 | { | ||
485 | try { | ||
486 | // generated from /root/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-6.0.0/idl/hpp/pinocchio_idl/robots.idl:29 | ||
487 | ✗ | return (frame_index) getT()->getFrameByName(name).index(); | |
488 | |||
489 | ✗ | } catch (const std::exception& e) { | |
490 | ✗ | throw ::hpp::Error (e.what()); | |
491 | } | ||
492 | } | ||
493 | |||
494 | template <typename _Base, typename _Storage> | ||
495 | ✗ | hpp::Transform__slice* DeviceServant<_Base, _Storage>::getFramePosition (hpp::frame_index frame_id) | |
496 | { | ||
497 | try { | ||
498 | // generated from /root/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-6.0.0/idl/hpp/pinocchio_idl/robots.idl:29 | ||
499 | ✗ | if (getT()->model().nframes <= (int)frame_id) throw hpp::Error("Index out of range"); | |
500 | ✗ | hpp::pinocchio::Frame frame(getT(), frame_id); | |
501 | ✗ | return hpp::corbaServer::toHppTransform(frame.currentTransformation()); | |
502 | |||
503 | ✗ | } catch (const std::exception& e) { | |
504 | ✗ | throw ::hpp::Error (e.what()); | |
505 | } | ||
506 | } | ||
507 | |||
508 | template <typename _Base, typename _Storage> | ||
509 | ✗ | hpp::floatSeqSeq* DeviceServant<_Base, _Storage>::getFrameJacobian (hpp::frame_index frame_id) | |
510 | { | ||
511 | try { | ||
512 | // generated from /root/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-6.0.0/idl/hpp/pinocchio_idl/robots.idl:29 | ||
513 | ✗ | if (getT()->model().nframes <= (int)frame_id) throw hpp::Error("Index out of range"); | |
514 | ✗ | if (!(getT()->computationFlag() & hpp::pinocchio::JACOBIAN)) | |
515 | ✗ | throw hpp::Error("Invalid computation flags"); | |
516 | ✗ | hpp::pinocchio::Frame frame(getT(), frame_id); | |
517 | ✗ | return hpp::corbaServer::matrixToFloatSeqSeq(frame.jacobian()); | |
518 | |||
519 | ✗ | } catch (const std::exception& e) { | |
520 | ✗ | throw ::hpp::Error (e.what()); | |
521 | } | ||
522 | } | ||
523 | |||
524 | template <typename _Base, typename _Storage> | ||
525 | ✗ | void DeviceServant<_Base, _Storage>::removeJoints (const hpp::Names_t& joints, const hpp::floatSeq& refConfig) | |
526 | { | ||
527 | try { | ||
528 | // automatically generated code. | ||
529 | ✗ | typedef std::vector<std::string> strings_t;strings_t _joints = hpp::corbaServer::toStrings<strings_t> (joints); | |
530 | ✗ | hpp::core::vector_t _refConfig = hpp::corbaServer::floatSeqToVector (refConfig); | |
531 | ✗ | (getT()->removeJoints (_joints, _refConfig)); | |
532 | |||
533 | |||
534 | ✗ | } catch (const std::exception& e) { | |
535 | ✗ | throw ::hpp::Error (e.what()); | |
536 | } | ||
537 | } | ||
538 | |||
539 | // End of implementational code | ||
540 | } // namespace pinocchio_impl | ||
541 | |||
542 | } // namespace hpp | ||
543 | |||
544 | // | ||
545 | // Implementational code for IDL interface hpp::pinocchio_idl::CollisionObject | ||
546 | // | ||
547 | namespace hpp { | ||
548 | |||
549 | namespace pinocchio_impl { | ||
550 | template <typename _Base, typename _Storage> | ||
551 | ✗ | CollisionObjectServant<_Base, _Storage>::CollisionObjectServant(::hpp::corbaServer::Server* server, | |
552 | const _Storage& s) | ||
553 | ✗ | : hpp::corbaServer::ServantBase<hpp::pinocchio::CollisionObject, _Storage> (server, s) | |
554 | { | ||
555 | // add extra constructor code here | ||
556 | } | ||
557 | template <typename _Base, typename _Storage> | ||
558 | ✗ | CollisionObjectServant<_Base, _Storage>::~CollisionObjectServant() | |
559 | { | ||
560 | // add extra destructor code here | ||
561 | } | ||
562 | |||
563 | // Methods corresponding to IDL attributes and operations | ||
564 | |||
565 | template <typename _Base, typename _Storage> | ||
566 | ✗ | void CollisionObjectServant<_Base, _Storage>::deleteThis () | |
567 | { | ||
568 | try { | ||
569 | // automatically generated code. | ||
570 | ✗ | _ServantBase::deleteThis(); | |
571 | ✗ | } catch (const std::exception& e) { | |
572 | ✗ | throw ::hpp::Error (e.what()); | |
573 | } | ||
574 | } | ||
575 | |||
576 | template <typename _Base, typename _Storage> | ||
577 | ✗ | ::CORBA::Boolean CollisionObjectServant<_Base, _Storage>::deleteIfExpired () | |
578 | { | ||
579 | try { | ||
580 | // automatically generated code. | ||
581 | ✗ | return _ServantBase::deleteIfExpired(); | |
582 | ✗ | } catch (const std::exception& e) { | |
583 | ✗ | throw ::hpp::Error (e.what()); | |
584 | } | ||
585 | } | ||
586 | |||
587 | template <typename _Base, typename _Storage> | ||
588 | ✗ | void CollisionObjectServant<_Base, _Storage>::persistantStorage (::CORBA::Boolean persistant) | |
589 | { | ||
590 | try { | ||
591 | // automatically generated code. | ||
592 | ✗ | _ServantBase::persistantStorage(persistant); | |
593 | ✗ | } catch (const std::exception& e) { | |
594 | ✗ | throw ::hpp::Error (e.what()); | |
595 | } | ||
596 | } | ||
597 | |||
598 | // End of implementational code | ||
599 | } // namespace pinocchio_impl | ||
600 | |||
601 | } // namespace hpp | ||
602 | |||
603 | |||
604 | |||
605 | |||
606 | |||
607 | #endif // hpp_pinocchio_idl__robots_hxx__ | ||
608 | |||
609 |