Differentiable simulation of soft continuum manipulators with implicit internal cable routing, built on the SoRoSim (Soft Robotics Simulator) toolbox. Given a set of cable entry/exit ports, the cable's path through the manipulator is solved for implicitly (as part of the static equilibrium) rather than prescribed, and the whole pipeline is differentiable end-to-end (analytical Jacobians throughout).
ImplicitRouting/
├── SoRoSim_Toolbox/ Shared library - one copy used by every project below
│ ├── Basic_functions/ Screw-theory / Lie-group primitives, MEX-accelerated kinematics
│ ├── SorosimLink_files/ SorosimLink class (rigid/soft link definition)
│ ├── SorosimLinkage_files/ SorosimLinkage class (statics, dynamics, plotting, actuation)
│ └── SorosimRod_files/ SorosimRod class (Cosserat rod strain bases)
│
├── Single Section Single Cable ParID/ Parameter identification: fits section stiffness (c1..c5)
│ from marker-tracked routing experiments
├── Single Section Single Cable Simulation/ Implicit-routing statics demo, mesh-convergence and
│ solver-tolerance studies (no experiment data required)
├── Single Section Three Cables IKS/ Inverse kinetostatics: solves cable inputs to achieve a
│ sequence of desired tool-tip pointing directions
└── Two Sections Two Cables Simulation/ Two-section, two-cable manipulator statics demo
Every project folder is self-contained (its own driver script(s), model
.mat files, Custom/ actuation hooks, startup.m, and ReadMe.txt) and
only depends on the single shared SoRoSim_Toolbox/ next to it — see each
project's own ReadMe.txt for its specific workflow.
- MATLAB (developed/tested on Windows; not verified on macOS/Linux)
- Optimization Toolbox (
fmincon,fsolve) - MATLAB Coder — only needed to (re)build the MEX-accelerated kinematics functions, see below
- Clone the repository.
cdinto whichever project folder you want to run (e.g.Single Section Single Cable Simulation/) and runstartup.m. This adds the sharedSoRoSim_Toolbox/(resolved relative to the project folder, so it works regardless of MATLAB's current directory) plus that project's ownCustom/folder to the path.- Run one of that project's driver scripts (e.g.
driver.m). See the project's ownReadMe.txtfor what's available and its user-option flags.
The kinematics functions used in the inner solver loop are pre-compiled to
MEX for speed. The compiled *.mexw64 binaries are not committed to this
repository (they're platform- and MATLAB-version-specific build artifacts —
see .gitignore), so the first time you use this repository, or after a
MATLAB update / on a new machine, you need to build them yourself:
cd SoRoSim_Toolbox/Basic_functions
converttoMEXThis uses MATLAB Coder (codegen) to compile the functions listed inside
converttoMEX.m and drops the resulting *_mex.mexw64 files alongside the
.m sources in Basic_functions/, where every project's startup.m will
find them automatically. If any driver script errors with something like
Undefined function 'RigidJointKinematics_mex' or a MEX-related error, this
is almost always the fix — re-run converttoMEX.m.
If you use this code in your research, please cite:
@article{mathew2026irouting,
author = {Mathew, Anup Teejo and Alkayas, Abdulaziz Y. and Alshehhi, Ahmed A. S. and Adamu, Yusuf A. and Taha, Tarek and Renda, Federico},
title = {A Differentiable Framework for Hollow Tendon-Driven Continuum Robots With Implicit Internal Routing},
journal = {IEEE Transactions on Robotics},
year = {2026},
doi = {10.1109/TRO.2026.3714660},
keywords = {Continuum robot, differentiable simulation, optimization, tendon-driven continuum robots}
}Anup Teejo Mathew 📧 anup.mathew@ku.ac.ae · anupteejo@gmail.com
