17 #ifndef HPP_CORBASERVER_CONVERSIONS_HH 18 #define HPP_CORBASERVER_CONVERSIONS_HH 20 # include <hpp/util/exception-factory.hh> 23 # include <hpp/common-idl.hh> 26 namespace corbaServer {
27 typedef Eigen::Matrix<CORBA::Long, Eigen::Dynamic, Eigen::Dynamic>
IntMatrix_t;
45 if (!input)
return NULL;
68 inline char*
c_str (
const std::string& in)
70 char* out =
new char[in.length()+1];
71 strcpy (out, in.c_str());
78 char** nameList = Names_t::allocbuf((CORBA::ULong) len);
79 Names_t *ret =
new Names_t ((CORBA::ULong) len, (CORBA::ULong) len, nameList);
82 while (begin != end) {
83 nameList[i] =
c_str (*begin);
92 return toNames_t(iterable.begin(), iterable.end());
95 template <
typename InputIt>
inline intSeq*
toIntSeq (InputIt begin, InputIt end)
99 indexes->length ((CORBA::ULong) len);
102 while (begin != end) {
103 (*indexes)[i] = *begin;
114 indexes->length ((CORBA::ULong) len);
117 while (begin != end) {
118 (*indexes)[(CORBA::ULong)i] = *begin;
128 for (CORBA::ULong i = 0; i < names.length(); ++i)
129 ret.push_back (std::string(names[i]));
135 #endif // HPP_CORBASERVER_CONVERSIONS_HH pinocchio::DevicePtr_t DevicePtr_t
Definition: fwd.hh:51
boolSeq * toBoolSeq(InputIt begin, InputIt end)
Definition: conversions.hh:110
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)
Implement CORBA interface ``Obstacle''.
std::vector< bool > boolSeqToVector(const hpp::boolSeq &mask, unsigned int length=3)
unsigned long long size_t
Definition: paths.idl:18
sequence< floatSeq > floatSeqSeq
Definition: common.idl:33
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
sequence< long > intSeq
Definition: common.idl:29
pinocchio::vector_t vector_t
Definition: fwd.hh:83
Eigen::Matrix< CORBA::Long, Eigen::Dynamic, Eigen::Dynamic > IntMatrix_t
Definition: conversions.hh:27
core::ConfigurationPtr_t ConfigurationPtr_t
Definition: fwd.hh:44
pinocchio::vectorIn_t vectorIn_t
constraints::matrixIn_t matrixIn_t
sequence< boolean > boolSeq
Definition: common.idl:28
pinocchio::Configuration_t Configuration_t
Definition: fwd.hh:43
pinocchio::matrix_t matrix_t
void toHppTransform(const Transform3f &in, Transform_ out)
Names_t * toNames_t(InputIt begin, InputIt end)
Definition: conversions.hh:75
intSeqSeq * matrixToIntSeqSeq(Eigen::Ref< const IntMatrix_t > input)
OutputType toStrings(const Names_t &names)
Definition: conversions.hh:125
sequence< Transform_ > TransformSeq
Definition: common.idl:37
intSeq * toIntSeq(InputIt begin, InputIt end)
Definition: conversions.hh:95
double Transform_[7]
Element of SE(3) represented by a vector and a unit quaternion.
Definition: common.idl:36
pinocchio::ConfigurationPtr_t ConfigurationPtr_t
pinocchio::vector3_t vector3_t
Definition: fwd.hh:84
vector3_t floatSeqToVector3(const floatSeq &dofArray)
floatSeqSeq * matrixToFloatSeqSeq(core::matrixIn_t input)
Returns a sequence of the rows of the input matrix.
floatSeq * vectorToFloatSeq(core::vectorIn_t input)
Configuration_t floatSeqToConfig(const DevicePtr_t &robot, const floatSeq &dofArray, bool throwIfNotNormalized)
sequence< double > floatSeq
Robot configuration is defined by a sequence of dof value.
Definition: common.idl:32
void toTransform3f(const Transform_ in, Transform3f &out)
pinocchio::Transform3f Transform3f
Definition: fwd.hh:74
sequence< intSeq > intSeqSeq
Definition: common.idl:30
pinocchio::size_type size_type
Definition: fwd.hh:86
FCL_REAL distance(const KDOP< N > &other, Vec3f *P=NULL, Vec3f *Q=NULL) const