Repository navigation
Dynamics
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.
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.
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,
-
infmeans that joint plays no part in carrying the load, -
nanmeans 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.
- Frequently asked questions (FAQ)
- Documentation Style Guide
- Background
- Key concepts
- Introduction to robot and link classes
- Working with Jupyter
- Working from the command line
- What about Simulink?
- How to contribute
- Contributors
- Coding conventions