11 #ifndef HRPUTIL_EIGEN3D_H_INCLUDED 12 #define HRPUTIL_EIGEN3D_H_INCLUDED 47 double c = cos(theta);
48 double s = sin(theta);
57 double c = cos(theta);
58 double s = sin(theta);
67 double c = cos(theta);
68 double s = sin(theta);
82 m << 0.0, -
c(2),
c(1),
89 m(
row, col) = m33(0, 0); m(
row, col+1) = m33(0, 1); m(
row, col+2) = m33(0, 2);
91 m(
row, col) = m33(1, 0); m(
row, col+1) = m33(1, 1); m(
row, col+2) = m33(1, 2);
93 m(
row, col) = m33(2, 0); m(
row, col+1) = m33(2, 1); m(
row, col+2) = m33(2, 2);
97 m(
row, col) = m33(0, 0); m(
row, col+1) = m33(1, 0); m(
row, col+2) = m33(2, 0);
99 m(
row, col) = m33(0, 1); m(
row, col+1) = m33(1, 1); m(
row, col+2) = m33(2, 1);
101 m(
row, col) = m33(0, 2); m(
row, col+1) = m33(1, 2); m(
row, col+2) = m33(2, 2);
106 a[top++] = m33(0, 0);
107 a[top++] = m33(0, 1);
108 a[top++] = m33(0, 2);
109 a[top++] = m33(1, 0);
110 a[top++] = m33(1, 1);
111 a[top++] = m33(1, 2);
112 a[top++] = m33(2, 0);
113 a[top++] = m33(2, 1);
119 m33(0, 0) = a[top++];
120 m33(0, 1) = a[top++];
121 m33(0, 2) = a[top++];
122 m33(1, 0) = a[top++];
123 m33(1, 1) = a[top++];
124 m33(1, 2) = a[top++];
125 m33(2, 0) = a[top++];
126 m33(2, 1) = a[top++];
131 v[top++] = v3(0); v[top++] = v3(1); v[top] = v3(2);
135 v[top++] = v3(0); v[top++] = v3(1); v[top] = v3(2);
139 v3(0) = v[top++]; v3(1) = v[top++]; v3(2) = v[top];
143 m(row++, col) = v3(0); m(row++, col) = v3(1); m(row, col) = v3(2);
147 v3(0) = m(row++, col);
148 v3(1) = m(row++, col);
Matrix33 rotationX(double theta)
Matrix33 rotationZ(double theta)
HRP_UTIL_EXPORT bool isOrthogonalMatrix(Matrix33 &m)
HRP_UTIL_EXPORT void calcRotFromRpy(Matrix33 &out_R, double r, double p, double y)
void setVector3(const Vector3 &v3, V &v, size_t top=0)
void getMatrix33FromRowMajorArray(Matrix33 &m33, const Array &a, size_t top=0)
Vector3Ref getVector3Ref(const double *data)
Eigen::Vector3d Vector3Ref
Matrix33 rotFromRpy(const Vector3 &rpy)
void setMatrix33ToRowMajorArray(const Matrix33 &m33, Array &a, size_t top=0)
Matrix33 rodrigues(const Vector3 &axis, double q)
void setMatrix33(const Matrix33 &m33, M &m, size_t row=0, size_t col=0)
HRP_UTIL_EXPORT Vector3 rpyFromRot(const Matrix33 &m)
void setTransMatrix33(const Matrix33 &m33, M &m, size_t row=0, size_t col=0)
Matrix33 hat(const Vector3 &c)
HRP_UTIL_EXPORT void calcRodrigues(Matrix33 &out_R, const Vector3 &axis, double q)
HRP_UTIL_EXPORT Vector3 omegaFromRot(const Matrix33 &r)
void getVector3(Vector3 &v3, const V &v, size_t top=0)
Matrix33 rotationY(double theta)