Visual Servoing Platform  version 3.0.0
vpVelocityTwistMatrix.h
1 /****************************************************************************
2  *
3  * This file is part of the ViSP software.
4  * Copyright (C) 2005 - 2015 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  * Velocity twist transformation matrix.
32  *
33  * Authors:
34  * Eric Marchand
35  * Fabien Spindler
36  *
37  *****************************************************************************/
38 
39 #ifndef vpVelocityRwistMatrix_h
40 #define vpVelocityRwistMatrix_h
41 
42 #include <visp3/core/vpArray2D.h>
43 #include <visp3/core/vpMatrix.h>
44 #include <visp3/core/vpColVector.h>
45 #include <visp3/core/vpHomogeneousMatrix.h>
46 #include <visp3/core/vpRotationMatrix.h>
47 
49 class vpColVector;
50 
105 class VISP_EXPORT vpVelocityTwistMatrix : public vpArray2D<double>
106 {
107  friend class vpMatrix;
108 
109  public:
110  // basic constructor
112  // copy constructor
114  // constructor from an homogeneous transformation
116 
117  // Construction from Translation and rotation (ThetaU parameterization)
119  // Construction from Translation and rotation (matrix parameterization)
121  vpVelocityTwistMatrix(const double tx, const double ty, const double tz,
122  const double tux, const double tuy, const double tuz);
127 
128 
130  const vpRotationMatrix &R);
132  const vpThetaUVector &thetau);
133  vpVelocityTwistMatrix buildFrom(const vpHomogeneousMatrix &M) ;
134 
135  void extract( vpRotationMatrix &R) const;
136  void extract(vpTranslationVector &t) const;
137 
138  // Basic initialisation (identity)
139  void eye() ;
140 
141  vpVelocityTwistMatrix inverse() const ;
142  void inverse(vpVelocityTwistMatrix &V) const;
143 
145  vpMatrix operator*(const vpMatrix &M) const ;
146  vpColVector operator*(const vpColVector &v) const ;
147 
149 
150  int print(std::ostream& s, unsigned int length, char const* intro=0) const;
151 
157  void resize(const unsigned int nrows, const unsigned int ncols,
158  const bool flagNullify = true)
159  {
160  (void)nrows;
161  (void)ncols;
162  (void)flagNullify;
163  throw(vpException(vpException::fatalError, "Cannot resize a velocity twist matrix"));
164  };
165 
166 #if defined(VISP_BUILD_DEPRECATED_FUNCTIONS)
167 
175  vp_deprecated void init() {};
179  vp_deprecated void setIdentity();
181 #endif
182 } ;
183 
184 #endif
Implementation of a matrix and operations on matrices.
Definition: vpMatrix.h:92
vpArray2D< Type > & operator=(Type x)
Set all the elements of the array to x.
Definition: vpArray2D.h:239
void resize(const unsigned int nrows, const unsigned int ncols, const bool flagNullify=true)
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
Implementation of a rotation matrix and operations on such kind of matrices.
vp_deprecated void setIdentity(const double &val=1.0)
Definition: vpMatrix.cpp:209
Implementation of a velocity twist matrix and operations on such kind of matrices.
int print(std::ostream &s, unsigned int length, char const *intro=0) const
Definition: vpMatrix.cpp:2649
vp_deprecated void init()
vpMatrix t() const
Definition: vpMatrix.cpp:221
Implementation of column vector and the associated operations.
Definition: vpColVector.h:72
vpMatrix operator*(const vpMatrix &B) const
Definition: vpMatrix.cpp:790
Class that consider the case of a translation vector.
void eye()
Definition: vpMatrix.cpp:194
Implementation of a rotation vector as axis-angle minimal representation.