MoveMasterModel.h
Go to the documentation of this file.
1 // *****************************************************************
2 // Filename: MoveMasterModel.h
3 // Copyright: Kai Welke, Chair Prof. Dillmann (IAIM),
4 // Institute for Computer Science and Engineering (CSE),
5 // University of Karlsruhe. All rights reserved.
6 // Author: Kai Welke
7 // Date: 25.09.2008
8 // *****************************************************************
9 
10 #pragma once
11 
12 // *****************************************************************
13 // includes
14 // *****************************************************************
15 #include <string>
16 #include "Math/Math3d.h"
18 
19 #include <Inventor/nodes/SoTranslation.h>
20 #include <Inventor/nodes/SoTransform.h>
21 #include <Inventor/nodes/SoCylinder.h>
22 
23 #define NO_KEYPOINTS 4
24 #define NO_JOINTS 26
25 
26 // *****************************************************************
27 // Definition of CMoveMasterModel
28 // *****************************************************************
29 
30 namespace visionx
31 {
33  {
34  public:
35  // construction / destruction
38 
39  // initialize once before use
40  bool init(std::string sFilename, float fFocalLengthY);
41  // call update freuently for gui update
42  void update();
43 
44  // forward kinematics
45  void setJointAngle(int nJoint, float fAngleRad);
46  Vec3d getPositionOfKeypoint(int nKeyPoint);
47 
49 
50 
51  // hand pose (David)
52  SoTransform* hand_rot;
53  SoTranslation* hand_pos;
54  void setHandRotation(double alpha, double beta, double gamma);
55  void setHandPosition(Vec3d pos);
56 
57  // Object Cylinder (David)
58  SoTransform* m_pObjCylRot;
59  SoTranslation* m_pObjCylPos;
60  SoCylinder* m_pObjectCylinder;
61  void setObjCylConfig(Vec3d pos, double alpha, double beta, double gamma, float height, float radius);
62 
63  // test sphere (David)
64  SoTranslation* m_pTestSpherePos;
65  void setTestSpherePosition(Vec3d pos);
66 
67  private:
68  // names of keypoints and joints (see .cpp file)
69  const static std::string keypoint[NO_KEYPOINTS];
70  const static std::string jointname[NO_JOINTS];
71 
72  // members for OI interaction
73  SoPath* keypath[NO_KEYPOINTS];
74  SbVec3f iposition[NO_KEYPOINTS];
75  SoPath* jointpath[NO_JOINTS];
76 
77  };
78 }
79 
visionx::CMoveMasterModel::m_pOIFwdKinematicsInterface
OIFwdKinematicsInterface * m_pOIFwdKinematicsInterface
Definition: MoveMasterModel.h:48
visionx::CMoveMasterModel::~CMoveMasterModel
~CMoveMasterModel()
Definition: MoveMasterModel.cpp:41
OIFwdKinematicsInterface.h
visionx
ArmarX headers.
Definition: OpenPoseStressTest.h:38
visionx::CMoveMasterModel
Definition: MoveMasterModel.h:32
visionx::CMoveMasterModel::m_pObjCylPos
SoTranslation * m_pObjCylPos
Definition: MoveMasterModel.h:59
visionx::CMoveMasterModel::setObjCylConfig
void setObjCylConfig(Vec3d pos, double alpha, double beta, double gamma, float height, float radius)
Definition: MoveMasterModel.cpp:210
visionx::CMoveMasterModel::setHandPosition
void setHandPosition(Vec3d pos)
Definition: MoveMasterModel.cpp:201
visionx::CMoveMasterModel::CMoveMasterModel
CMoveMasterModel()
Definition: MoveMasterModel.cpp:36
visionx::CMoveMasterModel::m_pTestSpherePos
SoTranslation * m_pTestSpherePos
Definition: MoveMasterModel.h:64
visionx::CMoveMasterModel::hand_pos
SoTranslation * hand_pos
Definition: MoveMasterModel.h:53
visionx::CMoveMasterModel::getPositionOfKeypoint
Vec3d getPositionOfKeypoint(int nKeyPoint)
Definition: MoveMasterModel.cpp:136
GfxTL::Vec3d
VectorXD< 3, double > Vec3d
Definition: VectorXD.h:695
NO_KEYPOINTS
#define NO_KEYPOINTS
Definition: MoveMasterModel.h:23
visionx::CMoveMasterModel::update
void update()
Definition: MoveMasterModel.cpp:106
visionx::CMoveMasterModel::hand_rot
SoTransform * hand_rot
Definition: MoveMasterModel.h:52
visionx::CMoveMasterModel::init
bool init(std::string sFilename, float fFocalLengthY)
Definition: MoveMasterModel.cpp:52
visionx::OIFwdKinematicsInterface
Definition: OIFwdKinematicsInterface.h:59
visionx::CMoveMasterModel::setJointAngle
void setJointAngle(int nJoint, float fAngleRad)
Definition: MoveMasterModel.cpp:120
visionx::CMoveMasterModel::setTestSpherePosition
void setTestSpherePosition(Vec3d pos)
Definition: MoveMasterModel.cpp:250
visionx::CMoveMasterModel::m_pObjCylRot
SoTransform * m_pObjCylRot
Definition: MoveMasterModel.h:58
visionx::CMoveMasterModel::setHandRotation
void setHandRotation(double alpha, double beta, double gamma)
Definition: MoveMasterModel.cpp:169
visionx::CMoveMasterModel::m_pObjectCylinder
SoCylinder * m_pObjectCylinder
Definition: MoveMasterModel.h:60
NO_JOINTS
#define NO_JOINTS
Definition: MoveMasterModel.h:24