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
30namespace 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
#define NO_JOINTS
#define NO_KEYPOINTS
The header file for OIFwdKinematicsInterface.
void setHandRotation(double alpha, double beta, double gamma)
void setTestSpherePosition(Vec3d pos)
Vec3d getPositionOfKeypoint(int nKeyPoint)
SoTranslation * m_pTestSpherePos
OIFwdKinematicsInterface * m_pOIFwdKinematicsInterface
bool init(std::string sFilename, float fFocalLengthY)
void setObjCylConfig(Vec3d pos, double alpha, double beta, double gamma, float height, float radius)
void setJointAngle(int nJoint, float fAngleRad)
ArmarX headers.