-
|
@LakshithaPW commented on Wed Feb 15 2017 Dear All, I was wondering anyone could help me to find the Jacobian in real time for the iCub Simulator ? Thanks in advance |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
|
Hi @LakshithaPW To get the Jacobian of the arm (or any other limb) of the iCub (no matter if we consider the simulated or the real robot), you might want to use Essentially, you ought to use a snippet looking pretty much the following: #include <iCub/iKin/iKinFwd.h>
iCub::iKin::iCubArm arm("left"); // declare the arm object
arm.setAllConstraints(false); // we don't need to update the limits from the robot to compute the Jacobian
arm.releaseLink(0); // release torso pitch joint
arm.releaseLink(1); // release torso roll joint
arm.releaseLink(2); // release torso yaw joint
// retrieve here joints from the torso and the left_arm
yarp::sig::Vector torso(3), left_arm(16);
ipos_torso->getEncoders(torso.data());
ipos_left_arm->getEncoders(left_arm.data());
// fill in the vector of degrees of freedom
yarp::sig::Vector dofs(arm.getDOF());
dofs[0]=torso[2]; // be careful of the order here
dofs[1]=torso[1];
dofs[2]=torso[0];
dofs[3]=left_arm[0];
// ...
dofs[9]=left_arm[6];
yarp::sig::Matrix Jacobian=arm.GeoJacobian((M_PI/180.0)*dofs); // iKin works with radiansBesides recruiting directly the Jacobian, you might also consider relying on the Task-Space Reference Velocity Command of the Cartesian Interface. |
Beta Was this translation helpful? Give feedback.
-
|
Thank you very much for the response.. |
Beta Was this translation helpful? Give feedback.
-
|
Related issue #208. |
Beta Was this translation helpful? Give feedback.
Hi @LakshithaPW
To get the Jacobian of the arm (or any other limb) of the iCub (no matter if we consider the simulated or the real robot), you might want to use
iKinlibrary, whose tutorials are available from our manual.Essentially, you ought to use a snippet looking pretty much the following: