Actin®  Version 5.2.0
Software for Robotics Simulation and Control
ecJacobianTool.h
Go to the documentation of this file.
1 #ifndef ecJacobianTool_H_
2 #define ecJacobianTool_H_
3 //------------------------------------------------------------------------------
4 // Copyright (c) 2002-2015 Energid Technologies. All rights reserved.
5 //
9 //
10 //------------------------------------------------------------------------------
11 #include <actinCore/actinCore_config.h> // Required to be first header.
14 
15 // forward declarations
17 class EcEndEffectorSet;
20 
24 {
25 public:
28  (
29  );
30 
32  virtual ~EcJacobianTool
33  (
34  );
35 
38  (
39  const EcJacobianTool& orig
40  );
41 
43  EcJacobianTool& operator=
44  (
45  const EcJacobianTool& orig
46  );
47 
49  virtual const EcEndEffectorSet* endEffectorSet
50  (
51  ) const;
52 
54  virtual void setEndEffectorSet
55  (
56  const EcEndEffectorSet* endEffectorSet
57  );
58 
60  virtual const EcIndividualManipulator* manipulator
61  (
62  ) const;
63 
65  virtual void setManipulator
66  (
67  const EcIndividualManipulator* manipulator
68  );
69 
71  virtual const EcManipulatorActivePositionState& activePositionState
72  (
73  ) const;
74 
77  virtual void setPositionState
78  (
79  const EcPositionState& positionState
80  );
81 
83  virtual EcBoolean isFixedBase
84  (
85  ) const;
86 
88  virtual void setIsFixedBase
89  (
90  EcBoolean isFixedBase
91  );
92 
94  virtual EcU32 numJacobianColumns
95  (
96  ) const;
97 
99  virtual EcU32 numHardJacobianRows
100  (
101  ) const;
102 
104  virtual EcU32 numSoftJacobianRows
105  (
106  ) const;
107 
109  virtual EcU32 numAllJacobianRows
110  (
111  ) const;
112 
114  virtual EcU32 numJacobianRows
115  (
116  const EcU32Vector& endEffectorIndices
117  ) const;
118 
124  virtual EcBoolean getJacobian
125  (
126  const EcU32Vector& endEffectorIndices,
127  const EcControlExpressionContainer* container,
128  EcManipulatorJacobian& jacobian
129  );
130 
136  virtual EcBoolean getHardJacobian
137  (
138  EcManipulatorJacobian& jacobian
139  ) const;
140 
146  virtual EcBoolean getSoftJacobian
147  (
148  EcManipulatorJacobian& jacobian
149  ) const;
150 
156  virtual EcBoolean getAllJacobian
157  (
158  EcManipulatorJacobian& jacobian
159  ) const;
160 
166  virtual EcBoolean getJacobian
167  (
168  const EcU32Vector& endEffectorIndices,
169  EcManipulatorJacobian& jacobian
170  ) const;
171 
174  virtual void hardSparsityAnalysis
175  (
176  const EcControlExpressionContainer* pContainer,
177  EcU32Vector& sparsityIndices,
178  EcU32Vector& zeroStartIndices,
179  EcBoolean& isSparse
180  );
181 
184  virtual void softSparsityAnalysis
185  (
186  const EcControlExpressionContainer* pContainer,
187  EcU32Vector& sparsityIndices,
188  EcU32Vector& zeroStartIndices,
189  EcBoolean& isSparse
190  );
191 
194  virtual void allSparsityAnalysis
195  (
196  const EcControlExpressionContainer* pContainer,
197  EcU32Vector& sparsityIndices,
198  EcU32Vector& zeroStartIndices,
199  EcBoolean& isSparse
200  );
201 
204  virtual void sparsityAnalysis
205  (
206  const EcU32Vector& endEffectorIndices,
207  const EcControlExpressionContainer* pContainer,
208  EcU32Vector& sparsityIndices,
209  EcU32Vector& zeroStartIndices,
210  EcBoolean& isSparse
211  );
212 
214  virtual const EcBooleanVectorVector& sparsityMatrix
215  (
216  ) const;
217 
220  virtual const EcU32Vector& rowEndEffectorIndices
221  (
222  ) const;
223 
228  static EcBoolean computeJointGroups
229  (
230  const EcBooleanVectorVector& sparsityMatrix,
231  const EcU32Vector& endEffectorIndices,
232  EcJointGroupVector& jointGroups
233  );
234 
240  static EcBoolean computeSubJacobianIndexMaps
241  (
242  const EcBooleanVectorVector& sparsityMatrix,
243  const EcJointGroupVector& jointGroups,
244  EcSubJacobianMapVector& subJacobianIndexMaps
245  );
246 
252  static EcBoolean decoupleJacobian
253  (
254  const EcReArray& jacobian,
255  const EcSubJacobianMapVector& subJacobianIndexMaps,
256  EcReArrayVector& subJacobians
257  );
258 
260  static EcJacobianTool nullObject
261  (
262  );
263 
264 protected:
266  virtual void sparsityAnalysis
267  (
268  const EcU32Vector& endEffectorIndices,
269  EcU32Vector& sparsityIndices,
270  EcU32Vector& zeroStartIndices,
271  EcBoolean& isSparse
272  );
273 
275  static EcBoolean sparsityAnalysis
276  (
277  const EcU32 nJoint,
278  const EcU32 nDoc,
279  EcBooleanVectorVector& sparsityArray,
280  EcU32Vector& sparsityIndices,
281  EcU32Vector& zeroStartIndices
282  );
283 
286 
289 
292 
295 
298 
301 
304 
307 
310 };
311 
312 #endif // ecJacobianTool_H_
const EcIndividualManipulator * m_pManipulator
a pointer to the manipulator
Holds a class to describe real arrays. Includes operations such as addition, subtraction, and multiplication.
Definition: ecReArray.h:15
std::vector< EcBooleanVector > EcBooleanVectorVector
a general 2D boolean vector
Definition: ecTypes.h:204
boost::uint32_t EcU32
32-bit unsigned integer
Definition: ecTypes.h:53
const EcControlExpressionContainer * m_pControlDescriptions
a pointer to the control expression
std::vector< EcReArray > EcReArrayVector
Vector of EcReArray using std::vector.
Definition: ecReArray.h:802
Holds the active position state of a manipulator.
Provides a tool for calculating manipulator Jacobians.
This class is a container for domain-specific active states.
const EcEndEffectorSet * m_pEndEffectorSet
the end-effector description
EcBooleanVectorVector m_SparsityArray
sparsity matrix that is processed so 0 stays on the top right corner (in class just for memory alloca...
Holds a description of the velocities of all end effectors on a manipulator.
EcBoolean m_IsFixedBase
flag indicating if the base is fixed or floating
Configuration header for the foundation hierarchy.
Holds a description of the position state of a manipulator.
bool EcBoolean
Boolean (0 or 1)
Definition: ecTypes.h:21
Holds a control-system-based mathematical expression. This class inherits from EcExpressionContainer...
An individual manipulator is described through this class. It includes a string label, a physical extent of the base, a list of top-most links, and a dynamic reference frame.
Holds a description of all end effectors on a manipulator.
EcManipulatorActiveState m_ActiveState
position state (needed if above pointer initialized to zero)
EcManipulatorActiveState * m_pActState
a pointer to the position state
EcBooleanVectorVector m_OriginalSparsityArray
original sparsity matrix (before being processed). Used to compute joint groups and sub-Jacobians ...
#define EC_ACTINCORE_CONTROL_DECL
control directory
std::vector< EcU32 > EcU32Vector
a general 32-bit unsigned integer vector
Definition: ecTypes.h:171
EcU32Vector m_RowEndEffectorIndices
the end-effector index for each row.
Created by Energid Technologies www.energid.com
Copyright © 2016 Energid. All trademarks mentioned in this document are property of their respective owners.