Main MRPT website > C++ reference for MRPT 1.4.0
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
14#include <mrpt/poses/CPose3D.h>
15#include <mrpt/poses/CPose2D.h>
16
17namespace mrpt
18{
19namespace obs
20{
21
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.
77
78 } // End of namespace
79} // End of namespace
80
81#endif
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
#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...
Declares a class that represents any robot's observation.
This class stores a skeleton as tracked by OPENNI2 & NITE2 libraries from PrimeSense sensors.
TSkeletonJoint head
The skeleton joints (15)
void getDescriptionAsText(std::ostream &o) const MRPT_OVERRIDE
Build a detailed, multi-line textual description of the observation contents and dump it to the outpu...
void setSensorPose(const mrpt::poses::CPose3D &newSensorPose) MRPT_OVERRIDE
A general method to change the sensor pose on the robot.
void getSensorPose(mrpt::poses::CPose3D &out_sensorPose) const MRPT_OVERRIDE
A general method to retrieve the sensor pose on the robot.
virtual ~CObservationSkeleton()
Destructor.
mrpt::poses::CPose3D sensorPose
The pose of the sensor on the robot.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:73
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
Definition: mrpt_macros.h:28
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
A generic joint for the skeleton observation.



Page generated by Doxygen 1.9.4 for MRPT 1.4.0 SVN: at Sun Aug 14 11:34:44 UTC 2022