1#ifndef hpp_pinocchio_idl__robots_hxx__
2#define hpp_pinocchio_idl__robots_hxx__
23namespace pinocchio_impl {
24template <
typename _Base,
typename _Storage>
31template <
typename _Base,
typename _Storage>
39template <
typename _Base,
typename _Storage>
44 _ServantBase::deleteThis();
45 }
catch (
const std::exception& e) {
46 throw ::hpp::Error (e.what());
50template <
typename _Base,
typename _Storage>
59 }
catch (
const std::exception& e) {
60 throw ::hpp::Error (e.what());
64template <
typename _Base,
typename _Storage>
73 }
catch (
const std::exception& e) {
74 throw ::hpp::Error (e.what());
78template <
typename _Base,
typename _Storage>
87 }
catch (
const std::exception& e) {
88 throw ::hpp::Error (e.what());
92template <
typename _Base,
typename _Storage>
101 }
catch (
const std::exception& e) {
102 throw ::hpp::Error (e.what());
116namespace pinocchio_impl {
117template <
typename _Base,
typename _Storage>
120 :
hpp::corbaServer::ServantBase<
hpp::pinocchio::
Device, _Storage> (server, s)
124template <
typename _Base,
typename _Storage>
132template <
typename _Base,
typename _Storage>
137 _ServantBase::deleteThis();
138 }
catch (
const std::exception& e) {
139 throw ::hpp::Error (e.what());
143template <
typename _Base,
typename _Storage>
152 }
catch (
const std::exception& e) {
153 throw ::hpp::Error (e.what());
157template <
typename _Base,
typename _Storage>
166 }
catch (
const std::exception& e) {
167 throw ::hpp::Error (e.what());
171template <
typename _Base,
typename _Storage>
176 hpp::pinocchio::DevicePtr_t d = getT();
177 hpp::pinocchio::Configuration_t res (d->configSize());
178 hpp::pinocchio::integrate<false, hpp::pinocchio::DefaultLieGroupMap> (d,
184 }
catch (
const std::exception& e) {
185 throw ::hpp::Error (e.what());
189template <
typename _Base,
typename _Storage>
194 hpp::pinocchio::DevicePtr_t d = getT();
195 hpp::pinocchio::Configuration_t res (d->numberDof());
196 hpp::pinocchio::difference<hpp::pinocchio::DefaultLieGroupMap> (d,
202 }
catch (
const std::exception& e) {
203 throw ::hpp::Error (e.what());
207template <
typename _Base,
typename _Storage>
212 hpp::pinocchio::DevicePtr_t d = getT();
213 hpp::pinocchio::Configuration_t res (d->configSize());
214 hpp::pinocchio::interpolate<hpp::pinocchio::DefaultLieGroupMap> (d,
221 }
catch (
const std::exception& e) {
222 throw ::hpp::Error (e.what());
226template <
typename _Base,
typename _Storage>
231 hpp::pinocchio::DevicePtr_t d = getT();
233 hpp::pinocchio::ArrayXb sat (d->numberDof());
234 hpp::pinocchio::saturate (d, q, sat);
238 }
catch (
const std::exception& e) {
239 throw ::hpp::Error (e.what());
243template <
typename _Base,
typename _Storage>
248 hpp::pinocchio::DevicePtr_t d = getT();
249 hpp::pinocchio::replaceGeometryByConvexHull(d->geomModel(),
253 }
catch (
const std::exception& e) {
254 throw ::hpp::Error (e.what());
258template <
typename _Base,
typename _Storage>
267 }
catch (
const std::exception& e) {
268 throw ::hpp::Error (e.what());
272template <
typename _Base,
typename _Storage>
278 ::CORBA::Boolean __return__ (getT()->currentConfiguration (_configuration));
281 }
catch (
const std::exception& e) {
282 throw ::hpp::Error (e.what());
286template <
typename _Base,
typename _Storage>
292 (getT()->computeForwardKinematics ());
295 }
catch (
const std::exception& e) {
296 throw ::hpp::Error (e.what());
300template <
typename _Base,
typename _Storage>
306 (getT()->computeFramesForwardKinematics ());
309 }
catch (
const std::exception& e) {
310 throw ::hpp::Error (e.what());
314template <
typename _Base,
typename _Storage>
320 (getT()->updateGeometryPlacements ());
323 }
catch (
const std::exception& e) {
324 throw ::hpp::Error (e.what());
328template <
typename _Base,
typename _Storage>
333 return (
frame_index) getT()->getFrameByName(name).index();
335 }
catch (
const std::exception& e) {
336 throw ::hpp::Error (e.what());
340template <
typename _Base,
typename _Storage>
345 if (getT()->model().nframes <= (
int)frame_id)
throw hpp::Error(
"Index out of range");
346 hpp::pinocchio::Frame frame(getT(), frame_id);
349 }
catch (
const std::exception& e) {
350 throw ::hpp::Error (e.what());
354template <
typename _Base,
typename _Storage>
359 if (getT()->model().nframes <= (
int)frame_id)
throw hpp::Error(
"Index out of range");
360 if (!(getT()->computationFlag() & hpp::pinocchio::JACOBIAN))
361 throw hpp::Error(
"Invalid computation flags");
362 hpp::pinocchio::Frame frame(getT(), frame_id);
365 }
catch (
const std::exception& e) {
366 throw ::hpp::Error (e.what());
370template <
typename _Base,
typename _Storage>
375 typedef std::vector<std::string> strings_t;strings_t _joints = hpp::corbaServer::toStrings<strings_t> (joints);
377 (getT()->removeJoints (_joints, _refConfig));
380 }
catch (
const std::exception& e) {
381 throw ::hpp::Error (e.what());
395namespace pinocchio_impl {
396template <
typename _Base,
typename _Storage>
403template <
typename _Base,
typename _Storage>
411template <
typename _Base,
typename _Storage>
416 _ServantBase::deleteThis();
417 }
catch (
const std::exception& e) {
418 throw ::hpp::Error (e.what());
Implementation of Hpp module Corba server.
Definition: server.hh:77
Definition: robots-fwd.hh:30
hpp::floatSeq * com()
Definition: robots.hh:65
CenterOfMassComputationServant(::hpp::corbaServer::Server *server, const _Storage &s)
Definition: robots.hh:25
hpp::floatSeqSeq * jacobian()
Definition: robots.hh:93
void deleteThis()
Definition: robots.hh:40
void compute()
Definition: robots.hh:51
hpp::value_type mass()
Definition: robots.hh:79
virtual ~CenterOfMassComputationServant()
Definition: robots.hh:32
Definition: robots-fwd.hh:168
CollisionObjectServant(::hpp::corbaServer::Server *server, const _Storage &s)
Definition: robots.hh:397
virtual ~CollisionObjectServant()
Definition: robots.hh:404
void deleteThis()
Definition: robots.hh:412
Definition: robots-fwd.hh:81
void difference(const hpp::floatSeq &q1, const hpp::floatSeq &q2, hpp::floatSeq_out result)
Definition: robots.hh:190
void deleteThis()
Definition: robots.hh:133
char * name()
Definition: robots.hh:144
void interpolate(const hpp::floatSeq &q1, const hpp::floatSeq &q2, ::CORBA::Float u, hpp::floatSeq_out result)
Definition: robots.hh:208
void computeFramesForwardKinematics()
Definition: robots.hh:301
hpp::frame_index getFrameByName(const char *name)
Definition: robots.hh:329
void saturate(const hpp::floatSeq &qin, hpp::floatSeq_out qout, hpp::boolSeq_out saturation)
Definition: robots.hh:227
::CORBA::Boolean setCurrentConfiguration(const hpp::floatSeq &configuration)
Definition: robots.hh:273
void integrate(const hpp::floatSeq &config_in, const hpp::floatSeq &velocity, hpp::floatSeq_out result)
Definition: robots.hh:172
void replaceGeometryByConvexHull(const hpp::Names_t &geometryNames)
Definition: robots.hh:244
virtual ~DeviceServant()
Definition: robots.hh:125
hpp::Transform__slice * getFramePosition(hpp::frame_index frame_id)
Definition: robots.hh:341
DeviceServant(::hpp::corbaServer::Server *server, const _Storage &s)
Definition: robots.hh:118
hpp::floatSeq * getCurrentConfiguration()
Definition: robots.hh:259
void updateGeometryPlacements()
Definition: robots.hh:315
hpp::floatSeq * neutralConfiguration()
Definition: robots.hh:158
void removeJoints(const hpp::Names_t &joints, const hpp::floatSeq &refConfig)
Definition: robots.hh:371
hpp::floatSeqSeq * getFrameJacobian(hpp::frame_index frame_id)
Definition: robots.hh:355
void computeForwardKinematics()
Definition: robots.hh:287
Corba exception travelling through the Corba channel.
Definition: common.idl:27
void toHppTransform(const Transform3f &in, Transform_ out)
boolSeq * toBoolSeq(InputIt begin, InputIt end)
Definition: conversions.hh:135
floatSeq * vectorToFloatSeq(core::vectorIn_t input)
OutputType toStrings(const Names_t &names)
Definition: conversions.hh:150
vector_t floatSeqToVector(const floatSeq &dofArray, const size_type expectedSize=-1)
floatSeqSeq * matrixToFloatSeqSeq(core::matrixIn_t input)
Returns a sequence of the rows of the input matrix.
char * c_str(const std::string &in)
Definition: conversions.hh:92
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
sequence< string > Names_t
Sequence of names.
Definition: common.idl:23
unsigned long frame_index
Definition: common.idl:20
double value_type
Definition: common.idl:18