20 const std::string CMoveMasterModel::keypoint[
NO_KEYPOINTS] = {
"PalmCenter",
24 const std::string CMoveMasterModel::jointname[
NO_JOINTS] = {
"Body",
78 printf(
"already initialized\n");
94 printf(
"Keypoint node %s not found in path!\n", keypoint[i].c_str());
103 printf(
"joint node %s not found in path!\n", jointname[i].c_str());
111 hand_pos =
static_cast<SoTranslation*
>(temp_path->getNodeFromTail(0));
113 hand_rot =
static_cast<SoTransform*
>(temp_path->getNodeFromTail(0));
116 m_pObjCylPos =
static_cast<SoTranslation*
>(temp_path->getNodeFromTail(0));
118 m_pObjCylRot =
static_cast<SoTransform*
>(temp_path->getNodeFromTail(0));
123 m_pTestSpherePos =
static_cast<SoTranslation*
>(temp_path->getNodeFromTail(0));
133 printf(
"call init first\n");
148 printf(
"Illegal joint: %d\n", nJoint);
154 printf(
"Could not set joint angle for node %s!\n", jointname[nJoint].c_str());
167 printf(
"Illegal keypoint: %d\n", nKeyPoint);
175 iposition[nKeyPoint].getValue(
x, y, z);
184 printf(
"Could not retrieve position of keypath %s!\n", keypoint[nKeyPoint].c_str());
199 Math3d::SetRotationMat(tempmat, alpha, beta, gamma);
200 Math3d::GetAxisAndAngle(tempmat, axis,
angle);
201 if (Math3d::Length(axis) == 0)
206 vec.setValue(axis.x, axis.y, axis.z);
228 temp.setValue(pos.x, pos.y, pos.z);
229 hand_pos->translation.setValue(temp);
241 temp.setValue(pos.x, pos.y, pos.z);
251 Math3d::SetRotationMat(tempmat, alpha, beta, gamma);
252 Math3d::GetAxisAndAngle(tempmat, axis,
angle);
253 if (Math3d::Length(axis) == 0)
258 vec.setValue(axis.x, axis.y, axis.z);
283 temp.setValue(pos.x, pos.y, pos.z);
void setHandRotation(double alpha, double beta, double gamma)
SoTransform * m_pObjCylRot
void setTestSpherePosition(Vec3d pos)
SoCylinder * m_pObjectCylinder
Vec3d getPositionOfKeypoint(int nKeyPoint)
void setHandPosition(Vec3d pos)
SoTranslation * m_pObjCylPos
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)
This file offers overloads of toIce() and fromIce() functions for STL container types.
double angle(const Point &a, const Point &b, const Point &c)