It is common to see the equations of motion of manipulators or humanoids
reminded in the preamble of research papers. Their origin can be tracked down
in textbooks, where they are derived from Newtonian or Lagrangian mechanics. In
this note, we will see what are the equations of motion for manipulators and
legged robots, and how to compute them in practice.
The equations of motion of a physical system describe its motion as a
function of time and optional control inputs. In their general form, they
- is the time variable,
- is the vector of generalized coordinates, for instance the vector
of joint-angles for a manipulator,
- is the first time-derivative (velocity) of
- is the second time-derivative (acceleration) of
- is the vector of control inputs.
These equations provide a mapping between the control space, the commands
that we send to actuators, and the state space of robot motions.
Imagine a rigid block sliding on a table, which we can see as a 1-DOF (one
degree of freedom) system with
coordinate . The operator applies a horizontal force that
pushes the block forward.
If the force is high enough to overcome friction, applying Newton's second law
of motion (and Coulomb's model of sliding friction) we get: with the kinetic coefficient of friction. This expression is of the form
In robotics, we usually make the following assumptions:
- Rigid bodies: the robot consists of a set of rigid bodies, called
"links", connected by actuated joints. This assumption allows us to use the
theory of rigid body dynamics, which is central to both manipulator and
- D'Alembert's principle: internal forces are conservative. Internal
forces, also known as constraint forces, are the forces acting at each joint
to prevent motions that are not alongside the joint axis. Assuming that they
are conservative is equivalent to Gauss's principle of least constraint.
Case of manipulators
Manipulators are a particular type of articulated system where at least one
link is fixed to the environment. We suppose that the constraint is strong
enough to withhold any effort exerted on it. Under these assumptions, the
equations of motion for a manipulator can be written:
where, denoting by the degree of freedom of the robot,
- is the inertia matrix,
- is the Coriolis tensor,
- is the -dimensional vector of actuated joint torques,
- is the -dimensional vector of external joint torques caused by gravity.
Contrary to the general form , this
expression is time-invariant: time does not appear in the formula,
so that the current state and applied joint torque
we can directly compute the resulting joint accelerations
(this operation is known as forward dynamics). The system has no
memory: regardless of how it got there, given its current state and joint
torques, it will always accelerate in the same way.
Inertia matrix and Coriolis tensor
The inertia matrix and Coriolis tensor can be derived from link inertias and
their Jacobians by:
where is the total mass of link , is its
and the Jacobian of the frame attached to link stacks:
- the rotational Jacobian such that the angular velocity
of the link frame with respect to the inertial frame
- the translational Jacobian such that the linear
velocity of the origin of the link frame (in the inertial
frame) satisfies .
In OpenRAVE, the former is for instance computed by
Robot.ComputeJacobianAxisAngle and the latter by
Robot.ComputeJacobianTranslation. These formulas are good to keep in
mind, but there are more efficient techniques to compute the inertia matrix in practice. See Wieber's
comments on the structure of the dynamics of articulated motion for their derivation from
Gauss's principle of least constraint.
Gravity torques and external forces
External forces applied to the system can be expressed via a similar formula:
where denotes the resultant of external forces
applied to link of the robot, and is
the moment of these forces. Together, they form the external wrench applied
to link . Wrench coordinates should be consistent with the definitions
of our Jacobian matrices: we assumed above that the image of our Jacobian
matrices are expressed in the inertial frame, therefore wrench coordinates
should be expressed in the inertial frame as well.
Let us consider gravity as our external force. Assuming that the frame attached
to link is located at the link's center of mass, joint torques caused
by gravity can be written as:
By definition, the Jacobian of the center of mass is such
that . We can
therefore condense the formula above as .
Case of legged robots
Contrary to manipulators, legged robots such as humanoids can make or break
contacts with the environment. To fully describe their position in space, the
vector of generalized coordinates consists of not only the vector of joint
angles, but also six more coordinates that describe the position and
orientation of the floating base frame (also known as base
link frame) with respect to the inertial frame . If the robot
has actuated joints, this means that . As the vector of actuated torques is still , humanoids are underactuated systems: they cannot control
directly all their degrees of freedom.
With manipulators, the contact constraint with the environment was implicitely
enforced, as the vector of joint angles was independent from the world position
of the robot. With legged robots it is not the case any more, and contacts need
to be actively enforced by kinematic contact constraints.
To go further
My favorite introduction to equations of motion is Wieber's Some comments on
the structure of the dynamics of articulated motion, which I warmly recommend. It
is one of the rare papers where the formulas for and
are written down in plain and understandable form from link
inertias and Jacobian matrices. See the follow-up page on the constrained
equations of motion for more
details on this.
There is a particular choice of generalized to simplifies the formula of the
gravity torque vector. It consists in taking the coordinates of the center of
mass of the system as as translation coordinate for the floating base. With
such generalized coordinates , the equations of motion
Check out Garofalo et al. (2015)
for a derivation of this property.
When using contact points and their corresponding contact forces, the contact
stability condition to avoid slippage is
that contact forces stay inside their respective Coulomb friction cones. This
condition generalizes to contact frames and their corresponding contact
wrenches: in this case, Coulomb friction generalizes to wrench friction cones. If wrenches are new to you, you might
want to learn more about screw theory which is
commonly applied in robotics.