Skip to content
Snippets Groups Projects
Commit c2574928 authored by vahrenkamp's avatar vahrenkamp
Browse files

Identifier Map generated to find corresponding nodeID to joint identifier

git-svn-id: http://svn.code.sf.net/p/simox/code/trunk@742 042f3d55-54a8-47e9-b7fb-15903f145c44
parent 30b48b7b
No related branches found
No related tags found
No related merge requests found
......@@ -36,14 +36,19 @@ namespace VirtualRobot
/// returns the number of Degrees of Freedom of the dynamics system
int getnDoF();
int getIdentifier(std::string name){return identifierMap.at(name);}
protected:
RobotNodeSetPtr rns;
boost::shared_ptr<RigidBodyDynamics::Model> model;
Eigen::Vector3d gravity;
std::map<std::string, int> identifierMap;
private:
void toRBDL(boost::shared_ptr<RigidBodyDynamics::Model> model, RobotNodePtr node, RobotNodePtr parentNode = RobotNodePtr(), int parentID = 0);
};
typedef boost::shared_ptr<Dynamics> DynamicsPtr;
}
#endif
......@@ -47,6 +47,8 @@ int main(int argc, char* argv[])
cout << "joint space gravitational matrix:" << endl << dynamics.getGravityMatrix(q, nDof) << endl;
cout << "joint space coriolis matrix:" << endl << dynamics.getCoriolisMatrix(q, qdot, nDof) << endl;
cout << "joint space accelerations from forward dynamics:" << endl << dynamics.getForwardDynamics(q, qdot, tau) << endl;
cout << "Identifier for Elbow R:" << endl << dynamics.getIdentifier("Elbow R") << endl;
}
else
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment