kouretes / naokinematics Goto Github PK
View Code? Open in Web Editor NEWForward and Inverse Kinematics for the NAO robot in c++
Forward and Inverse Kinematics for the NAO robot in c++
Hello,
Is there any way to get a hint of how to use the MATLAB code with any simulation?
For instance how to move to x,y, theta? I can get the joint names and send any angle to any joint but hold no idea how to use your code to generate the angle for each joint.
When comparing the nao forward kinematics results of this library and those from naoqi, I noticed a bug in the Z axis value.
The code:
//Right Hand
joints[L_ARM+SHOULDER_PITCH]=0;
joints[L_ARM+SHOULDER_ROLL]=0;
joints[L_ARM+ELBOW_YAW]=0;
joints[L_ARM+ELBOW_ROLL]=0;
joints[L_ARM+WRIST_YAW]=0;
//Right Hand
joints[R_ARM+SHOULDER_PITCH]=0;
joints[R_ARM+SHOULDER_ROLL]=0;
joints[R_ARM+ELBOW_YAW]=0;
joints[R_ARM+ELBOW_ROLL]=0;
joints[R_ARM+WRIST_YAW]=0;
//Now we can set the joints to the class
nkin.setJoints(joints);
output1= nkin.getForwardEffector((NAOKinematics::Effectors)CHAIN_L_ARM);
//Right Hand
output2 = nkin.getForwardEffector((NAOKinematics::Effectors)CHAIN_R_ARM);
std::cout << "x = " << output1(0,3) << " y = " << output1(1,3) << " z = " << output1(2,3) << std::endl;
std::cout << "x = " << output2(0,3) << " y = " << output2(1,3) << " z = " << output2(2,3) << std::endl;
The output:
x = 218.7 y = 113 z = 112.31
x = 218.7 y = -113 z = 112.31
Naoqi output for the Left arm in the same configuration in meters:
x = 0.21852196753025055,
y = 0.11063870042562485,
z = 0.08774302154779434,
The bug correspons to the HandOffsetZ constant when used to calculate the constant translation matrix. According to the aldebaran documentation HandOffsetZ is negative in the z axis.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.