Main Content

velocityProduct

Joint torques that cancel velocity-induced forces

Description

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.

example

Examples

collapse all

Load a model of the Quanser Q-Arm from the Robotics System Toolbox™ loadrobot, which is returned as a rigidBodyTree object. Update the data format to "row". For all dynamics calculations, the data format must be either "row" or "column".

robot = loadrobot("quanserQArm", DataFormat="row", Gravity=[0 0 -9.81]);
show(robot);

Figure contains an axes object. The axes object with xlabel X, ylabel Y contains 16 objects of type patch, line. These objects represent world, base_link, YAW, BICEP, FOREARM, END-EFFECTOR, base_link_mesh, YAW_mesh, BICEP_mesh, FOREARM_mesh, END-EFFECTOR_mesh.

Set the joint velocity vector.

qdot = [0.2 -0.3 0 0.1];

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(robot,[],qdot)
tau = 1×4

    0.0045    0.0015   -0.0023   -0.0000

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.

More About

collapse all

Extended Capabilities

expand all

Version History

Introduced in R2017a

expand all