Visual Servoing Platform  version 3.0.1
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
vpForceTwistMatrix.h
1 /****************************************************************************
2  *
3  * This file is part of the ViSP software.
4  * Copyright (C) 2005 - 2017 by Inria. All rights reserved.
5  *
6  * This software is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * ("GPL") version 2 as published by the Free Software Foundation.
9  * See the file LICENSE.txt at the root directory of this source
10  * distribution for additional information about the GNU GPL.
11  *
12  * For using ViSP with software that can not be combined with the GNU
13  * GPL, please contact Inria about acquiring a ViSP Professional
14  * Edition License.
15  *
16  * See http://visp.inria.fr for more information.
17  *
18  * This software was developed at:
19  * Inria Rennes - Bretagne Atlantique
20  * Campus Universitaire de Beaulieu
21  * 35042 Rennes Cedex
22  * France
23  *
24  * If you have questions regarding the use of this file, please contact
25  * Inria at visp@inria.fr
26  *
27  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
28  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
29  *
30  * Description:
31  * Twist transformation matrix that allows to transform forces from one
32  * frame to an other.
33  *
34  * Authors:
35  * Fabien Spindler
36  *
37  *****************************************************************************/
38 
39 #ifndef vpForceTwistMatrix_h
40 #define vpForceTwistMatrix_h
41 
42 #include <visp3/core/vpArray2D.h>
43 #include <visp3/core/vpColVector.h>
44 #include <visp3/core/vpHomogeneousMatrix.h>
45 #include <visp3/core/vpRotationMatrix.h>
46 
47 
102 class VISP_EXPORT vpForceTwistMatrix : public vpArray2D<double>
103 {
104  public:
105  // basic constructor
107  // copy constructor
109  // constructor from an homogeneous transformation
111 
112  // Construction from Translation and rotation (ThetaU parameterization)
113  vpForceTwistMatrix(const vpTranslationVector &t, const vpThetaUVector &thetau) ;
114  // Construction from Translation and rotation (matrix parameterization)
116  vpForceTwistMatrix(const double tx, const double ty, const double tz,
117  const double tux, const double tuy, const double tuz) ;
121  virtual ~vpForceTwistMatrix() {};
122 
123  vpForceTwistMatrix buildFrom(const vpTranslationVector &t,
124  const vpRotationMatrix &R);
125  vpForceTwistMatrix buildFrom(const vpTranslationVector &t,
126  const vpThetaUVector &thetau);
127  vpForceTwistMatrix buildFrom(const vpHomogeneousMatrix &M) ;
128 
129  // Basic initialisation (identity)
130  void eye() ;
131 
133  vpMatrix operator*(const vpMatrix &M) const ;
134 
135  vpColVector operator*(const vpColVector &H) const ;
136 
137  // copy operator from vpMatrix (handle with care)
139 
140  int print(std::ostream& s, unsigned int length, char const* intro=0) const;
141 
147  void resize(const unsigned int nrows, const unsigned int ncols,
148  const bool flagNullify = true)
149  {
150  (void)nrows;
151  (void)ncols;
152  (void)flagNullify;
153  throw(vpException(vpException::fatalError, "Cannot resize a velocity twist matrix"));
154  };
155 
156 #if defined(VISP_BUILD_DEPRECATED_FUNCTIONS)
157 
165  vp_deprecated void init() {};
169  vp_deprecated void setIdentity();
171 #endif
172 } ;
173 
174 #endif
Implementation of a matrix and operations on matrices.
Definition: vpMatrix.h:97
vpArray2D< Type > & operator=(Type x)
Set all the elements of the array to x.
Definition: vpArray2D.h:239
Implementation of an homogeneous matrix and operations on such kind of matrices.
error that can be emited by ViSP classes.
Definition: vpException.h:73
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 a force/torque twist matrix and operations on such kind of matrices.
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.