Main MRPT website
>
C++ reference for MRPT 1.9.9
test.cpp
Go to the documentation of this file.
1
/* +------------------------------------------------------------------------+
2
| Mobile Robot Programming Toolkit (MRPT) |
3
| http://www.mrpt.org/ |
4
| |
5
| Copyright (c) 2005-2018, Individual contributors, see AUTHORS file |
6
| See: http://www.mrpt.org/Authors - All rights reserved. |
7
| Released under BSD License. See details in http://www.mrpt.org/License |
8
+------------------------------------------------------------------------+ */
9
10
#include <
mrpt/poses/CPose3D.h
>
11
#include <iostream>
12
13
using namespace
mrpt
;
14
using namespace
mrpt::poses
;
15
using namespace
std;
16
17
// ------------------------------------------------------
18
// TestSE3
19
// ------------------------------------------------------
20
void
TestSE3
()
21
{
22
const
CPose3D
p0;
23
const
CPose3D
p1(1, 2, 3,
DEG2RAD
(0),
DEG2RAD
(0),
DEG2RAD
(0));
24
const
CPose3D
p2(1, 2, 3,
DEG2RAD
(20),
DEG2RAD
(0),
DEG2RAD
(0));
25
26
cout <<
"p0: "
<< p0 <<
" => ln SE(3)->se(3) => "
<< p0.
ln
() << endl;
27
cout <<
"p1: "
<< p1 <<
" => ln SE(3)->se(3) => "
<< p1.ln() << endl;
28
cout <<
"p2: "
<< p2 <<
" => ln SE(3)->se(3) => "
<< p2.ln() << endl;
29
30
#if 0
31
const
CPose3D
p3(1,2,3,
DEG2RAD
(20),
DEG2RAD
(-30),
DEG2RAD
(15));
32
const
CPose3D
p4(4,2.5,1.5,
DEG2RAD
(-25),
DEG2RAD
(5),
DEG2RAD
(10));
33
cout <<
"p3+p4: "
<< (p3+p4) <<
" => ln SE(3)->se(3) => "
34
<< endl << (p3.ln()+p4.ln())
35
<< endl << (p3+p4).ln() << endl
36
<< endl <<
CPose3D::exp
( (p3.ln()+p4.ln()) ) << endl;
37
#endif
38
}
39
40
// ------------------------------------------------------
41
// MAIN
42
// ------------------------------------------------------
43
int
main
()
44
{
45
try
46
{
47
TestSE3
();
48
return
0;
49
}
50
catch
(exception& e)
51
{
52
cout <<
"MRPT exception caught: "
<< e.what() << endl;
53
return
-1;
54
}
55
catch
(...)
56
{
57
printf(
"Untyped exception!!"
);
58
return
-1;
59
}
60
}
mrpt
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Definition:
CKalmanFilterCapable.h:30
mrpt::poses
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
Definition:
CHierarchicalMapMHPartition.h:25
mrpt::poses::CPose3D::ln
void ln(mrpt::math::CArrayDouble< 6 > &out_ln) const
Take the logarithm of the 3x4 matrix defined by this pose, generating the corresponding vector in the...
Definition:
CPose3D.cpp:801
main
int main()
Definition:
vision_stereo_rectify/test.cpp:78
mrpt::poses::CPose3D
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition:
CPose3D.h:88
mrpt::poses::CPose3D::exp
static CPose3D exp(const mrpt::math::CArrayNumeric< double, 6 > &vect, bool pseudo_exponential=false)
Exponentiate a Vector in the SE(3) Lie Algebra to generate a new CPose3D (static method).
Definition:
CPose3D.cpp:758
TestSE3
void TestSE3()
Definition:
vision_stereo_rectify/test.cpp:20
CPose3D.h
mrpt::DEG2RAD
double DEG2RAD(const double x)
Degrees to radians.
Definition:
core/include/mrpt/core/bits_math.h:42
Page generated by
Doxygen 1.8.17
for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST