Body Jacobian Matrix and Space Jacobian Matrix

2 minute read

Published:

The choice between using a body Jacobian and a spatial Jacobian for robotic control depends on the specific requirements of your application, particularly whether you are more focused on controlling linear velocity or need to consider both linear and angular velocities together.

Code Example

tool_Jtool = pin.computeFrameJacobian(robot.model,robot.data,q,IDX_TOOL, pin.LOCAL)
o_Jtool = pin.computeFrameJacobian(robot.model,robot.data,q,IDX_TOOL, pin.WORLD)
print(f"With spatial Jacobian:        {o_Jtool @ u}")
print(f"With adjoint * body Jacobian: {oMtool.action @ (tool_Jtool @ u)}")

o_Jtool3 = oMtool.rotation @ tool_Jtool[:3, :]
new_o_Jtool3 = pin.computeFrameJacobian(robot.model,robot.data,q,IDX_TOOL, pin.LOCAL_WORLD_ALIGNED)[:3,:]
print(f"o_Jtool3 from body Jacobian:  {o_Jtool3 @ u}")
print(f"Local-world-aligned Jacobian: {new_o_Jtool3 @ u}")

When to Use Body Jacobian ====== Focus on Linear Velocity: If your primary goal is to control the linear velocity of the end-effector or a specific part of the robot, especially in its own local frame, then using the body Jacobian is a good choice. Local Frame Reference: The body Jacobian is particularly useful when the orientation or motion of the end-effector relative to its own frame is crucial, such as in precision tasks where the end-effector’s orientation plays a significant role. Applications: This might include operations like tool manipulation or assembly tasks where the relative movement and orientation of the tool are more important than its global position and orientation.

When to Use Spatial Jacobian

Considering Both Linear and Angular Velocities: When your application requires a comprehensive understanding of how the robot’s joint movements affect both the position and orientation of the end-effector in the world frame, the spatial Jacobian is the appropriate choice. Global Frame Reference: It’s useful in scenarios where the interaction of the robot with its environment is important, and you need to consider how the end-effector is moving and rotating in the global space. Applications: Examples include tasks where the robot needs to navigate around fixed obstacles, or in pick-and-place operations where the end-effector’s position and orientation in the world frame are critical.

Conclusion

Choice Depends on Application: The decision to use a body Jacobian or a spatial Jacobian should be based on the specific requirements of your robotic application. Control Strategy: For control strategies focusing primarily on linear motion or local orientation, the body Jacobian is more suitable. Conversely, for comprehensive motion control involving both translation and rotation in the world frame, the spatial Jacobian is the better choice.