optimizer_goal_global_orientation.h
Go to the documentation of this file.
1 
19 #ifndef __INC_OPTIMIZER_GOAL_GLOBAL_ORIENTATION
20 #define __INC_OPTIMIZER_GOAL_GLOBAL_ORIENTATION
21 
22 #include <vector>
23 #include <optimizer_goal_global.h>
24 
25 namespace robotLibPbD {
26 
28 {
29 protected:
30  double angle;
33 public:
34  virtual void add()
35  {
36  item.resize(3);
37  pose = first->getRelativeToBase();
38  CMathLib::getRotationFromMatrix(pose, axis, angle);
39  axis *= 57.295779513082325 * angle;
40  LOG_MSG(6, "Orientation: %s \n", axis.toString().c_str());
41 
42  item[0] = axis.x;
43  item[1] = axis.y;
44  item[2] = axis.z;
45  data.push_back(item);
46  };
47 };
48 
49 };
50 
51 #endif
PRECISION z
Definition: vecmath.h:60
std::string toString()
Definition: vecmath.cpp:65
virtual CMatrix getRelativeToBase()
Returns pose in the base (frame with no predecessor) frame.
Definition: frame.h:508
static void getRotationFromMatrix(const CMatrix &mat, CVec &axis, double &angle)
Transforms homogenous matrix into axis-angle representation.
Definition: vecmath.cpp:463
Homogenous vector.
Definition: vecmath.h:57
Homogenous matrix.
Definition: vecmath.h:187
#define LOG_MSG(index, format,...)
Definition: log.h:32
std::vector< std::vector< double > > data
PRECISION y
Definition: vecmath.h:60
PRECISION x
Definition: vecmath.h:60


asr_kinematic_chain_optimizer
Author(s): Aumann Florian, Heller Florian, Jäkel Rainer, Wittenbeck Valerij
autogenerated on Mon Jun 10 2019 12:35:36