All courses › Robotics
Robotics: free practice, theory and problems
A robot arm must always know where its tool is and which way it points, both in its own frame and in the world (base) frame. This calls for a precise mathematical language for rotations and displacements. Rotation matrices and homogeneous transformation matrices let us describe and chain such motions systematically, link by link along the arm – exactly what the Denavit–Hartenberg (DH) parameters are built on.
Contents
1. Rotations and transformations
What is it about?
A robot arm must always know where its tool is and which way it points, both in its own frame and in the world (base) frame. This calls for a precise mathematical language for rotations and displacements. Rotation matrices and homogeneous transformation matrices let us describe and chain such motions systematically, link by link along the arm – exactly what the Denavit–Hartenberg (DH) parameters are built on.
Concepts and formulas
- A rotation matrix is orthogonal: and . It preserves lengths and angles.
- Two rotations can be combined by matrix multiplication: . In 3D the order matters ( in general); in 2D about the same axis the order does not matter, and the angles simply add.
- A homogeneous transformation matrix (4×4, or 3×3 in the plane) combines rotation and translation in one operation: T = \begin{pmatrix}R & \vec p\\ 0 & 1\end{pmatrix} where is the origin of the new frame, expressed in the old one.
- A point in local coordinates has global coordinates .
- The inverse of a homogeneous transform is – transposing is cheap, which is why is so useful.
- Euler angles describe an orientation with three successive rotations, but can suffer from gimbal lock: two axes line up and one degree of freedom is lost. Quaternions avoid this and interpolate more smoothly, but use four numbers instead of three.
- The DH parameters (, , , ) describe how each link's frame relates to the previous one, with four numbers per link.
How to solve the problems
- Sketch (or picture) which frames are involved and how they are linked.
- Write down the rotation matrix/matrices and any translation for each step.
- Multiply/add in the right order: from the known point outward toward the frame you want coordinates in.
- To go the other way (find local coordinates from global ones), use the inverse transformation.
- Check your answer: a pure rotation never changes the length of a vector.
Example
A frame B is rotated 90° counterclockwise and shifted by relative to the base frame A. A point has coordinates in the base frame. What are its coordinates in frame B?
- This is the reverse of transforming from local to global, so we use the inverse: .
- Subtract the translation: .
- Rotate by (the opposite of ): , which gives .
Answer: the point has coordinates in frame B.
Common mistakes
- Swapping the order of rotation and translation, or of several rotations, in 3D.
- Believing . The correct relation is .
- Forgetting that the inverse requires rotating by (or ) after the translation has been subtracted, not before.
- Mixing degrees and radians in the same calculation.
- Assuming Euler angles are always unique and problem-free – gimbal lock is a real singularity.
Concepts in this part
2. Kinematics
What is it about?
Kinematics describes the relationship between the joint angles (or joint displacements) of a robot arm and the position/orientation of its tool, without worrying about the forces that produce the motion. Forward kinematics goes from known joint variables to the tool's position; inverse kinematics goes the other way, from a desired tool position to the joint variables that produce it. Both are needed to program and control a robot arm in practice.
Concepts and formulas
- Forward kinematics (FK): , where are the joint variables (angles for revolute joints, lengths for prismatic ones) and is the tool's position/orientation. Computed by chaining the DH transformations link by link (see unit 0).
- Inverse kinematics (IK): find given a desired . There may be no solution, one solution, or several (e.g. elbow-up/elbow-down for a planar 2-link arm).
- For a planar 2-link arm with lengths : , . Solve the IK with the law of cosines: .
- The workspace is all the points the tool can reach; for the 2-link arm it is a ring with inner radius and outer radius .
- The Jacobian relates joint velocities to the tool's velocity: .
- A singularity is a configuration where loses rank (becomes non-invertible). Near a singularity, even a small tool velocity requires very large joint velocities.
- Redundancy: more degrees of freedom than the task requires (e.g. a 7-axis arm for a 6D task), giving multiple possible joint solutions for the same tool position.
- Joint-interpolated motion (MoveJ) moves the joints smoothly from start to goal; the tool then traces a curved path. Linear/Cartesian motion (MoveL) keeps the tool on a straight line, but can require large and uneven joint velocities.
How to solve the problems
- Decide whether the task is FK (known angles → position) or IK (known position → angles).
- For FK: substitute into the formulas link by link (or multiply the DH matrices).
- For IK on a planar arm: use the law of cosines to find , then find from the geometry.
- Always check whether the target lies within the workspace () before solving the IK.
- For velocities: use the Jacobian, and watch out for singularities where loses rank.
Example
A planar 2-link arm has m and m. The tool must reach m. Find .
- Distance from the base: m, which lies within m – the target is reachable.
- .
- (the elbow-up solution).
Common mistakes
- Mixing up FK and IK, or assuming IK always has exactly one solution.
- Forgetting to check whether the target even lies within the workspace before solving the IK.
- Assuming joint velocities are always bounded – near a singularity they can become very large.
- Confusing MoveJ and MoveL: MoveJ does not give a straight line for the tool.
Concepts in this part
3. Robot systems
What is it about?
A robot is more than its kinematics – it is a complete mechatronic system of mechanical structure, actuators, sensors and control. Choosing the right robot configuration, drivetrain and sensing for a task matters just as much as computing the kinematics correctly, and this is where the engineer's practical choices come in.
Concepts and formulas
- Common configurations: articulated arm (most degrees of freedom, very flexible), SCARA (stiff vertically, compliant horizontally – fast pick-and-place in a plane), Cartesian/gantry (linear axes in x, y, z – simple and accurate), cylindrical and spherical (older types), parallel/delta (low moving mass, high speed, but a limited workspace).
- Joints: revolute (R, rotates) and prismatic (P, slides linearly). A robot's type is often described with a letter code, e.g. RRR for a 3-joint articulated arm.
- Sensors: an incremental encoder counts pulses and must be "homed" (find a reference position) after start-up; an absolute encoder gives the angle directly, even right after a power loss, but is more expensive. The resolution of an -bit absolute encoder is .
- Actuators: electric motors (most common) usually drive through a gearbox (e.g. a harmonic drive) that increases torque and reduces speed: , where is the gear ratio and the efficiency.
- The end effector (robot tool) is whatever sits at the tip – a gripper, welding gun, suction cup, and so on – and determines what the robot actually does.
- Collaborative robots (cobots) are designed to work safely near people, with force and speed limiting, unlike traditional robots that often require safety fencing.
- Path planning finds a collision-free route from start to goal through the workspace, e.g. with algorithms such as A* or RRT.
How to solve the problems
- Identify which part of the system the question is about: configuration, joint/actuator, sensor, or safety/planning.
- For gearboxes: keep track of whether you are computing the torque into or out of the gearbox, and remember the efficiency.
- For encoders: distinguish between pulses per revolution (incremental) and bits of resolution (absolute) – they give answers in different units.
- Think through which robot configuration suits the task's geometry and speed requirements.
Example
A motor delivers 0.6 Nm into a gearbox with a ratio of 100:1 and an efficiency of 85%. How much torque does the joint get?
- .
- Nm.
Common mistakes
- Confusing incremental and absolute encoders, or forgetting that incremental ones must be homed.
- Forgetting the efficiency when computing torque through a gearbox.
- Assuming more degrees of freedom is always better – a SCARA is often faster and cheaper than a full 6-axis arm for a planar task.
- Assuming cobots are always slow or weak – they are safe, not necessarily slow.
Concepts in this part
Example problems with solutions
Here are some of the problems in robotics. In the app, calculation problems get new numbers every time, so you can practise until it sticks – and take a graded practice exam before the real one.
Rotations and transformations: What properties does a rotation matrix have?
Answer: and
It is orthogonal and preserves lengths and orientation.
Kinematics: What is forward kinematics?
Answer: Finding the tool's position and orientation from the joint angles
Going the other way is inverse kinematics.
Robot systems: How many degrees of freedom are needed to position and orient a tool freely in 3D?
Answer: 6
Three for position and three for orientation.
Rotations and transformations: A 4×4 homogeneous transformation matrix contains …
Answer: a rotation and a translation
.
Matches these university courses
The content covers the syllabus found in engineering degrees, for example:
- ELVE3610 (OsloMet)
- TPK4170 (NTNU)