Main MRPT website > C++ reference for MRPT 1.9.9
CPoses3DSequence.h
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 #ifndef CPoses3DSequence_H
10 #define CPoses3DSequence_H
11 
12 #include <mrpt/poses/CPose3D.h>
14 
15 namespace mrpt
16 {
17 namespace poses
18 {
19 /** This class stores a sequence of relative, incremental 3D poses. It is useful
20  * as the bases storing unit for more complex probability particles and for
21  * computing the absolute pose of any intermediate pose.
22  *
23  * \sa CPose3D, CMultiMetricMap
24  * \ingroup poses_grp
25  */
27 {
29  public:
30  /** Returns the poses count in the sequence:
31  */
32  size_t posesCount();
33 
34  /** Reads the stored pose at index "ind", where the first one is 0, the last
35  * "posesCount() - 1"
36  * \exception std::exception On invalid index value
37  */
38  void getPose(unsigned int ind, CPose3D& outPose);
39 
40  /** Changes the stored pose at index "ind", where the first one is 0, the
41  * last "posesCount() - 1"
42  * \exception std::exception On invalid index value
43  */
44  void changePose(unsigned int ind, CPose3D& inPose);
45 
46  /** Appends a new pose at the end of sequence. Remember that poses are
47  * relative, incremental to the last one.
48  */
49  void appendPose(CPose3D& newPose);
50 
51  /** Clears the sequence.
52  */
53  void clear();
54 
55  /** Returns the absolute pose of a robot after moving "n" poses, so for
56  * "n=0" the origin pose (0,0,0deg) is returned, for "n=1" the first pose is
57  * returned, and for "n=posesCount()", the pose
58  * of robot after moving ALL poses is returned, all of them relative to the
59  * starting pose.
60  * \exception std::exception On invalid index value
61  * \sa absolutePoseAfterAll
62  */
63  CPose3D absolutePoseOf(unsigned int n);
64 
65  /** A shortcut for "absolutePoseOf( posesCount() )".
66  * \sa absolutePoseOf, posesCount
67  */
69 
70  /** Returns the traveled distance after moving "n" poses, so for "n=0" it
71  * returns 0, for "n=1" the first traveled distance, and for
72  * "n=posesCount()", the total
73  * distance after ALL movements.
74  * \exception std::exception On invalid index value
75  * \sa computeTraveledDistanceAfterAll
76  */
77  float computeTraveledDistanceAfter(unsigned int n);
78 
79  /** Returns the traveled distance after ALL movements.
80  * A shortcut for "computeTraveledDistanceAfter( posesCount() )".
81  * \sa computeTraveledDistanceAfter
82  */
84 
85  private:
86  /** The internal sequence of poses, stored as relative, incremental poses,
87  * thus each one is situated just at the end point of last one, where the
88  * first one is referenced to (0,0,0deg)
89  */
90  std::vector<mrpt::math::TPose3D> m_poses;
91 
92 }; // End of class def.
93 } // End of namespace
94 } // End of namespace
95 
96 #endif
n
GLenum GLsizei n
Definition: glext.h:5074
mrpt::poses::CPoses3DSequence
This class stores a sequence of relative, incremental 3D poses.
Definition: CPoses3DSequence.h:26
mrpt::poses::CPoses3DSequence::computeTraveledDistanceAfter
float computeTraveledDistanceAfter(unsigned int n)
Returns the traveled distance after moving "n" poses, so for "n=0" it returns 0, for "n=1" the first ...
Definition: CPoses3DSequence.cpp:113
mrpt::poses::CPoses3DSequence::changePose
void changePose(unsigned int ind, CPose3D &inPose)
Changes the stored pose at index "ind", where the first one is 0, the last "posesCount() - 1".
Definition: CPoses3DSequence.cpp:59
mrpt::poses::CPoses3DSequence::appendPose
void appendPose(CPose3D &newPose)
Appends a new pose at the end of sequence.
Definition: CPoses3DSequence.cpp:69
mrpt
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Definition: CKalmanFilterCapable.h:30
mrpt::poses::CPoses3DSequence::m_poses
std::vector< mrpt::math::TPose3D > m_poses
The internal sequence of poses, stored as relative, incremental poses, thus each one is situated just...
Definition: CPoses3DSequence.h:90
mrpt::poses::CPoses3DSequence::absolutePoseOf
CPose3D absolutePoseOf(unsigned int n)
Returns the absolute pose of a robot after moving "n" poses, so for "n=0" the origin pose (0,...
Definition: CPoses3DSequence.cpp:86
mrpt::poses::CPoses3DSequence::clear
void clear()
Clears the sequence.
Definition: CPoses3DSequence.cpp:77
mrpt::poses::CPose3D
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:88
mrpt::serialization::CSerializable
The virtual base class which provides a unified interface for all persistent objects in MRPT.
Definition: CSerializable.h:32
mrpt::poses::CPoses3DSequence::posesCount
size_t posesCount()
Returns the poses count in the sequence:
Definition: CPoses3DSequence.cpp:21
mrpt::poses::CPoses3DSequence::getPose
void getPose(unsigned int ind, CPose3D &outPose)
Reads the stored pose at index "ind", where the first one is 0, the last "posesCount() - 1".
Definition: CPoses3DSequence.cpp:48
CPose3D.h
DEFINE_SERIALIZABLE
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
Definition: CSerializable.h:102
mrpt::poses::CPoses3DSequence::computeTraveledDistanceAfterAll
float computeTraveledDistanceAfterAll()
Returns the traveled distance after ALL movements.
Definition: CPoses3DSequence.cpp:129
mrpt::poses::CPoses3DSequence::absolutePoseAfterAll
CPose3D absolutePoseAfterAll()
A shortcut for "absolutePoseOf( posesCount() )".
Definition: CPoses3DSequence.cpp:102
CSerializable.h



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