Main MRPT website > C++ reference for MRPT 1.5.7
CObservationSkeleton.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-2014, 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 CObservationSkeleton_H
10 #define CObservationSkeleton_H
11 
13 #include <mrpt/obs/CObservation.h>
14 #include <mrpt/poses/CPose3D.h>
15 #include <mrpt/poses/CPose2D.h>
16 
17 namespace mrpt
18 {
19 namespace obs
20 {
21 
22  DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE_LINKAGE( CObservationSkeleton , CObservation, OBS_IMPEXP)
23 
24  /** This class stores a skeleton as tracked by OPENNI2 & NITE2 libraries from PrimeSense sensors
25  *
26  * \sa CObservation
27  * \note Class introduced in MRPT 1.3.1
28  * \ingroup mrpt_obs_grp
29  */
31  {
32  // This must be added to any CSerializable derived class:
34 
35  public:
36  /** Constructor.
37  */
39  sensorPose(),
40  head(), neck(), torso(),
41  left_shoulder(), left_elbow(), left_hand(), left_hip(), left_knee(), left_foot(),
42  right_shoulder(), right_elbow(), right_hand(), right_hip(), right_knee(), right_foot()
43  {}
44 
45  /** Destructor
46  */
48  { }
49 
50  /** The pose of the sensor on the robot. */
52 
53  /** A generic joint for the skeleton observation */
55  {
56  /** Default constructor */
57  TSkeletonJoint() : x(.0), y(.0), z(.0), conf(.0) {}
58 
59  /** 3D position */
60  double x,y,z;
61 
62  /** Confidence value [0...1] */
63  double conf;
64  };
65 
66  /** The skeleton joints (15)*/
67  TSkeletonJoint head, neck, torso,
68  left_shoulder, left_elbow, left_hand, left_hip, left_knee, left_foot,
69  right_shoulder, right_elbow, right_hand, right_hip, right_knee, right_foot;
70 
71  void getSensorPose( mrpt::poses::CPose3D & out_sensorPose) const MRPT_OVERRIDE { out_sensorPose = sensorPose; }
72  void setSensorPose( const mrpt::poses::CPose3D & newSensorPose ) MRPT_OVERRIDE { sensorPose = newSensorPose; }
73  void getDescriptionAsText(std::ostream &o) const MRPT_OVERRIDE;
74 
75  }; // End of class def.
76  DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE( CObservationSkeleton , CObservation, OBS_IMPEXP)
77 
78  } // End of namespace
79 } // End of namespace
80 
81 #endif
void getSensorPose(mrpt::poses::CPose3D &out_sensorPose) const MRPT_OVERRIDE
A general method to retrieve the sensor pose on the robot.
GLdouble GLdouble z
Definition: glext.h:3734
This class stores a skeleton as tracked by OPENNI2 & NITE2 libraries from PrimeSense sensors...
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
mrpt::poses::CPose3D sensorPose
The pose of the sensor on the robot.
void setSensorPose(const mrpt::poses::CPose3D &newSensorPose) MRPT_OVERRIDE
A general method to change the sensor pose on the robot.
#define DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
This declaration must be inserted in all CSerializable classes definition, before the class declarati...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:72
Declares a class that represents any robot&#39;s observation.
GLenum GLint GLint y
Definition: glext.h:3516
A generic joint for the skeleton observation.
GLenum GLint x
Definition: glext.h:3516
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
virtual ~CObservationSkeleton()
Destructor.



Page generated by Doxygen 1.8.14 for MRPT 1.5.7 Git: 5902e14cc Wed Apr 24 15:04:01 2019 +0200 at lun oct 28 01:39:17 CET 2019