Visual Servoing Platform version 3.5.0
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
166class VISP_EXPORT vpForceTwistMatrix : public vpArray2D<double>
167{
168public:
169 // basic constructor
171 // copy constructor
173 // constructor from an homogeneous transformation
174 explicit vpForceTwistMatrix(const vpHomogeneousMatrix &M, bool full = true);
175
176 // Construction from Translation and rotation (matrix parameterization)
178 // Construction from Translation and rotation (ThetaU parameterization)
180 vpForceTwistMatrix(double tx, double ty, double tz, double tux, double tuy, double tuz);
181
183 vpForceTwistMatrix(const vpThetaUVector &thetau);
184
189
190 vpForceTwistMatrix buildFrom(const vpTranslationVector &t, const vpRotationMatrix &R);
191 vpForceTwistMatrix buildFrom(const vpTranslationVector &t, const vpThetaUVector &thetau);
192 vpForceTwistMatrix buildFrom(const vpHomogeneousMatrix &M, bool full = true);
193
194 vpForceTwistMatrix buildFrom(const vpRotationMatrix &R);
195 vpForceTwistMatrix buildFrom(const vpThetaUVector &thetau);
196
197 // Basic initialisation (identity)
198 void eye();
199
201 vpMatrix operator*(const vpMatrix &M) const;
202
203 vpColVector operator*(const vpColVector &H) const;
204
205 // copy operator from vpMatrix (handle with care)
207
208 int print(std::ostream &s, unsigned int length, char const *intro = 0) const;
209
215 void resize(unsigned int nrows, unsigned int ncols, bool flagNullify = true)
216 {
217 (void)nrows;
218 (void)ncols;
219 (void)flagNullify;
220 throw(vpException(vpException::fatalError, "Cannot resize a velocity twist matrix"));
221 };
222
223#if defined(VISP_BUILD_DEPRECATED_FUNCTIONS)
232 vp_deprecated void init(){};
236 vp_deprecated void setIdentity();
238#endif
239};
240
241#endif
Implementation of a generic 2D array used as base class for matrices and vectors.
Definition: vpArray2D.h:132
vpArray2D< Type > & operator=(Type x)
Set all the elements of the array to x.
Definition: vpArray2D.h:413
Implementation of column vector and the associated operations.
Definition: vpColVector.h:131
error that can be emited by ViSP classes.
Definition: vpException.h:72
@ fatalError
Fatal error.
Definition: vpException.h:96
void resize(unsigned int nrows, unsigned int ncols, bool flagNullify=true)
vp_deprecated void init()
Implementation of an homogeneous matrix and operations on such kind of matrices.
Implementation of a matrix and operations on matrices.
Definition: vpMatrix.h:154
Implementation of a rotation matrix and operations on such kind of matrices.
Implementation of a rotation vector as axis-angle minimal representation.
Class that consider the case of a translation vector.
vpColVector operator*(const double &x, const vpColVector &v)