ReachOutToHumanPose.h
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * ArmarX is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  *
8  * ArmarX is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * @package RobotSkillTemplates::HandOverGroup
17  * @author Mirko Waechter ( mirko dot waechter at kit dot edu )
18  * @date 2018
19  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20  * GNU General Public License
21  */
22 
23 #ifndef _ARMARX_XMLUSERCODE_RobotSkillTemplates_HandOverGroup_ReachOutToHumanPose_H
24 #define _ARMARX_XMLUSERCODE_RobotSkillTemplates_HandOverGroup_ReachOutToHumanPose_H
25 
26 #include <RobotSkillTemplates/statecharts/HandOverGroup/ReachOutToHumanPose.generated.h>
27 #include <Eigen/Core>
28 namespace armarx::HandOverGroup
29 {
31  public ReachOutToHumanPoseGeneratedBase < ReachOutToHumanPose >
32  {
33  public:
35  XMLStateTemplate < ReachOutToHumanPose > (stateData), ReachOutToHumanPoseGeneratedBase < ReachOutToHumanPose > (stateData)
36  {
37  }
38 
39  // inherited from StateBase
40  void onEnter() override;
41  void run() override;
42  // void onBreak() override;
43  void onExit() override;
44 
45  Eigen::VectorXf calculateCentroid(const armarx::Keypoint3DMap& keypointMap);
46  armarx::Keypoint3DMap getClosestPerson(const std::vector<armarx::Keypoint3DMap>& trackingData);
47  bool isKeypointValid(const armarx::Keypoint3D& point) const;
48 
49  // static functions for AbstractFactory Method
51  static SubClassRegistry Registry;
52 
53  // DO NOT INSERT ANY CLASS MEMBERS,
54  // use stateparameters instead,
55  // if classmember are neccessary nonetheless, reset them in onEnter
56  Eigen::VectorXf calculateMedian(const armarx::Keypoint3DMap& keypointMap);
57  Eigen::Vector3f getHeadIKTarget(const armarx::Keypoint3DMap& keypointMap);
58  };
59 }
60 
61 #endif
armarx::HandOverGroup::ReachOutToHumanPose::isKeypointValid
bool isKeypointValid(const armarx::Keypoint3D &point) const
Definition: ReachOutToHumanPose.cpp:620
armarx::HandOverGroup::ReachOutToHumanPose::ReachOutToHumanPose
ReachOutToHumanPose(const XMLStateConstructorParams &stateData)
Definition: ReachOutToHumanPose.h:34
armarx::XMLStateConstructorParams
Definition: XMLState.h:50
armarx::HandOverGroup::ReachOutToHumanPose::calculateMedian
Eigen::VectorXf calculateMedian(const armarx::Keypoint3DMap &keypointMap)
Definition: ReachOutToHumanPose.cpp:559
armarx::HandOverGroup
Definition: HandOverGroupRemoteStateOfferer.h:30
IceInternal::Handle
Definition: forward_declarations.h:8
armarx::XMLStateTemplate
Class for legacy to stay compatible with old statecharts.
Definition: XMLState.h:137
armarx::HandOverGroup::ReachOutToHumanPose::CreateInstance
static XMLStateFactoryBasePtr CreateInstance(XMLStateConstructorParams stateData)
Definition: ReachOutToHumanPose.cpp:634
armarx::HandOverGroup::ReachOutToHumanPose::getClosestPerson
armarx::Keypoint3DMap getClosestPerson(const std::vector< armarx::Keypoint3DMap > &trackingData)
Definition: ReachOutToHumanPose.cpp:600
armarx::HandOverGroup::ReachOutToHumanPose::onExit
void onExit() override
Definition: ReachOutToHumanPose.cpp:501
armarx::HandOverGroup::ReachOutToHumanPose::onEnter
void onEnter() override
Definition: ReachOutToHumanPose.cpp:57
armarx::HandOverGroup::ReachOutToHumanPose::getHeadIKTarget
Eigen::Vector3f getHeadIKTarget(const armarx::Keypoint3DMap &keypointMap)
Definition: ReachOutToHumanPose.cpp:519
armarx::HandOverGroup::ReachOutToHumanPose::calculateCentroid
Eigen::VectorXf calculateCentroid(const armarx::Keypoint3DMap &keypointMap)
Definition: ReachOutToHumanPose.cpp:586
armarx::HandOverGroup::ReachOutToHumanPose::Registry
static SubClassRegistry Registry
Definition: ReachOutToHumanPose.h:51
armarx::HandOverGroup::ReachOutToHumanPose::run
void run() override
Definition: ReachOutToHumanPose.cpp:65
armarx::HandOverGroup::ReachOutToHumanPose
Definition: ReachOutToHumanPose.h:30