Visual Servoing Platform  version 3.2.0 under development (2019-01-22)
vpForceTwistMatrix.h
1 /****************************************************************************
2  *
3  * ViSP, open source Visual Servoing Platform software.
4  * Copyright (C) 2005 - 2019 by Inria. All rights reserved.
5  *
6  * This software is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  * See the file LICENSE.txt at the root directory of this source
11  * distribution for additional information about the GNU GPL.
12  *
13  * For using ViSP with software that can not be combined with the GNU
14  * GPL, please contact Inria about acquiring a ViSP Professional
15  * Edition License.
16  *
17  * See http://visp.inria.fr for more information.
18  *
19  * This software was developed at:
20  * Inria Rennes - Bretagne Atlantique
21  * Campus Universitaire de Beaulieu
22  * 35042 Rennes Cedex
23  * France
24  *
25  * If you have questions regarding the use of this file, please contact
26  * Inria at visp@inria.fr
27  *
28  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
29  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
30  *
31  * Description:
32  * Twist transformation matrix that allows to transform forces from one
33  * frame to an other.
34  *
35  * Authors:
36  * Fabien Spindler
37  *
38  *****************************************************************************/
39 
40 #ifndef vpForceTwistMatrix_h
41 #define vpForceTwistMatrix_h
42 
43 #include <visp3/core/vpArray2D.h>
44 #include <visp3/core/vpColVector.h>
45 #include <visp3/core/vpHomogeneousMatrix.h>
46 #include <visp3/core/vpRotationMatrix.h>
47 
115 class VISP_EXPORT vpForceTwistMatrix : public vpArray2D<double>
116 {
117 public:
118  // basic constructor
120  // copy constructor
122  // constructor from an homogeneous transformation
123  explicit vpForceTwistMatrix(const vpHomogeneousMatrix &M, bool full = true);
124 
125  // Construction from Translation and rotation (matrix parameterization)
127  // Construction from Translation and rotation (ThetaU parameterization)
128  vpForceTwistMatrix(const vpTranslationVector &t, const vpThetaUVector &thetau);
129  vpForceTwistMatrix(const double tx, const double ty, const double tz, const double tux, const double tuy,
130  const double tuz);
131 
133  vpForceTwistMatrix(const vpThetaUVector &thetau);
134 
138  virtual ~vpForceTwistMatrix(){};
139 
140  vpForceTwistMatrix buildFrom(const vpTranslationVector &t, const vpRotationMatrix &R);
141  vpForceTwistMatrix buildFrom(const vpTranslationVector &t, const vpThetaUVector &thetau);
142  vpForceTwistMatrix buildFrom(const vpHomogeneousMatrix &M, bool full = true);
143 
144  vpForceTwistMatrix buildFrom(const vpRotationMatrix &R);
145  vpForceTwistMatrix buildFrom(const vpThetaUVector &thetau);
146 
147  // Basic initialisation (identity)
148  void eye();
149 
151  vpMatrix operator*(const vpMatrix &M) const;
152 
153  vpColVector operator*(const vpColVector &H) const;
154 
155  // copy operator from vpMatrix (handle with care)
157 
158  int print(std::ostream &s, unsigned int length, char const *intro = 0) const;
159 
165  void resize(const unsigned int nrows, const unsigned int ncols, const bool flagNullify = true)
166  {
167  (void)nrows;
168  (void)ncols;
169  (void)flagNullify;
170  throw(vpException(vpException::fatalError, "Cannot resize a velocity twist matrix"));
171  };
172 
173 #if defined(VISP_BUILD_DEPRECATED_FUNCTIONS)
174 
182  vp_deprecated void init(){};
186  vp_deprecated void setIdentity();
188 #endif
189 };
190 
191 #endif
Implementation of a matrix and operations on matrices.
Definition: vpMatrix.h:104
vpArray2D< Type > & operator=(Type x)
Set all the elements of the array to x.
Definition: vpArray2D.h:247
Implementation of an homogeneous matrix and operations on such kind of matrices.
error that can be emited by ViSP classes.
Definition: vpException.h:71
Implementation of a generic 2D array used as vase class of matrices and vectors.
Definition: vpArray2D.h:70
void resize(const unsigned int nrows, const unsigned int ncols, const bool flagNullify=true)
Implementation of a rotation matrix and operations on such kind of matrices.
vpColVector operator*(const double &x, const vpColVector &v)
vp_deprecated void init()
Implementation of column vector and the associated operations.
Definition: vpColVector.h:72
Class that consider the case of a translation vector.
Implementation of a rotation vector as axis-angle minimal representation.