Official implementation of:
- Learning-Based Dynamics Modeling and Robust Control for Tendon-Driven Continuum Robots — arXiv:2604.25691
- Reference-Augmented Learning for Precise Tracking Policy of Tendon-Driven Continuum Robots — arXiv:2604.25698
ContinuumControl is a differentiable learning framework for tendon-driven continuum robots (TDCRs) that integrates high-fidelity dynamics modeling with robust neural control.
📄 Paper: arXiv:2604.25691 | 🎬 Video: Bilibili
TDCRs pose significant modeling and control challenges due to complex nonlinearities such as frictional hysteresis and transmission compliance. Our framework addresses these through two core components:
- Dynamics Model: A GRU-based recurrent model with bidirectional multi-channel connectivity and residual prediction that effectively suppresses compounding errors during long-horizon auto-regressive prediction.
- Control Policy: An end-to-end neural policy optimized by backpropagating tracking errors through the differentiable dynamics model, which implicitly internalizes compensation for intricate nonlinearities.
Dynamics Prediction (arXiv:2604.25691)
Long-horizon auto-regressive prediction across a 2.5-minute random trajectory. Our model (red solid) maintains the lowest position error with the slowest error accumulation rate.
Tracking Performance (arXiv:2604.25698)
Average Tracking Errors (Position mm / Orientation °)
| Speed | Ours (Pos-only) | Ours | Feedforward | Feedback | Hybrid |
|---|---|---|---|---|---|
| 1.0× | 9.8 / - | 12.5 / 4.9° | 159.1 / 16.4° | 46.6 / 26.5° | 24.5 / 23.1° |
| 1.7× | 13.4 / - | 14.0 / 6.4° | 159.0 / 16.5° | 62.8 / 23.7° | 33.0 / 21.9° |
| 2.5× | 17.3 / - | 19.0 / 6.9° | 159.1 / 16.4° | 79.6 / 22.8° | 43.6 / 20.9° |
Tracking performance on letter-shaped trajectories at 1.0× speed. Our policy (red) achieves superior precision compared to the Jacobian-based controller (green).
The dynamics model recurrently predicts the next observation given the current observation and control input, formulated as:
h_{t+1} = f_θ(h_t, o_t, u_t)
Δô_t = g_ψ(h_{t+1})
ô_{t+1} = o_t + Δô_t
where o = (l, v, p, φ) concatenates motor lengths, velocities, and end-effector position and rotation vector. The residual formulation captures the underlying physical continuity and significantly suppresses error accumulation.
The training pipeline consists of two phases:
- Inference phase: Ground-truth observations and controls are sequentially fed into the GRU to warm up the hidden state
h. - Auto-regressive phase: The model performs multi-step rollouts where both the hidden states and predicted observations are fed back, with prediction loss backpropagated through time.
Traditional Jacobian-based controllers treat the TDCR as a quasi-static system (u = J†(ṙ + Ke)), which fails under hysteresis and compliance. Our policy leverages the hidden state h from the dynamics model as latent temporal context, transforming the non-Markovian physical process into a well-conditioned tracking task:
Δa_t = π_μ(o_t, h_t, a_{t-1}, r_t)
where r_t is a look-ahead reference of N_r future steps. The policy is optimized by minimizing a tracking cost through BPTT:
min_μ J(μ) = E[ Σ λ^{i-1} ( ||T̂_{t+i} - T*_{t+i}||² + α||Δa_{t+i-1}||² ) ]
To prevent overfitting to specific trajectories in the offline dataset, a multi-scale reference augmentation scheme is applied during policy training. The augmented reference is generated by superimposing three stochastic components onto the ground-truth state sequence:
- Stochastic bias:
δ^bias ~ U(-A_b, A_b)— captures static coordinate shifts. - Harmonic perturbation:
δ^sine = A_s · sin(2πf·i + φ)— simulates low-frequency dynamic drifts and forces the policy to compensate for phase lags and hysteresis loops. - Random walk:
δ^step = Σ m_k · w_k— models cumulative drift and sudden setpoint changes.
A masked mixing strategy further decouples the policy's dependency on specific trajectory shapes by randomly switching between following a time-varying path and maintaining a static setpoint.
ContinuumControl/
├── config/ # Model and training configurations (YAML)
│ ├── models_config.yaml
│ ├── training_config.yaml
│ └── parser.py # Hierarchical YAML config parser
├── data/
│ ├── description.txt # Dataset column description
│ ├── analysis/ # Data preprocessing, visualization, and statistics
│ └── samples_dataset/ # Sample dataset (raw CSV logs)
├── models/
│ ├── dynamics.py # Dynamics model
│ ├── policy.py # Policy model
│ ├── networks/ # Network architectures (MLP, RNN, GRU, LSTM)
│ └── tools/ # Get network, normalization, weight initialization
├── train/
│ ├── trainer.py # DynamicsTrainer and PolicyTrainer
│ ├── data_loader.py # H5 Dataset and DataLoader
│ ├── offline_train.py # Offline training script
│ ├── online_train.py # Online training with real robot (socket)
│ ├── online_train_control.py # Online training with control loop
│ ├── mpc_train/ # MPC-based policy optimization
│ └── tools/ # Loss functions, plotting, model export, 3D transforms
├── outcome/ # Training output figures (.gitignored)
├── environment.yml
└── LICENSE
conda env create -f environment.yml
conda activate continuumDependencies: Python 3.10, PyTorch 2.4.1 (CUDA 12.1), numpy, pandas, scipy, h5py, matplotlib, wandb.
Raw data is stored as CSV log files under data/<data_source>/logs/. Each CSV file contains time-series data recorded from the continuum robot, including:
- End-effector pose (4×4 transformation matrix, flattened)
- Motor lengths, velocities, and torques (9 tendons)
- Motor velocity control commands (9 tendons)
- Marker positions (11 markers, optional)
See data/description.txt for the full column specification.
python -m data.analysis.pre_processThis converts raw CSV logs into HDF5 files with computed features (rotation vectors, deltas, reference trajectories, etc.).
Train a dynamics model:
python train/offline_train.pyTrain a policy model:
python train/offline_train.pyOptimize control sequences using a learned dynamics model:
python train/mpc_train/mpc_run.pyExport trained models to TorchScript for deployment:
python -m train.tools.export_modelAll hyperparameters are managed via YAML configs:
config/models_config.yaml— Model architecture, observation types, normalization statisticsconfig/training_config.yaml— Training hyperparameters, loss weights, data sources, online settings
Observation type strings (e.g., "Tlv") define which quantities the model observes:
T— End-effector transform (rotation vector + position)l— Motor lengthsv— Motor velocitiesq— Motor torques
If you find this work useful, please cite our papers:
@article{zou2026dynamics,
title={Learning-Based Dynamics Modeling and Robust Control for Tendon-Driven Continuum Robots},
author={Ziqing Zou and Ke Qiu and Fei Wang and Haojian Lu and Rong Xiong and Yue Wang},
journal={arXiv preprint arXiv:2604.25691},
year={2026}
}
@article{zou2026reference,
title={Reference-Augmented Learning for Precise Tracking Policy of Tendon-Driven Continuum Robots},
author={Ziqing Zou and Ke Qiu and Haojian Lu and Rong Xiong and Yue Wang},
journal={arXiv preprint arXiv:2604.25698},
year={2026}
}This project is licensed under the MIT License — see the LICENSE file for details.




