YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
FrameTransform.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
6#ifndef YARP_MATH_TRANSFORM_H
7#define YARP_MATH_TRANSFORM_H
8
9#include <yarp/sig/Vector.h>
10#include <yarp/sig/Matrix.h>
11
12#include <yarp/math/api.h>
14
15namespace yarp::math {
16
18{
19/*
20public:
21 YARP_SUPPRESS_DLL_INTERFACE_WARNING_ARG(std::string) src_frame_id;
22 YARP_SUPPRESS_DLL_INTERFACE_WARNING_ARG(std::string) dst_frame_id;
23 double timestamp = 0;
24 bool isStatic = false;
25 yarp::math::Translation translation;
26 yarp::math::Quaternion rotation;
27*/
28
29public:
30 bool isValid() const;
31
33
34 FrameTransform(const std::string& parent,
35 const std::string& child,
36 double inTX,
37 double inTY,
38 double inTZ,
39 double inRX,
40 double inRY,
41 double inRZ,
42 double inRW);
43
45
46 void transFromVec(double X, double Y, double Z);
47 void rotFromRPY(double R, double P, double Y);
48 yarp::sig::Vector getRPYRot() const;
49
50 yarp::sig::Matrix toMatrix() const;
51 bool fromMatrix(const yarp::sig::Matrix& mat);
52
54 {
55 rotation_as_quaternion=0,
56 rotation_as_matrix=1,
57 rotation_as_rpy=2
58 };
59
60 std::string toString(display_transform_mode_t format= rotation_as_quaternion) const;
61};
62
63} // namespace yarp::math
64
65#endif // YARP_MATH_TRANSFORM_H
std::string toString(const T &value)
convert an arbitrary type to string.
contains the definition of a Matrix type
contains the definition of a Vector type
A class for a Matrix.
Definition Matrix.h:40
#define YARP_math_API
Definition api.h:17