MRPT  2.0.4
CObservationSkeleton.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | https://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2020, Individual contributors, see AUTHORS file |
6  | See: https://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See: https://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #pragma once
10 
11 #include <mrpt/obs/CObservation.h>
12 #include <mrpt/poses/CPose2D.h>
13 #include <mrpt/poses/CPose3D.h>
15 
16 namespace mrpt::obs
17 {
18 /** This class stores a skeleton as tracked by OPENNI2 & NITE2 libraries from
19  * PrimeSense sensors
20  *
21  * \sa CObservation
22  * \note Class introduced in MRPT 1.3.1
23  * \ingroup mrpt_obs_grp
24  */
26 {
28 
29  public:
30  /** Constructor.
31  */
33  : sensorPose(),
34  head(),
35  neck(),
36  torso(),
37  left_shoulder(),
38  left_elbow(),
39  left_hand(),
40  left_hip(),
41  left_knee(),
42  left_foot(),
44  right_elbow(),
45  right_hand(),
46  right_hip(),
47  right_knee(),
48  right_foot()
49  {
50  }
51 
52  /** Destructor
53  */
54  ~CObservationSkeleton() override = default;
55  /** The pose of the sensor on the robot. */
57 
58  /** A generic joint for the skeleton observation */
60  {
61  /** Default constructor */
62  TSkeletonJoint() = default;
63  /** 3D position */
64  double x{.0}, y{.0}, z{.0};
65  /** Confidence value [0...1] */
66  double conf{.0};
67  };
68 
69  /** The skeleton joints (15)*/
73 
74  void getSensorPose(mrpt::poses::CPose3D& out_sensorPose) const override
75  {
76  out_sensorPose = sensorPose;
77  }
78  void setSensorPose(const mrpt::poses::CPose3D& newSensorPose) override
79  {
80  sensorPose = newSensorPose;
81  }
82  void getDescriptionAsText(std::ostream& o) const override;
83 
84 }; // End of class def.
85 
86 } // namespace mrpt::obs
~CObservationSkeleton() override=default
Destructor.
void getSensorPose(mrpt::poses::CPose3D &out_sensorPose) const override
A general method to retrieve the sensor pose on the robot.
This class stores a skeleton as tracked by OPENNI2 & NITE2 libraries from PrimeSense sensors...
mrpt::poses::CPose3D sensorPose
The pose of the sensor on the robot.
void getDescriptionAsText(std::ostream &o) const override
Build a detailed, multi-line textual description of the observation contents and dump it to the outpu...
This namespace contains representation of robot actions and observations.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:85
Declares a class that represents any robot&#39;s observation.
Definition: CObservation.h:43
TSkeletonJoint()=default
Default constructor.
TSkeletonJoint head
The skeleton joints (15)
void setSensorPose(const mrpt::poses::CPose3D &newSensorPose) override
A general method to change the sensor pose on the robot.
#define DEFINE_SERIALIZABLE(class_name, NS)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
A generic joint for the skeleton observation.



Page generated by Doxygen 1.8.14 for MRPT 2.0.4 Git: 33de1d0ad Sat Jun 20 11:02:42 2020 +0200 at sáb jun 20 17:35:17 CEST 2020