GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: include/sot/core/op-point-modifier.hh Lines: 0 2 0.0 %
Date: 2023-03-13 12:09:37 Branches: 0 0 - %

Line Branch Exec Source
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>
17
#include <sot/core/matrix-geometry.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
43
///
44
/// \brief Compute position and jacobian of a local frame attached to a joint.
45
///
46
/// The position of the local frame in the frame of the joint is represented by
47
/// transformation.
48
///
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);
67
  MatrixHomogeneous &positionSOUT_function(MatrixHomogeneous &res,
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__