YARP
Yet Another Robot Platform
FrameTransform.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
3  * All rights reserved.
4  *
5  * This software may be modified and distributed under the terms of the
6  * BSD-3-Clause license. See the accompanying LICENSE file for details.
7  */
8 
9 #ifndef YARP_MATH_TRANSFORM_H
10 #define YARP_MATH_TRANSFORM_H
11 
12 #include <yarp/sig/Vector.h>
13 #include <yarp/sig/Matrix.h>
14 #include <yarp/math/api.h>
15 #include <yarp/math/Quaternion.h>
16 
17 namespace yarp {
18 namespace math {
19 
21 {
22 public:
25  double timestamp;
26 
28  {
29  double tX;
30  double tY;
31  double tZ;
32 
33  void set(double x, double y, double z)
34  {
35  tX = x;
36  tY = y;
37  tZ = z;
38  }
39  } translation;
40 
42 
44 
45  FrameTransform(const std::string& parent,
46  const std::string& child,
47  double inTX,
48  double inTY,
49  double inTZ,
50  double inRX,
51  double inRY,
52  double inRZ,
53  double inRW);
54 
56 
57  void transFromVec(double X, double Y, double Z);
58  void rotFromRPY(double R, double P, double Y);
59  yarp::sig::Vector getRPYRot() const;
60 
61  yarp::sig::Matrix toMatrix() const;
62  bool fromMatrix(const yarp::sig::Matrix& mat);
63 
64  std::string toString() const;
65 };
66 
67 } // namespace sig
68 } // namespace yarp
69 
70 #endif // YARP_MATH_TRANSFORM_H
contains the definition of a Matrix type
contains the definition of a Vector type
A class for a Matrix.
Definition: Matrix.h:46
std::string toString(const T &value)
convert an arbitrary type to string.
The main, catch-all namespace for YARP.
Definition: environment.h:18
void set(double x, double y, double z)
#define YARP_SUPPRESS_DLL_INTERFACE_WARNING_ARG(x)
Suppress MSVC C4251 warning for the declaration.
Definition: system.h:339
#define YARP_math_API
Definition: api.h:18