geometricJacobian
Geometric Jacobian for robot configuration
Syntax
Description
computes the geometric Jacobian relative to the base for the specified end-effector
name and configuration for the robot model.jacobian = geometricJacobian(robot,configuration,endeffectorname)
computes the geometric Jacobian for the frame specified by
jacobian = geometricJacobian(robot,configuration,framename)framename.
Examples
Calculate the geometric Jacobian for a specific end effector and configuration of a robot.
Load a PUMA 560 robot from the Robotics System Toolbox™ loadrobot, specified as a rigidBodyTree object.
puma = loadrobot("puma560");Calculate the geometric Jacobian of body "link7" on the Puma robot for a random configuration.
geoJacob = geometricJacobian(puma,randomConfiguration(puma),"link7")geoJacob = 6×6
-0.0000 -0.5752 -0.5752 -0.4266 -0.7683 -0.5213
0.0000 0.8180 0.8180 -0.3000 -0.3776 0.8377
1.0000 -0.0000 -0.0000 0.8533 -0.5168 0.1629
0.1696 0.0823 0.3087 -0.0407 0.0198 0
-0.5577 0.0578 0.2171 -0.0200 0.0210 0
0.0000 0.5538 0.2224 -0.0274 -0.0448 0
Input Arguments
Robot model, specified as a rigidBodyTree
object.
Robot configuration, specified as a vector of joint positions or a structure with joint names and positions for all the bodies in the robot model. You can generate a configuration using homeConfiguration(robot), randomConfiguration(robot), or by specifying your own joint positions in a structure. To use the vector form of configuration, set the DataFormat property for robot to either "row" or "column".
End-effector name, specified as a string scalar or character vector. An end effector can be any body in the robot model.
Data Types: char | string
Frame name, specified as a string scalar or character vector. This frame can be any frame in the robot model.
Data Types: char | string
Output Arguments
Geometric Jacobian of the end effector with the specified configuration,
returned as a 6-by-n matrix, where n
is the number of degrees of freedom of the robot. The Jacobian maps the
joint-space velocity to the end-effector velocity, relative to the base
coordinate frame. The end-effector velocity equals:

ω is the angular velocity, υ is the linear velocity, and
is the joint-space velocity.
More About
When working with robot dynamics, specify the information for individual bodies of your manipulator robot using these properties of the rigidBody objects:
Mass— Mass of the rigid body in kilograms.CenterOfMass— Center of mass position of the rigid body, specified as a vector of the form[x y z]. The vector describes the location of the center of mass of the rigid body, relative to the body frame, in meters. ThecenterOfMassobject function uses these rigid body property values when computing the center of mass of a robot.Inertia— Inertia of the rigid body, specified as a vector of the form[Ixx Iyy Izz Iyz Ixz Ixy]. The vector is relative to the body frame in kilogram square meters. The inertia tensor is a positive definite matrix of the form:
The first three elements of the
Inertiavector are the moment of inertia, which are the diagonal elements of the inertia tensor. The last three elements are the product of inertia, which are the off-diagonal elements of the inertia tensor.
For information related to the entire manipulator robot model, specify these rigidBodyTree object properties:
Gravity— Gravitational acceleration experienced by the robot, specified as an[x y z]vector in m/s2. By default, there is no gravitational acceleration.DataFormat— The input and output data format for the kinematics and dynamics functions, specified as"struct","row", or"column".
Manipulator rigid body dynamics are governed by this equation:
also written as:
where:
— is a joint-space mass matrix based on the current robot configuration. Calculate this matrix by using the
massMatrixobject function.— are the Coriolis terms, which are multiplied by to calculate the velocity product. Calculate the velocity product by using by the
velocityProductobject function.— is the gravity torques and forces required for all joints to maintain their positions in the specified gravity
Gravity. Calculate the gravity torque by using thegravityTorqueobject function.— is the geometric Jacobian for the specified joint configuration. Calculate the geometric Jacobian by using the
geometricJacobianobject function.— is a matrix of the external forces applied to the rigid body. Generate external forces by using the
externalForceobject function.— are the joint torques and forces applied directly as a vector to each joint.
— are the joint configuration, joint velocities, and joint accelerations, respectively, as individual vectors. For revolute joints, specify values in radians, rad/s, and rad/s2, respectively. For prismatic joints, specify in meters, m/s, and m/s2.
To compute the dynamics directly, use the forwardDynamics object function. The function calculates the joint accelerations for the specified combinations of the above inputs.
To achieve a certain set of motions, use the inverseDynamics object function. The function calculates the joint torques required to achieve the specified configuration, velocities, accelerations, and external forces.
References
[1] Featherstone, Roy. Rigid Body Dynamics Algorithms. Springer US, 2008. DOI.org (Crossref), doi:10.1007/978-1-4899-7560-7.
Extended Capabilities
Usage notes and limitations:
When creating the rigidBodyTree object, use the syntax that specifies the
MaxNumBodies as an upper bound for adding bodies to the robot model.
You must also specify the DataFormat property as a name-value pair. For
example:
robot = rigidBodyTree("MaxNumBodies",15,"DataFormat","row")
To minimize data usage, limit the upper bound to a number close to the expected number of bodies in the model. All data formats are supported for code generation. To use the dynamics functions, the data format must be set to "row" or "column".
The show and showdetails functions do not support code generation.
Version History
Introduced in R2016bThe geometricJacobian method now accepts either a body name
or frame name in its input argument, for which it computes the geometric
Jacobian.
geometricJacobian now supports code generation with disabled dynamic memory allocation. For more information about disabling dynamic memory allocation, see Set Dynamic Memory Allocation Threshold (MATLAB Coder).
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Seleziona un sito web
Seleziona un sito web per visualizzare contenuto tradotto dove disponibile e vedere eventi e offerte locali. In base alla tua area geografica, ti consigliamo di selezionare: .
Puoi anche selezionare un sito web dal seguente elenco:
Come ottenere le migliori prestazioni del sito
Per ottenere le migliori prestazioni del sito, seleziona il sito cinese (in cinese o in inglese). I siti MathWorks per gli altri paesi non sono ottimizzati per essere visitati dalla tua area geografica.
Americhe
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)