Skip to content

Dynamics

Peter Corke edited this page Oct 22, 2026 · 4 revisions

Direction of torque and friction

The sign of applied joint torques matches the direction of increasing angle. That is, a positive joint torque, would increase the joint angle through positive joint velocity and acceleration.

Friction as computed by the link Link.friction(qd) method should be added to the motor output torque to determine the nett torque. It implements a viscous + Coulomb friction model that opposes the motor torque. For positive motor velocity the result will be negative.

Friction parameters in a Link are referred to the motor. The friction returned by robot.friction(qd) is referred to the output of the gearbox: motor viscous friction is scaled up by the square of the gear ratio G, and Coulomb friction by G. A link's G is 1 unless it is set, so for a direct-drive joint the two are the same.

Inverse dynamics (RNE)

There are three implementations of recursive Newton-Euler inverse dynamics:

Method Written in Robots Symbolic In the browser
DHRobot.rne C DHRobot no no
DHRobot.rne_python Python DHRobot yes yes
Robot.rne Python, ETS-based any Robot (URDF, ETS), but not a standard-DH model yes yes

DHRobot.rne uses the C code, and falls back to rne_python when the C code is not available (in the browser) or the values are symbolic. Robot.rne is the one for robots that are not DHRobots. The C version is by far the fastest.

Everything else that needs inverse dynamics (gravload, inertia, coriolis, accel, fdyn) calls rne, so it has the same limits. These are listed with the other dynamics methods in the robot class documentation.

For how the three compare in speed, and a check that they agree, see Benchmark RNE.

Payload

robot.payload(m, p) adds a point mass m (kg) at position p in the end-effector frame, combining it with the end-effector link's own mass, centre of mass and inertia. Each call replaces the previous payload, and robot.payload(0) removes it.

robot.payload_capacity(q, tau_m, w, frame="base") answers the opposite question: how large a load can the arm hold in each configuration, within the motor torque limits tau_m? It returns, for each row of q and each joint, the multiple of the wrench w that joint can support, so if w is the weight of 1 kg the answer is in kg.

  • a positive number is the multiple that reaches the torque limit of that joint,
  • inf means that joint plays no part in carrying the load,
  • nan means the arm's own gravity load already exceeds that joint's limit.

The smallest value in a row is the joint that limits the payload for that configuration. The wrench is in the base frame by default, since a weight is fixed in the world; use frame="ee" for a force fixed to the tool. The torque limits are a vector of maxima, or a 2 x n array of minima then maxima. The docstring has a worked example for the Puma 560, and the result was checked against a real mass added with payload() and the inverse dynamics.

Clone this wiki locally