NxRLab / ModernRobotics

Modern Robotics: Mechanics, Planning, and Control Code Library --- The primary purpose of the provided software is to be easy to read and educational, reinforcing the concepts in the book. The code is optimized neither for efficiency nor robustness.
http://modernrobotics.org/
MIT License
1.9k stars 807 forks source link

Relationship between joint torques and end-effector wrench #14

Closed ferrolho closed 5 years ago

ferrolho commented 5 years ago

In Chapter 5: Velocity Kinematics and Statics different kinds of Jacobian representations are introduced. Furthermore, the mapping of joint torque bounds to tip force bounds (like in Figure 5.4 of the book) is given as:

Equation 5.4

Both mr.JacobianSpace(Slist, thetalist) and mr.JacobianBody(Blist, thetalist) produce a Jacobian comprised of twists, and therefore cannot be used for the above mapping, correct? In order to get the plots from Figure 5.4, did the authors convert the Space Jacobian to the analytic Jacobian with Equation 5.25 in Example 5.5?

HuanWeng commented 5 years ago

Hi Henrique,

Those two functions will output Jb and Js known as manipulator Jacobian. They can not be used for the mapping in Figure 5.4. The Jacobian used in Figure 5.4 is part of analytic Jacobian. The author got it by deriving from forward kinematics instead of converting between Jacobians, which is shown in the preface of Chapter 5. But you can get that using conversion as well.

Hope my explanation makes sense to you. It is a pretty good question though.

Many thanks, Huan Weng

ferrolho commented 5 years ago

In order to compute the Geometric Jacobian, JGeom, from a Body Manipulator Jacobian, Jb, I have been using the following transformation:

J_{Geom}

Following is the respective Python code:

T_sb = mr.FKinSpace(self.M, self.Slist, thetalist)
R_sb, _ = mr.TransToRp(T_sb)

vel_transform = np.eye(6)
vel_transform[:3, :3] = R_sb
vel_transform[3:, 3:] = R_sb

J_b_theta = mr.JacobianBody(self.Blist, thetalist)

J = np.dot(vel_transform, J_b_theta)

This is basically computing the Manipulator Jacobian given in end-effector frame and then rotating it by the rotation of the end-effector itself in space-frame coordinates.