Chapter 5: Introduction to Robot Mechanisms (Conceptual)

Lesson 3: Workspace and Reachability (conceptual)

This lesson formalizes what it means for a robot mechanism to “reach” points in space. Without using full forward/inverse kinematics, we define workspace via sets and geometry, distinguish several workspace notions used in mechanism design, and study how link lengths, joint types, and limits shape reachability. We also show sampling-based workspace estimation and implement it in Python, C++, Java, and Matlab.

1. Conceptual Overview

A robot mechanism is specified by its links and joints. Each joint contributes one or more internal coordinates (joint variables), and the collection of all joint variables determines where the end-effector (tool center point) can be placed. The set of all end-effector positions the robot can attain is called its workspace.

Intuitively:

  • Reachability answers “Can the tool get there at all?”
  • Workspace shape answers “Where can it go, and how robustly?”
  • Joint limits / collisions shrink reachability relative to the ideal mechanism.
flowchart TD
  M["Mechanism: links + joints"] --> Q["Joint variables q"]
  Q --> C["Configuration space C (all q that satisfy limits)"]
  C --> F["End-effector map x = f(q)"]
  F --> W["Workspace W = { f(q) | q in C }"]
  C --> CF["Collision-free subset C_free"]
  CF --> Wf["Free workspace W_free = { f(q) | q in C_free }"]
        

We now make these ideas precise using set definitions and geometry, then derive classical workspace results for simple serial arms.

2. Formal Definitions: Configuration Space, Reachability, Workspace

Let a robot have \( n \) joints, with joint variables collected in \( \mathbf{q} = (q_1,\dots,q_n) \). Each joint variable lives in an admissible interval or set dictated by its physical type and limits, denoted \( \mathcal{Q}_i \).

The configuration space is the Cartesian product

\[ \mathcal{C} \;=\; \mathcal{Q}_1 \times \cdots \times \mathcal{Q}_n \;\subseteq\; \mathbb{R}^n . \]

A (conceptual) end-effector position map is a function \( f:\mathcal{C}\to\mathbb{R}^m \), where typically \( m=2 \) for planar motion or \( m=3 \) for spatial motion. We do not derive \( f \) in full generality here; in simple cases it follows from geometry.

The reachable workspace is the image of \( f \):

\[ \mathcal{W} \;=\; f(\mathcal{C}) \;=\; \{\, \mathbf{x}\in\mathbb{R}^m \mid \exists \mathbf{q}\in\mathcal{C} \text{ such that } \mathbf{x}=f(\mathbf{q}) \,\}. \]

A point \( \mathbf{x}^\star \) is reachable iff \( \mathbf{x}^\star\in\mathcal{W} \).

If the mechanism must avoid self-collisions or obstacles, define the collision-free subset \( \mathcal{C}_\text{free}\subseteq\mathcal{C} \). The free workspace is

\[ \mathcal{W}_\text{free} \;=\; f(\mathcal{C}_\text{free}) \;\subseteq\; \mathcal{W}. \]

These definitions are set-theoretic and do not require computing a closed-form kinematic map—the key is that workspace is always the image of feasible configurations.

3. Types of Workspace Used in Mechanism Design

Different tasks require different notions of “usable” workspace. Let \( \mathcal{W} \) be the reachable workspace.

3.1 Reachable workspace. Already defined as \( \mathcal{W}=f(\mathcal{C}) \).

3.2 Dexterous workspace (conceptual). If the end-effector has an orientation space \( \mathcal{O} \), define the full task space \( \mathbb{R}^m\times\mathcal{O} \). The dexterous workspace consists of positions for which all admissible orientations are possible:

\[ \mathcal{W}_\text{dex} = \{\, \mathbf{x}\in\mathcal{W} \mid \forall \mathbf{o}\in\mathcal{O},\; \exists \mathbf{q}\in\mathcal{C}: ( \mathbf{x},\mathbf{o}) = g(\mathbf{q}) \,\}. \]

Here \( g \) is the position-orientation map. We postpone its explicit construction to later courses, but the definition clarifies the design intent: robust task execution requires more than mere reachability.

3.3 Connected workspace components. A workspace may split into disconnected regions. Let \( \mathcal{W} = \cup_{k=1}^K \mathcal{W}^{(k)} \) be its decomposition into maximal connected sets. A task requiring continuous motion between two points \( \mathbf{x}_a,\mathbf{x}_b \) is feasible only if they lie in the same component.

3.4 Service workspace. In practice, designers define a conservative subset \( \mathcal{W}_\text{srv}\subset\mathcal{W}_\text{free} \) that avoids singular postures, extreme joint angles, and low stiffness regions. Formally, by selecting a “good” subset of configurations \( \mathcal{C}_\text{good}\subset\mathcal{C}_\text{free} \):

\[ \mathcal{W}_\text{srv} = f(\mathcal{C}_\text{good}). \]

4. Geometric Workspace Example: Planar 2R Serial Arm

Consider a planar arm with two revolute joints and link lengths \( \ell_1,\ell_2 > 0 \). Joint variables are angles \( q_1,q_2\in[-\pi,\pi] \). The end-effector position is a point in \( \mathbb{R}^2 \). Without deriving full kinematics, we use triangle geometry.

Let \( r \) be the radial distance from the base to the end-effector. The two links form a triangle with sides \( \ell_1 \), \( \ell_2 \), and \( r \). By the triangle inequality, a triangle exists iff

\[ |\ell_1 - \ell_2| \;\le\; r \;\le\; \ell_1 + \ell_2 . \]

Therefore the reachable workspace is the annulus

\[ \mathcal{W} = \{\, \mathbf{x}\in\mathbb{R}^2 \mid |\ell_1 - \ell_2| \le \|\mathbf{x}\| \le \ell_1 + \ell_2 \,\}. \]

Proposition 1 (Annular workspace). If \( q_1,q_2 \) are unconstrained beyond full rotation, the planar 2R arm’s workspace is exactly the annulus above.

Proof.

  1. (Necessity) Any reachable point corresponds to some physical triangle formed by the links and radial segment. Hence the triangle inequality must hold, giving \( r \le \ell_1+\ell_2 \) and \( r \ge |\ell_1-\ell_2| \).
  2. (Sufficiency) Suppose a point has radius \( r \) satisfying the inequalities. Then there exists a triangle with sides \( \ell_1,\ell_2,r \). Choose the angle between the links to match this triangle; one can always rotate the whole triangle about the base, so an appropriate \( q_1 \) places the triangle at the desired direction. Thus a configuration exists with end-effector at that point.

Hence the workspace is exactly the annulus. □

If \( \ell_1=\ell_2 \), the inner radius is zero and the workspace becomes a disk. If \( \ell_1\neq \ell_2 \), a “dead zone” near the base appears.

5. How Joint Limits and Mechanism Choice Shape Workspace

Real joints have limits. Suppose \( q_i \in [q_i^{\min}, q_i^{\max}] \). The feasible configuration set becomes

\[ \mathcal{C} = \prod_{i=1}^n [q_i^{\min}, q_i^{\max}]. \]

The reachable workspace contracts to \( \mathcal{W}=f(\mathcal{C}) \). Even without explicit \( f \), we can reason qualitatively:

  • Revolute joints primarily limit angular sweep, removing sectors of the ideal workspace.
  • Prismatic joints limit radial extension, removing shells or slabs.
  • Serial mechanisms tend to have large reachable volumes but may have thin “necks” and less uniform dexterity.
  • Parallel mechanisms often have smaller but stiffer workspaces, sometimes with disconnected components.

A useful abstract fact (no explicit Jacobian needed) is that the mapping \( f \) can locally “lose dimension.” If the mechanism has \( n \) internal DOF but the end-effector locally moves in fewer than \( m \) independent directions, the posture is a singular configuration. Singular sets often form workspace boundaries or internal “holes.”

6. Sampling-Based Workspace Estimation (Conceptual Algorithm)

When closed-form geometry is hard (e.g., multi-DOF arms, joint limits, obstacles), a standard approach is to sample joint space and project to task space. This does not require solving inverse kinematics.

flowchart TD
  S["Pick joint limits for all qi"] --> N["Choose number of samples N"]
  N --> R["Randomly sample q in C"]
  R --> P["Compute position x = f(q) (by geometry or simulator)"]
  P --> A["Accumulate points in set W_hat"]
  A --> K["Optional: cluster / hull / voxelize"]
  K --> O["Estimated workspace W_hat"]
        

Mathematically, if \( \mathbf{q}^{(1)},\dots,\mathbf{q}^{(N)} \) are i.i.d. samples from a distribution supported on \( \mathcal{C} \), the empirical workspace is

\[ \widehat{\mathcal{W}}_N = \{\, f(\mathbf{q}^{(k)}) \mid k=1,\dots,N \,\}. \]

Under mild regularity (continuity of \( f \) and full support sampling), \( \widehat{\mathcal{W}}_N \) converges to \( \mathcal{W} \) in the sense of Hausdorff distance as \( N\to\infty \).

7. Minimal Code Examples — Estimating Workspace of a Planar 2R Arm

We implement Monte Carlo sampling for the planar 2R arm. For each sampled \( (q_1,q_2) \), compute the end-effector point via basic trigonometry. This uses only the geometric model from Section 4.

7.1 Python (NumPy, Matplotlib)


import numpy as np
import matplotlib.pyplot as plt

# Link lengths
l1, l2 = 1.0, 0.7

# Joint limits (radians)
q1_min, q1_max = -np.pi, np.pi
q2_min, q2_max = -np.pi, np.pi

N = 50000
q1 = np.random.uniform(q1_min, q1_max, N)
q2 = np.random.uniform(q2_min, q2_max, N)

# Geometric position (planar)
x = l1*np.cos(q1) + l2*np.cos(q1 + q2)
y = l1*np.sin(q1) + l2*np.sin(q1 + q2)

plt.figure()
plt.scatter(x, y, s=1)
plt.axis("equal")
plt.title("Estimated workspace of planar 2R arm")
plt.xlabel("x")
plt.ylabel("y")
plt.show()
      

7.2 C++ (Eigen optional; standard library only)


#include <iostream>
#include <vector>
#include <random>
#include <cmath>

int main() {
    double l1 = 1.0, l2 = 0.7;
    double q1_min = -M_PI, q1_max = M_PI;
    double q2_min = -M_PI, q2_max = M_PI;
    int N = 10000;

    std::mt19937 gen(0);
    std::uniform_real_distribution<double> d1(q1_min, q1_max);
    std::uniform_real_distribution<double> d2(q2_min, q2_max);

    std::vector<double> xs, ys;
    xs.reserve(N); ys.reserve(N);

    for (int k = 0; k < N; ++k) {
        double q1 = d1(gen);
        double q2 = d2(gen);
        double x = l1*std::cos(q1) + l2*std::cos(q1 + q2);
        double y = l1*std::sin(q1) + l2*std::sin(q1 + q2);
        xs.push_back(x);
        ys.push_back(y);
    }

    // Print a few sample points (plot externally if desired)
    for (int k = 0; k < 10; ++k) {
        std::cout << xs[k] << " " << ys[k] << std::endl;
    }
    return 0;
}
      

7.3 Java (standard library)


import java.util.Random;

public class Workspace2R {
    public static void main(String[] args) {
        double l1 = 1.0, l2 = 0.7;
        double q1Min = -Math.PI, q1Max = Math.PI;
        double q2Min = -Math.PI, q2Max = Math.PI;
        int N = 10000;

        Random rng = new Random(0);

        for (int k = 0; k < 10; k++) {
            double q1 = q1Min + (q1Max - q1Min) * rng.nextDouble();
            double q2 = q2Min + (q2Max - q2Min) * rng.nextDouble();

            double x = l1 * Math.cos(q1) + l2 * Math.cos(q1 + q2);
            double y = l1 * Math.sin(q1) + l2 * Math.sin(q1 + q2);

            System.out.println(x + " " + y);
        }
        // For full visualization, store all points and plot using a Java plotting library.
    }
}
      

7.4 Matlab / Simulink Script


l1 = 1.0; l2 = 0.7;
q1_min = -pi; q1_max = pi;
q2_min = -pi; q2_max = pi;

N = 50000;
q1 = q1_min + (q1_max - q1_min)*rand(N,1);
q2 = q2_min + (q2_max - q2_min)*rand(N,1);

x = l1*cos(q1) + l2*cos(q1 + q2);
y = l1*sin(q1) + l2*sin(q1 + q2);

figure; scatter(x,y,1,'.');
axis equal; grid on;
title('Estimated workspace of planar 2R arm');
xlabel('x'); ylabel('y');
      

In later courses, the same sampling idea generalizes to higher-DOF arms, with \( f(\mathbf{q}) \) computed from full kinematics or simulators.

8. Problems and Solutions

Problem 1 (Planar 2R workspace). A planar 2R arm has link lengths \( \ell_1,\ell_2 \) and unlimited revolute joints. Show that its reachable workspace is \( \{ \mathbf{x}\in\mathbb{R}^2 \mid |\ell_1-\ell_2|\le \|\mathbf{x}\| \le \ell_1+\ell_2 \} \).

Solution. The two links and the vector to the endpoint form a triangle with sides \( \ell_1,\ell_2,r=\|\mathbf{x}\| \). A triangle exists iff the triangle inequality holds: \( r \le \ell_1+\ell_2 \) and \( r \ge |\ell_1-\ell_2| \). These inequalities are necessary for reachability. They are also sufficient because any such triangle can be rotated about the base to align with the direction of \( \mathbf{x} \). Hence the workspace is the annulus. □

Problem 2 (Dead zone condition). For a 2R planar arm, determine when the inner “dead zone” is nonempty.

Solution. The inner radius is \( r_{\min}=|\ell_1-\ell_2| \). A dead zone exists iff \( r_{\min} > 0 \), i.e., \( \ell_1 \neq \ell_2 \). If \( \ell_1=\ell_2 \), then \( r_{\min}=0 \) and the workspace includes the base point. □

Problem 3 (Planar 3R radial bounds). A planar 3R arm has link lengths \( \ell_1,\ell_2,\ell_3 \) with full rotations. Prove that any reachable point must satisfy \( r \le \ell_1+\ell_2+\ell_3 \), and give the tightest possible lower bound on \( r \).

Solution. The distance from base to endpoint is maximized when links align: \( r_{\max}=\ell_1+\ell_2+\ell_3 \), so all reachable points satisfy \( r \le r_{\max} \). For the lower bound, the endpoint can be as close as the largest link minus the sum of the other two, if that difference is positive. Let \( \ell_{\max}=\max(\ell_1,\ell_2,\ell_3) \) and \( s=\ell_1+\ell_2+\ell_3-\ell_{\max} \). By repeated triangle inequalities (viewing the three-link chain as combining two links at a time), the minimal radius is

\[ r_{\min} = \max(0,\, \ell_{\max}-s). \]

This bound is tight: if \( \ell_{\max}\le s \), links can fold to reach the base, so \( r_{\min}=0 \); otherwise they cannot fully fold, leaving a dead zone of radius \( \ell_{\max}-s \). □

Problem 4 (Effect of joint limits). For a planar 2R arm, suppose \( q_2\in[-\pi/3,\pi/3] \) while \( q_1 \) remains unlimited. Qualitatively describe how the annular workspace changes.

Solution. Limiting \( q_2 \) restricts elbow bending. The arm cannot fully fold or fully extend in all directions. The outer boundary shrinks in some directions (no straight alignment when \( q_2 \) cannot approach \( 0 \)), and the inner boundary expands (no tight folding when \( q_2 \) cannot approach \( \pm\pi \)). Because \( q_1 \) is free, the result remains rotationally symmetric if the \( q_2 \) limits are symmetric, but with a “thicker” dead zone and smaller max radius. □

9. Summary

We defined configuration space and workspace as sets linked by the end-effector map, introduced practical workspace notions (reachable, free, dexterous, service), and derived the classical annular workspace of a planar 2R arm using only triangle geometry. Finally, we showed how sampling in joint space provides a general, kinematics-light way to estimate workspaces under limits and constraints.

10. References

  1. Lozano-Pérez, T. (1983). Spatial planning: A configuration space approach. IEEE Transactions on Computers, C-32(2), 108–120.
  2. Burdick, J.W. (1988). Kinematic analysis and design of redundant robot manipulators. Journal of Robotic Systems, 5(5), 485–499.
  3. Gosselin, C., & Angeles, J. (1990). Singularity analysis of closed-loop kinematic chains. IEEE Transactions on Robotics and Automation, 6(3), 281–290.
  4. Roth, B. (1984). Performance evaluation of manipulators from a kinematic viewpoint. ASME Journal of Mechanisms, Transmissions, and Automation in Design, 106(3), 303–309.
  5. Tsai, L.-W. (1999). Workspace analysis of parallel manipulators. Mechanism and Machine Theory, 34(7), 923–956.
  6. Wenger, P., & Chablat, D. (2001). Workspace and assembly modes in fully parallel manipulators. Mechanism and Machine Theory, 36(11–12), 1307–1325.
  7. Merlet, J.-P. (2006). Jacobian, manipulability, and workspace in parallel robots: A unifying view. The International Journal of Robotics Research, 25(5–6), 575–589.