hpp-corbaserver  4.10.1
Corba server for Humanoid Path Planner applications
robots.hh
Go to the documentation of this file.
1 #ifndef hpp_pinocchio_idl__robots_hxx__
2 #define hpp_pinocchio_idl__robots_hxx__
3 
4 //
5 // Implemention of IDL interfaces in file /local/robotpkg/var/tmp/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-4.10.1/idl/hpp/pinocchio_idl/robots.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::pinocchio_idl::CenterOfMassComputation
20 //
21 namespace hpp {
22 
23 namespace pinocchio_impl {
24 template <typename _Base, typename _Storage>
26  : hpp::corbaServer::ServantBase<hpp::pinocchio::CenterOfMassComputation, _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  (getT()->compute ());
56 
57 
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  // automatically generated code.
68 
70 
71  return __return__;
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::value_type __return__ (getT()->mass ());
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  // automatically generated code.
96 
98 
99  return __return__;
100  } catch (const std::exception& e) {
101  throw ::hpp::Error (e.what());
102  }
103 }
104 
105 // End of implementational code
106 } // namespace pinocchio_impl
107 
108 } // namespace hpp
109 
110 //
111 // Implementational code for IDL interface hpp::pinocchio_idl::Device
112 //
113 namespace hpp {
114 
115 namespace pinocchio_impl {
116 template <typename _Base, typename _Storage>
118  : hpp::corbaServer::ServantBase<hpp::pinocchio::Device, _Storage> (server, s)
119 {
120  // add extra constructor code here
121 }
122 template <typename _Base, typename _Storage>
124 {
125  // add extra destructor code here
126 }
127 
128 // Methods corresponding to IDL attributes and operations
129 
130 template <typename _Base, typename _Storage>
132 {
133  try {
134  // automatically generated code.
135 
136  char* __return__ = ::hpp::corbaServer::c_str (getT()->name ());
137 
138  return __return__;
139  } catch (const std::exception& e) {
140  throw ::hpp::Error (e.what());
141  }
142 }
143 
144 template <typename _Base, typename _Storage>
145 void DeviceServant<_Base, _Storage>::integrate (const hpp::floatSeq& config_in, const hpp::floatSeq& velocity, hpp::floatSeq_out result)
146 {
147  try {
148  // generated from /local/robotpkg/var/tmp/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-4.10.1/idl/hpp/pinocchio_idl/robots.idl:29
150  hpp::pinocchio::Configuration_t res (d->configSize());
151  hpp::pinocchio::integrate<false, hpp::pinocchio::DefaultLieGroupMap> (d,
152  ::hpp::corbaServer::floatSeqToVector(config_in, d->configSize()),
153  ::hpp::corbaServer::floatSeqToVector(velocity , d->numberDof()),
154  res);
156 
157  } catch (const std::exception& e) {
158  throw ::hpp::Error (e.what());
159  }
160 }
161 
162 template <typename _Base, typename _Storage>
163 void DeviceServant<_Base, _Storage>::difference (const hpp::floatSeq& q1, const hpp::floatSeq& q2, hpp::floatSeq_out result)
164 {
165  try {
166  // generated from /local/robotpkg/var/tmp/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-4.10.1/idl/hpp/pinocchio_idl/robots.idl:29
168  hpp::pinocchio::Configuration_t res (d->numberDof());
169  hpp::pinocchio::difference<hpp::pinocchio::DefaultLieGroupMap> (d,
170  ::hpp::corbaServer::floatSeqToVector(q1, d->configSize()),
171  ::hpp::corbaServer::floatSeqToVector(q2, d->configSize()),
172  res);
174 
175  } catch (const std::exception& e) {
176  throw ::hpp::Error (e.what());
177  }
178 }
179 
180 template <typename _Base, typename _Storage>
181 void DeviceServant<_Base, _Storage>::interpolate (const hpp::floatSeq& q1, const hpp::floatSeq& q2, ::CORBA::Float u, hpp::floatSeq_out result)
182 {
183  try {
184  // generated from /local/robotpkg/var/tmp/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-4.10.1/idl/hpp/pinocchio_idl/robots.idl:29
186  hpp::pinocchio::Configuration_t res (d->configSize());
187  hpp::pinocchio::interpolate<hpp::pinocchio::DefaultLieGroupMap> (d,
188  ::hpp::corbaServer::floatSeqToVector(q1, d->configSize()),
189  ::hpp::corbaServer::floatSeqToVector(q2, d->configSize()),
190  u,
191  res);
193 
194  } catch (const std::exception& e) {
195  throw ::hpp::Error (e.what());
196  }
197 }
198 
199 template <typename _Base, typename _Storage>
200 void DeviceServant<_Base, _Storage>::saturate (const hpp::floatSeq& qin, hpp::floatSeq_out qout, hpp::boolSeq_out saturation)
201 {
202  try {
203  // generated from /local/robotpkg/var/tmp/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-4.10.1/idl/hpp/pinocchio_idl/robots.idl:29
206  hpp::pinocchio::ArrayXb sat (d->numberDof());
207  hpp::pinocchio::saturate (d, q, sat);
209  saturation = ::hpp::corbaServer::toBoolSeq(sat.data(), sat.data()+sat.size());
210 
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  // generated from /local/robotpkg/var/tmp/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-4.10.1/idl/hpp/pinocchio_idl/robots.idl:29
222  hpp::pinocchio::replaceGeometryByConvexHull(d->geomModel(),
223  ::hpp::corbaServer::toStrings<std::vector<std::string> >(geometryNames));
224  d->createGeomData();
225 
226  } catch (const std::exception& e) {
227  throw ::hpp::Error (e.what());
228  }
229 }
230 
231 // End of implementational code
232 } // namespace pinocchio_impl
233 
234 } // namespace hpp
235 
236 
237 
238 
239 
240 #endif // hpp_pinocchio_idl__robots_hxx__
241 
pinocchio::DevicePtr_t DevicePtr_t
Definition: fwd.hh:51
virtual ~CenterOfMassComputationServant()
Definition: robots.hh:31
hpp::value_type mass()
Definition: robots.hh:78
boolSeq * toBoolSeq(InputIt begin, InputIt end)
Definition: conversions.hh:110
Definition: robots-fwd.hh:71
Implement CORBA interface ``Obstacle&#39;&#39;.
Definition: basic-server.hh:27
hpp::floatSeqSeq * jacobian()
Definition: robots.hh:92
double value_type
Definition: common.idl:18
hpp::floatSeq * com()
Definition: robots.hh:64
sequence< floatSeq > floatSeqSeq
Definition: common.idl:33
virtual ~DeviceServant()
Definition: robots.hh:123
void saturate(const hpp::floatSeq &qin, hpp::floatSeq_out qout, hpp::boolSeq_out saturation)
Definition: robots.hh:200
void integrate(const hpp::floatSeq &config_in, const hpp::floatSeq &velocity, hpp::floatSeq_out result)
Definition: robots.hh:145
void replaceGeometryByConvexHull(const hpp::Names_t &geometryNames)
Definition: robots.hh:217
vector_t floatSeqToVector(const floatSeq &dofArray, const size_type expectedSize=-1)
char * c_str(const std::string &in)
Definition: conversions.hh:68
sequence< string > Names_t
Sequence of names.
Definition: common.idl:22
char * name()
Definition: robots.hh:131
CenterOfMassComputationServant(::hpp::corbaServer::Server *server, const _Storage &s)
Definition: robots.hh:25
DeviceServant(::hpp::corbaServer::Server *server, const _Storage &s)
Definition: robots.hh:117
ServantBase(Server *server, const Storage &_s)
Definition: servant-base.hh:165
pinocchio::Configuration_t Configuration_t
Definition: fwd.hh:43
Implementation of Hpp module Corba server.
Definition: server.hh:54
void difference(const hpp::floatSeq &q1, const hpp::floatSeq &q2, hpp::floatSeq_out result)
Definition: robots.hh:163
floatSeqSeq * matrixToFloatSeqSeq(core::matrixIn_t input)
Returns a sequence of the rows of the input matrix.
void interpolate(const hpp::floatSeq &q1, const hpp::floatSeq &q2, ::CORBA::Float u, hpp::floatSeq_out result)
Definition: robots.hh:181
floatSeq * vectorToFloatSeq(core::vectorIn_t input)
StorageElementShPtr_t getT() const
Definition: servant-base.hh:121
sequence< double > floatSeq
Robot configuration is defined by a sequence of dof value.
Definition: common.idl:32