Cheetah Software  1.0
sim_utilities.h File Reference

Utility functions that exist only in the simulator. More...

#include "Dynamics/spatial.h"
#include "Math/orientation_tools.h"
#include "cppTypes.h"
#include <QMatrix4x4>
+ Include dependency graph for sim_utilities.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<typename T >
QMatrix4x4 spatialTransformToQT (const Eigen::MatrixBase< T > &X)
 

Detailed Description

Utility functions that exist only in the simulator.

Definition in file sim_utilities.h.

Function Documentation

template<typename T >
QMatrix4x4 spatialTransformToQT ( const Eigen::MatrixBase< T > &  X)

Convert a spatial transform to a Qt transformation. Note that this typically also has the effect of inverting the transformation: spatial transforms are coordinate transforms and Qt doesn't follow this convention

Definition at line 23 of file sim_utilities.h.

References spatial::invertSXform(), and spatial::sxformToHomogeneous().

23  {
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 }
typename Eigen::Matrix< T, 4, 4 > Mat4
Definition: cppTypes.h:94
auto sxformToHomogeneous(const Eigen::MatrixBase< T > &X)
Definition: spatial.h:108
auto invertSXform(const Eigen::MatrixBase< T > &X)
Definition: spatial.h:181

+ Here is the call graph for this function:

+ Here is the caller graph for this function: