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