Main Content

velocityProduct

Joint torques that cancel velocity-induced forces

Description

example

jointTorq = velocityProduct(robot,configuration,jointVel) computes the joint torques required to cancel the forces induced by the specified joint velocities under a certain joint configuration. Gravity torque is not included in this calculation.

Examples

collapse all

Load a predefined KUKA LBR robot model, which is specified as a RigidBodyTree object.

load exampleRobots.mat lbr

Set the data format to 'row'. For all dynamics calculations, the data format must be either 'row' or 'column'.

lbr.DataFormat = 'row';

Set the joint velocity vector.

qdot = [0 0 0.2 0.3 0 0.1 0];

Compute the joint torques required to cancel the velocity-induced joint torques at the robot home configuration ([] input). The velocity-induced joint torques equal the negative of the velocityProduct output.

tau = -velocityProduct(lbr,[],qdot);

Input Arguments

collapse all

Robot model, specified as a rigidBodyTree object. To use the velocityProduct function, set the DataFormat property to either 'row' or 'column'.

Robot configuration, specified as a vector with positions for all nonfixed joints in the robot model. You can generate a configuration using homeConfiguration(robot), randomConfiguration(robot), or by specifying your own joint positions. To use the vector form of configuration, set the DataFormat property for the robot to either 'row' or 'column' .

Joint velocities, specified as a vector. The number of joint velocities is equal to the velocity degrees of freedom of the robot. To use the vector form of jointVel, set the DataFormat property for the robot to either 'row' or 'column' .

Output Arguments

collapse all

Joint torques, specified as a vector. Each element corresponds to a torque applied to a specific joint.

Extended Capabilities

Introduced in R2017a