Section 5.7: Jacobians, singularities, manipulability

A Careful Control Loop
Big Picture

Jacobians, singularities, manipulability is one lens on kinematics and robot motion. We study it because an embodied agent needs decisions that survive contact with noisy sensors, delayed effects, and changing environments.

This section develops the technical contract for Jacobians, singularities, manipulability into a usable mental model. First we define the object of study, then we connect it to the agent loop, then we test it with a compact implementation.

The key question in Jacobians, singularities, manipulability is practical: what must the agent know, what can it observe, what action is available, and what evidence shows that the action worked under the stated conditions?

Action Is The Test

A representation earns its place when it changes the measurable action interface. In Jacobians, singularities, manipulability, the reader should keep asking which decision becomes easier, safer, or more reliable.

Theory

For Jacobians, singularities, manipulability, the practical design rule is to make the interface inspectable before optimization begins: inputs, outputs, units, latency, bounds, and failure labels should all be visible in the saved artifact.

The Jacobian is the local translator between joint velocity and task velocity: $\dot x=J(q)\dot q$. It says what the arm can do in the next instant, not what it can reach eventually. That local nature is why a robot can be far from a joint limit yet still be temporarily unable to move the tool in one direction.

Singularities appear when $J(q)$ loses rank. In that posture, some task-space direction requires unbounded or very large joint velocity. Manipulability summarizes the same issue as a safety margin: large singular values mean easy motion in the corresponding direction, while tiny singular values warn that control authority is collapsing.

Mechanism

The mechanism in Jacobians, singularities, manipulability is the contract between representation and action. Name what enters the module, what leaves it, which assumptions make that transformation valid, and which log would reveal a bad handoff.

Worked Example

The example computes the Jacobian of the planar two-link arm two ways, by finite differences of forward kinematics and analytically, confirms they agree, then sweeps the elbow toward full extension to watch the manipulability $w=\sqrt{\det(JJ^\top)}$ and smallest singular value collapse at the singularity.

import numpy as np

l1, l2 = 0.5, 0.4

def fk(q):
    x = l1*np.cos(q[0]) + l2*np.cos(q[0]+q[1])
    y = l1*np.sin(q[0]) + l2*np.sin(q[0]+q[1])
    return np.array([x, y])

def jac_analytic(q):
    s1, s12 = np.sin(q[0]), np.sin(q[0]+q[1])
    c1, c12 = np.cos(q[0]), np.cos(q[0]+q[1])
    return np.array([[-l1*s1 - l2*s12, -l2*s12],
                     [ l1*c1 + l2*c12,  l2*c12]])

def jac_finite_diff(q, eps=1e-6):
    J = np.zeros((2, 2))
    for i in range(2):
        dq = np.zeros(2); dq[i] = eps
        J[:, i] = (fk(q + dq) - fk(q - dq)) / (2*eps)
    return J

q = np.deg2rad([35.0, 60.0])
print("max |analytic - finite diff|:",
      f"{np.max(np.abs(jac_analytic(q) - jac_finite_diff(q))):.2e}")

def manipulability(q):
    J = jac_analytic(q)
    return np.sqrt(max(np.linalg.det(J @ J.T), 0.0))

print(" elbow(deg)  w=sqrt(det(JJ^T))  sigma_min")
for q2_deg in [90, 30, 10, 2, 0]:
    q = np.deg2rad([35.0, q2_deg])
    sigma = np.linalg.svd(jac_analytic(q), compute_uv=False)
    print(f"   {q2_deg:4d}        {manipulability(q):.5f}        {sigma.min():.5f}")
# As the elbow straightens (q2 -> 0), w and sigma_min -> 0: a singularity.

The finite-difference cross-check certifies the analytic Jacobian on one posture; the sweep shows why manipulability is a usable early-warning signal. A controller that asks for fast Cartesian motion at $q_2\approx 0$ demands near-infinite joint velocity, so damping or task relaxation must engage before the singular value reaches the configured margin.

Library Shortcut

The Jacobian fragment should show how joint velocity becomes task-space velocity and how singular values warn about lost authority. Pinocchio and Drake compute derivatives at scale; the hand check keeps units and frames honest.

Practical Recipe

  1. Write the observation, action, and success metric before choosing a model.
  2. Build a baseline that is simple enough to debug by inspection.
  3. Add the library implementation only after the baseline behavior is understood.
  4. Record failures as structured cases: perception error, state error, planning error, control error, or evaluation error.
  5. Run at least one perturbation test before trusting the result.
Common Failure Mode

The common mistake in Jacobians, singularities, manipulability is to celebrate the component score before checking the closed-loop handoff. The failure usually appears at the boundary: stale state, wrong frame, delayed action, saturated actuator, or metric that ignores the real task cost.

Practical Example

A robotics team using Jacobians, singularities, manipulability should log not only final success, but intermediate observations, chosen actions, controller status, and recovery events. The logs reveal whether the method is solving the task or merely passing the easiest episodes.

Memory Hook

For jacobians, singularities, manipulability, the useful test is simple: could a teammate point to the log line, plot, or trace that proves the idea changed the agent's next action?

Research Frontier

For Jacobians, singularities, manipulability, treat frontier claims as hypotheses until they expose enough detail to reproduce the result: data boundary, embodiment, controller interface, evaluation panel, and failure cases.

Self Check

Can you name the observation, state estimate, action, success metric, and most likely failure mode for Jacobians, singularities, manipulability? If not, the system boundary is still too vague.

Production Pattern

Jacobians, singularities, manipulability sits inside the Part II robotics contract: geometry defines where things are, kinematics defines what motion is possible, dynamics defines what motion costs, control defines how errors are corrected, and sensing defines what the agent can know on time.

Track Jacobian rank, singular values, and manipulability before asking a controller for high task-space speed. This makes the section useful to students, builders, and researchers at the same time: the idea has an intuitive role, a formal interface, a runnable check, and a failure mode that can be reproduced.

Mechanism To Watch

For Jacobians, singularities, manipulability, kinematics maps joint or body motion into task-space motion without explaining forces. Preserve joint limits, frame conventions, velocity units, and singularity margins in the artifact.

Library Choices And Verification Checks
Tool or LibraryWhat It HandlesVerification Check
Pinocchiocomputes articulated-body kinematics, dynamics, and derivativesVerify model frames, joint ordering, and derivative convention against the URDF.
Robotics Toolbox for Pythonsupports practical work on Jacobians, singularities, manipulabilityVerify the library output against the hand-built baseline on one small case.
MoveIt 2supports practical work on Jacobians, singularities, manipulabilityVerify the library output against the hand-built baseline on one small case.
Drakemodels dynamical systems, multibody plants, optimization, and controllersVerify scalar type, plant finalization, frame convention, and solver status.
ROS 2 controlsupports practical work on Jacobians, singularities, manipulabilityVerify the library output against the hand-built baseline on one small case.

Use this recipe when turning Jacobians, singularities, manipulability into code, a simulator experiment, or a robot diagnostic. The point is not to use every library. The point is to keep the hand-built baseline and the maintained-tool path comparable.

  1. Write the joint vector, frame target, velocity convention, and constraint set before solving.
  2. Check forward kinematics on a known posture, then perturb one joint and inspect the end-effector delta.
  3. Compare an analytic or numerical Jacobian with Pinocchio, Robotics Toolbox, or Drake on the same robot model.
  4. Log residual error, joint-limit distance, manipulability, and solver iteration count in one artifact.
  5. Treat singularities and infeasible targets as design signals, not as solver annoyances.
Evidence Gate

For Jacobians, singularities, manipulability, compare methods only through one saved artifact that preserves the inputs, outputs, units, timestamps, latency budget, configuration, seed, metric definition, and failure labels relevant to this section. The comparison is meaningful only when the same script evaluates the same panel.

Exercise Extension

Extend the section exercise by adding one perturbation specific to Jacobians, singularities, manipulability and one latency or uncertainty check. Save the result in the EvidenceRecord schema, then explain which library output you trust and why.

Kinematic failures often arrive as a plausible pose with an impossible motion. Inspect Jacobian rank, singular values, task frame, joint velocity limits, and whether the task has fewer or more dimensions than the joints before blaming the planner. For this section, first reproduce one small Jacobian by finite differences, then rerun it through Pinocchio, Robotics Toolbox for Python, MoveIt 2, or Drake. If the two disagree, inspect conventions and timing before changing the model.

Technical Core

Jacobians, singularities, manipulability needs a topic-native core: variables, equations or system contracts, an algorithmic procedure, an expected output, and a failure diagnosis. Figure 5.7.T summarizes the chain this section must preserve when moving from a teaching example to a real embodied system.

Technical core for Jacobians, singularities, manipulability A block diagram connecting assumptions, model, algorithm, evidence, and failure analysis for Jacobians, singularities, manipulability. Assumptions frames, units, limits Model kinematics and robot motion Algorithm update or plan Evidence trace, metric Failure diagnosis Graduate-depth contract: define variables, run the method, interpret output, and explain when it fails. This diagram marks the minimum technical chain the section must make explicit.
Figure 5.7.T: The technical core for Jacobians, singularities, manipulability connects assumptions, model, algorithm, evidence, and failure analysis.
Formal Object

$\dot x=J(q)\dot q,\quad J=U\Sigma V^\top,\quad \kappa(J)=\sigma_{\max}/\sigma_{\min},\quad w(q)=\sqrt{\det(JJ^\top)}$

The singular values in $\Sigma$ describe the lengths of the manipulability ellipsoid axes. When $\sigma_{\min}$ approaches zero, motion in the corresponding task direction becomes expensive or impossible, so damping and task relaxation become safety tools rather than numerical decorations.

Jacobian health diagnostic
  1. Compute $J(q)$ in the same frame used by the task velocity or pose residual.
  2. Run an SVD and log rank, $\sigma_{\min}$, $\sigma_{\max}$, condition number, and manipulability.
  3. Compare analytic Jacobian columns against finite differences of forward kinematics on one known posture.
  4. Before commanding high task-space speed, scale or damp commands when $\sigma_{\min}$ falls below the configured margin.
Technical Contract For Jacobians, singularities, manipulability
Contract FieldWhat To SpecifyWhy It Matters
State and observationVariables, units, timestamps, frames, and uncertainty.Prevents a model score from being mistaken for robot capability.
Action interfaceCommand type, limits, update rate, and safety fallback.Makes the learned or planned output executable.
Evidence artifactTrace, metric, configuration, seed, and failure label.Allows baseline and library path to be compared in one pass.
Tool pathModern Robotics, Pinocchio, Drake, ROS 2 tf2, MoveIt, NumPyShows the practical library route after the mechanism is understood.

Expected output is a Jacobian diagnostic trace with stable rank away from singularities, a finite condition number, and singular-value warnings before the controller saturates. A manipulability score is useful only when it is reported with the task frame and the relevant velocity limits.

Failure Mode To Test

A Jacobian result fails when a geometric Jacobian is compared to an analytic one without conversion, finite-difference steps are too large or too small, singular values collapse near a stretched-arm posture, or damping hides an infeasible task without reporting the residual.

Section References

Core references for Jacobians, singularities, manipulability: Modern Robotics; Murray, Li, and Sastry; Siciliano et al.; LaValle; and official documentation for Drake, MuJoCo, Pinocchio, CasADi, python-control, GTSAM, ROS 2, and OpenCV as applicable.

Use these references to check notation, frame conventions, units, solver assumptions, and maintained-library behavior.

Key Takeaway

Jacobians, singularities, manipulability is useful when it makes the perception-action loop more reliable, not when it merely adds a more impressive model name.

Exercise 5.7.1

Design a method-matched experiment for Jacobians, singularities, manipulability. Specify the environment, observations, actions, metric, one perturbation, and the library output you would compare against the hand-built baseline.