Required joint torques for given motion
Robotics System Toolbox / Manipulator Algorithms
The Inverse Dynamics block returns the joint torques required for the robot to maintain the specified robot state. To get the required joint torques, specify the robot configuration (joint positions), joint velocities, joint accelerations, and external forces.
Config — Robot configuration
JointVel — Joint velocities
Joint velocities, specified as a vector. The number of joint velocities is equal to the degrees of freedom (number of nonfixed joints) of the robot.
JointAccel — Joint accelerations
Joint accelerations, specified as a vector. The number of joint accelerations is equal to the degrees of freedom of the robot.
FExt — External force matrix
External force matrix, specified as a 6-by-n
matrix, where n is the number of bodies in the robot
model. The matrix contains nonzero values in the rows corresponding to
specific bodies. Each row is a vector of applied forces and torques that
act as a wrench for that specific body. Generate this matrix using
externalForce with a
MATLAB Function block
JointTorq — Joint torques
Joint torques, returned as a vector. Each element corresponds to a torque applied to a specific joint. The number of joint torques is equal to the degrees of freedom (number of nonfixed joints) of the robot.
Rigid body tree — Robot model
twoJointRigidBodyTree (default) |
Simulate using — Type of simulation to run
Interpreted execution (default) |
Interpreted execution— Simulate model using the MATLAB® interpreter. This option shortens startup time but has a slower simulation speed than
Code generation. In this mode, you can debug the source code of the block.
Code generation— Simulate model using generated C code. The first time you run a simulation, Simulink® generates C code for the block. The C code is reused for subsequent simulations, as long as the model does not change. This option requires additional startup time, but the speed of the subsequent simulations is comparable to
C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.
Introduced in R2018a