14using namespace yarp::sig;
79 Vector res(m.rows()*m.cols(),0.0);
81 for (
int r = 0; r < m.rows(); r++)
83 res.setSubvector(r*m.cols(),m.getRow(r));
91 yarp::sig::Vector v(size,0.0);
93 for (
int i = 0; i < size; i++)
95 v[i] = b.get(in).asFloat64();
103 for (
unsigned int i = 0; i < v.size(); i++)
111 yarp::sig::Matrix m(r,c);
114 for (
int i = 0; i<r; i++)
116 for (
int j = 0; j<c; j++)
118 m(i,j) = b.get(in).asFloat64();
130 for (
unsigned int i = 0; i < v.size(); i++)
SkinPart getSkinPartFromString(const std::string skinPartString)
Get the SkinPart enum from the string version - essentially the opposite of SkinPart_s[].
int getLinkNum(SkinPart s)
Get the link number associated to the specified skin part.
std::vector< SkinPart > getSkinParts(BodyPart b)
Get the list of skin parts associated to the specified body part.
yarp::sig::Vector toVector(yarp::sig::Matrix m)
Converts a yarp::sig::Matrix to a yarp::sig::Vector.
yarp::sig::Vector vectorFromBottle(const yarp::os::Bottle b, int in, const int size)
Retrieves a vector from a bottle.
BodyPart getBodyPart(SkinPart s)
Get the body part associated to the specified skin part.
void matrixIntoBottle(const yarp::sig::Matrix m, yarp::os::Bottle &b)
Puts a matrix into a bottle, by cycling through its elements and adding them as double.
const Skin_2_Body SkinPart_2_BodyPart[SKIN_PART_SIZE]
const std::string SkinPart_s[]
void vectorIntoBottle(const yarp::sig::Vector v, yarp::os::Bottle &b)
Puts a Vector into a bottle, by cycling through its elements and adding them as doubles.
const Skin_2_Link SkinPart_2_LinkNum[SKIN_PART_SIZE]
yarp::sig::Matrix matrixFromBottle(const yarp::os::Bottle b, int in, const int r, const int c)
Retrieves a matrix from a bottle.