Part 5: Robotics in the Real World
Welcome to Part 5 of "Robotics Zero to Hero." We've covered the clean mathematics of kinematics and dynamics. But moving from a perfect Python simulation to physical hardware introduces an entirely new adversary: reality.
The Reality Gap
In simulation, joints go exactly where commanded. In reality, several effects open up the Sim-to-Real Gap — formally, a distribution shift between the simulator's dynamics and the world's :
- Friction and stiction. A realistic joint torque includes Coulomb, viscous, and Stribeck terms:
The discontinuity at is what makes friction so hard to model and control near rest. 2. Backlash. Gear "play" means the motor turns a small dead-band angle before the link moves — a hysteresis nonlinearity no rigid model predicts. 3. Sensor noise. Encoders and cameras feed the controller noisy, quantized, latent data. 4. Payload variation. Pick up a heavy object and the inertia matrix from Part 4 changes instantly — your carefully-identified model is now wrong.
Closing the gap: competing strategies
There is no single fix; the field uses a portfolio of methods, each with a characteristic weakness:
| Strategy | Idea | Shortcomings |
|---|---|---|
| System Identification | Fit model parameters to real data via least squares | Only as good as the excitation trajectory; unmodeled effects leak into estimates |
| Domain Randomization | Train over a distribution of sim parameters so reality looks like one more sample | Over-randomizing yields conservative, sluggish policies; hard to pick ranges |
| Domain Adaptation / Real2Sim | Learn the residual from real rollouts | Needs real data; can overfit to the collection setup |
| Robust control (, sliding mode) | Guarantee stability over a bounded uncertainty set | Worst-case design sacrifices nominal performance; chattering |
| Adaptive control | Update parameters online (exploits linearity-in-parameters, Part 4) | Needs persistent excitation; transient behavior can be poor |
Domain randomization deserves special mention: by exploiting the linearity-in-parameters structure from Part 4, we can either identify or randomize over it. The seminal result (Tobin et al., arXiv:1703.06907) showed a vision model trained purely on randomized simulation transferring to the real world with no real images at all.
Internet AI vs. Embodied AI
As Professor Jitendra Malik points out, much of modern AI is "Internet AI" — it learns passively from massive static datasets of text and images scraped from the web (think large language and image models).
Robotics demands "Embodied AI." An embodied agent learns by actively perceiving, moving, and interacting in a 3D world, where its own actions change the data it sees — a feedback loop Internet AI never experiences. Because we cannot train millions of times on physical hardware without destroying the robot, bridging the gap relies on high-fidelity simulators (e.g. AI Habitat, Isaac Sim, MuJoCo) where agents practice in photorealistic, physically-plausible worlds before deployment.
Industrial Cobots and Safety Protocols
Historically, industrial robots were massive, fast, and dangerous — caged to keep humans out. The modern paradigm is the Collaborative Robot (Cobot), designed to share space with people. This requires tight hardware/software integration with safety standards (ISO/TS 15066):
- Force/torque limiting. Cobots watch joint torques; an unexpected spike (a collision with a human) triggers an immediate halt. This is enabled by accurate dynamics: to detect an external torque you must predict the expected internal torque and flag the residual.
- Speed and separation monitoring. Using LiDAR or depth cameras, the robot slows as a human approaches and stops within a defined radius.
Focus on the Octopus: Mechanical Design and Aging
Building a metallic continuum octopus forces us to rethink mechanical design.
A standard robot puts a heavy motor at every joint. Put a motor in every segment of a tentacle and it becomes too heavy to lift itself — the payload-to-weight ratio collapses.
The cable-driven approach
We instead use a cable-driven (tendon-driven) architecture: heavy motors stay in the stationary base (the head), and cables run through the hollow segments to the tips. Pulling specific cables induces curvature, bending and twisting the tentacle while keeping it light and fast.
The price is a brutal amplification of the sim-to-real gap. The map from actuator space (cable lengths ) to configuration space (curvatures ) is nonlinear and state-dependent:
Cables stretch under load and rub against segment walls (capstan-effect friction grows exponentially with the wrap angle), so the same cable pull produces different curvature depending on pose and history.
Aging and recalibration
Hardware degrades. Steel tendons slowly stretch after thousands of actuation cycles, and friction coefficients drift as internal surfaces wear — hardware aging. A controller that assumes a brand-new robot will see its accuracy decay over months.
The fix is continuous recalibration: comparing the model-predicted motion against the measured motion (vision or proprioception) and updating the internal parameters online — a recursive least-squares / Kalman-style estimator running in the background. This is adaptive control (above) applied to an aging body, and it is what keeps millimeter precision over the robot's lifetime.
High-dim vs. low-dim, restated for calibration
Calibration scales badly with dimension. A 6-DOF arm has a handful of kinematic parameters to identify; a tentacle modeled as segments has curvature maps, each with stretch and friction terms — and they interact. The more degrees of freedom, the more parameters drift, and the more essential continuous self-calibration becomes. High-dimensional robots are not just harder to control — they are harder to keep honest.
In Part 6 we introduce Singular Perturbation, the mathematical tool for managing the multi-time-scale dynamics this hardware produces.
Further reading: Tobin et al. (arXiv:1703.06907) on domain randomization; Siciliano & Khatib (eds.), "Springer Handbook of Robotics" for friction/identification; the capstan equation for tendon friction.
Interested in the research?
We collaborate with researchers, engineers, and institutions pushing Physical AI into extreme environments. Get in touch to explore working with the lab.
Collaborate with us