sot-core  4.11.6
Hierarchical task solver plug-in for dynamic-graph.
op-point-modifier.hh
Go to the documentation of this file.
1 /*
2  * Copyright 2010,
3  * François Bleibel,
4  * Olivier Stasse,
5  *
6  * CNRS/AIST
7  *
8  */
9 
10 #ifndef __SOT_OP_POINT_MODIFIOR_H__
11 #define __SOT_OP_POINT_MODIFIOR_H__
12 
13 #include <dynamic-graph/all-signals.h>
14 #include <dynamic-graph/entity.h>
15 #include <sot/core/debug.hh>
17 
18 /* Matrix */
19 #include <dynamic-graph/linear-algebra.h>
20 
21 /* --------------------------------------------------------------------- */
22 /* --- API ------------------------------------------------------------- */
23 /* --------------------------------------------------------------------- */
24 
25 #if defined(WIN32)
26 #if defined(op_point_modifier_EXPORTS)
27 #define SOTOPPOINTMODIFIER_EXPORT __declspec(dllexport)
28 #else
29 #define SOTOPPOINTMODIFIER_EXPORT __declspec(dllimport)
30 #endif
31 #else
32 #define SOTOPPOINTMODIFIER_EXPORT
33 #endif
34 
35 /* --------------------------------------------------------------------- */
36 /* --- VECTOR ---------------------------------------------------------- */
37 /* --------------------------------------------------------------------- */
38 
39 namespace dynamicgraph {
40 namespace sot {
41 
48 class SOTOPPOINTMODIFIER_EXPORT OpPointModifier : public dynamicgraph::Entity {
49 public:
50  static const std::string CLASS_NAME;
51  virtual const std::string &getClassName(void) const { return CLASS_NAME; }
52 
53 public:
54  dynamicgraph::SignalPtr<dynamicgraph::Matrix, int> jacobianSIN;
55  dynamicgraph::SignalPtr<MatrixHomogeneous, int> positionSIN;
56 
57  dynamicgraph::SignalTimeDependent<dynamicgraph::Matrix, int> jacobianSOUT;
58  dynamicgraph::SignalTimeDependent<MatrixHomogeneous, int> positionSOUT;
59 
60 public:
61  OpPointModifier(const std::string &name);
62  virtual ~OpPointModifier(void) {}
63 
64  dynamicgraph::Matrix &jacobianSOUT_function(dynamicgraph::Matrix &res,
65  const int &time);
66  MatrixHomogeneous &positionSOUT_function(MatrixHomogeneous &res,
67  const int &time);
68  void setTransformation(const Eigen::Matrix4d &tr);
69  void setTransformationBySignalName(std::istringstream &cmdArgs);
70  const Eigen::Matrix4d &getTransformation(void);
71 
72 private:
73  MatrixHomogeneous transformation;
74 
75  /* This bool tunes the effect of the modifier for end-effector Jacobian (ie
76  * the output velocity is expressed in the end-effector frame) of from the
77  * world-ref Jacobian (ie
78  * the ouput velocity is computed in the world frame). */
79  bool isEndEffector;
80 };
81 
82 } /* namespace sot */
83 } /* namespace dynamicgraph */
84 
85 #endif // __SOT_OP_POINT_MODIFIOR_H__
dynamicgraph::sot::MatrixHomogeneous
Eigen::Transform< double, 3, Eigen::Affine > SOT_CORE_EXPORT MatrixHomogeneous
Definition: matrix-geometry.hh:74
dynamicgraph::sot::OpPointModifier
Compute position and jacobian of a local frame attached to a joint.
Definition: op-point-modifier.hh:48
dynamicgraph::sot::OpPointModifier::~OpPointModifier
virtual ~OpPointModifier(void)
Definition: op-point-modifier.hh:62
dynamicgraph
Definition: abstract-sot-external-interface.hh:17
dynamicgraph::sot::OpPointModifier::getClassName
virtual const std::string & getClassName(void) const
Definition: op-point-modifier.hh:51
dynamicgraph::sot::OpPointModifier::jacobianSIN
dynamicgraph::SignalPtr< dynamicgraph::Matrix, int > jacobianSIN
Definition: op-point-modifier.hh:54
dynamicgraph::sot::OpPointModifier::CLASS_NAME
static const std::string CLASS_NAME
Definition: op-point-modifier.hh:50
debug.hh
SOTOPPOINTMODIFIER_EXPORT
#define SOTOPPOINTMODIFIER_EXPORT
Definition: op-point-modifier.hh:32
dynamicgraph::sot::OpPointModifier::positionSIN
dynamicgraph::SignalPtr< MatrixHomogeneous, int > positionSIN
Definition: op-point-modifier.hh:55
matrix-geometry.hh
dynamicgraph::sot::OpPointModifier::jacobianSOUT
dynamicgraph::SignalTimeDependent< dynamicgraph::Matrix, int > jacobianSOUT
Definition: op-point-modifier.hh:57
dynamicgraph::sot::OpPointModifier::positionSOUT
dynamicgraph::SignalTimeDependent< MatrixHomogeneous, int > positionSOUT
Definition: op-point-modifier.hh:58