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 
17 #include "Math/Math3d.h"
19 #include <Inventor/nodes/SoCylinder.h>
20 #include <Inventor/nodes/SoTransform.h>
21 #include <Inventor/nodes/SoTranslation.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,
62  double alpha,
63  double beta,
64  double gamma,
65  float height,
66  float radius);
67 
68  // test sphere (David)
69  SoTranslation* m_pTestSpherePos;
70  void setTestSpherePosition(Vec3d pos);
71 
72  private:
73  // names of keypoints and joints (see .cpp file)
74  const static std::string keypoint[NO_KEYPOINTS];
75  const static std::string jointname[NO_JOINTS];
76 
77  // members for OI interaction
78  SoPath* keypath[NO_KEYPOINTS];
79  SbVec3f iposition[NO_KEYPOINTS];
80  SoPath* jointpath[NO_JOINTS];
81  };
82 } // namespace visionx
visionx::CMoveMasterModel::m_pOIFwdKinematicsInterface
OIFwdKinematicsInterface * m_pOIFwdKinematicsInterface
Definition: MoveMasterModel.h:48
GfxTL::Vec3d
VectorXD< 3, double > Vec3d
Definition: VectorXD.h:737
visionx::CMoveMasterModel::~CMoveMasterModel
~CMoveMasterModel()
Definition: MoveMasterModel.cpp:62
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:233
visionx::CMoveMasterModel::setHandPosition
void setHandPosition(Vec3d pos)
Definition: MoveMasterModel.cpp:225
visionx::CMoveMasterModel::CMoveMasterModel
CMoveMasterModel()
Definition: MoveMasterModel.cpp:57
visionx::CMoveMasterModel::m_pTestSpherePos
SoTranslation * m_pTestSpherePos
Definition: MoveMasterModel.h:69
visionx::CMoveMasterModel::hand_pos
SoTranslation * hand_pos
Definition: MoveMasterModel.h:53
visionx::CMoveMasterModel::getPositionOfKeypoint
Vec3d getPositionOfKeypoint(int nKeyPoint)
Definition: MoveMasterModel.cpp:161
NO_KEYPOINTS
#define NO_KEYPOINTS
Definition: MoveMasterModel.h:23
visionx::CMoveMasterModel::update
void update()
Definition: MoveMasterModel.cpp:129
visionx::CMoveMasterModel::hand_rot
SoTransform * hand_rot
Definition: MoveMasterModel.h:52
visionx::CMoveMasterModel::init
bool init(std::string sFilename, float fFocalLengthY)
Definition: MoveMasterModel.cpp:74
visionx::OIFwdKinematicsInterface
Definition: OIFwdKinematicsInterface.h:60
visionx::CMoveMasterModel::setJointAngle
void setJointAngle(int nJoint, float fAngleRad)
Definition: MoveMasterModel.cpp:144
visionx::CMoveMasterModel::setTestSpherePosition
void setTestSpherePosition(Vec3d pos)
Definition: MoveMasterModel.cpp:280
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:191
visionx::CMoveMasterModel::m_pObjectCylinder
SoCylinder * m_pObjectCylinder
Definition: MoveMasterModel.h:60
NO_JOINTS
#define NO_JOINTS
Definition: MoveMasterModel.h:24