Cheetah Software  1.0
sim_utilities.h
Go to the documentation of this file.
1 
5 #ifndef PROJECT_SIM_UTILITIES_H
6 #define PROJECT_SIM_UTILITIES_H
7 
8 #include "Dynamics/spatial.h"
10 #include "cppTypes.h"
11 
12 #include <QMatrix4x4>
13 
14 using namespace spatial;
15 
22 template <typename T>
23 QMatrix4x4 spatialTransformToQT(const Eigen::MatrixBase<T> &X) {
24  static_assert(T::ColsAtCompileTime == 6 && T::RowsAtCompileTime == 6,
25  "Must have 6x6 matrix");
27  QMatrix4x4 M(H(0, 0), H(0, 1), H(0, 2), H(0, 3), H(1, 0), H(1, 1), H(1, 2),
28  H(1, 3), H(2, 0), H(2, 1), H(2, 2), H(2, 3), H(3, 0), H(3, 1),
29  H(3, 2), H(3, 3));
30  return M;
31 }
32 
33 #endif // PROJECT_SIM_UTILITIES_H
typename Eigen::Matrix< T, 4, 4 > Mat4
Definition: cppTypes.h:94
auto sxformToHomogeneous(const Eigen::MatrixBase< T > &X)
Definition: spatial.h:108
Utility functions for 3D rotations.
Utility functions for manipulating spatial quantities.
auto invertSXform(const Eigen::MatrixBase< T > &X)
Definition: spatial.h:181
QMatrix4x4 spatialTransformToQT(const Eigen::MatrixBase< T > &X)
Definition: sim_utilities.h:23