Skip to content

generalroboticslab/sym2real

Repository files navigation

Sym2Real: Symbolic Dynamics with Residual Learning for Data-Efficient Adaptive Control

Python Version CUDA Version Ubuntu

Easop Lee, Samuel A. Moore, and Boyuan Chen
Duke University

This repository provides a modular framework for symbolic dynamics model-based control, integrating dynamics models, controllers, and algorithms. This also includes Mujoco simulation environments. This repository is to be concurrently used with real robot repositories.

Sym2Real LED Painting Sym2Real Teaser

📑 Contents

🛠️ Installation

conda create -n sym2real python==3.10
conda activate sym2real

pip install -r installation/requirements.txt
source installation/setup.sh

🚀 Quickstart

This runs our method (1. base model, 2. adaptation) in MuJoCo simulation environments.

Our repository is handled by hydra. Custom hydra parameters are located under the conf folder. The parameters can be changed at run time by specifying them in the terminal.

▶️ Run Base Model (e.g. Symbolic Regression on Crazyflie)

python main.py \
    dynamics_model="symbolic_regression" \
    overrides="pets_crazyflie" \
    env_params="crazyflie" \
    root_dir="exp_results/base_exps/"

🪄 Run Residual Model (e.g. Symbolic Regression + Residual MLP on Crazyflie)

python main.py \
    dynamics_model="residual_mlp" \
    dynamics_model.model_a="symbolic_regression" \
    dynamics_model.model_a_path="{path_to_sr_base_model_experiment}" \
    overrides="pets_crazyflie" \
    env_params="crazyflie" \
    env_params.wind_x=8 \
    env_params.wind_y=4 \
    root_dir="exp_results/res_exp/"

⚙️ Available configurations

All available hydra parameters are under the conf/ folder.

conf/
├── dynamics_model
│   ├── symbolic_regression
│   ├── gaussian_mlp_ensemble
│   ├── residual_mlp          # requires base model type & its saved path as shown above
│   └── residual_sr           # requires base model type & its saved path as shown above
│
├── env_params
│   ├── crazyflie
│   └── mushr
│
├── overrides
│   ├── pets_crazyflie
│   └── pets_mushr
│
└── controller
    ├── cem
    ├── mppi
    └── spline_mppi

🤖 Hardware

This repository contains the core training, modeling, and controller scripts for our experiments, along with the simulation environments used for base experiments and sim2sim transfers.

For sim2real experiments, hardware-specific communication components are located in separate repositories. These external scripts can directly call all main scripts from this repository.

For real-world hardware experiments, please:

Citation

If you find our paper or codebase helpful, please consider citing:

@misc{lee2025sym2realsymbolicdynamicsresidual,
      title={Sym2Real: Symbolic Dynamics with Residual Learning for Data-Efficient Adaptive Control}, 
      author={Easop Lee and Samuel A. Moore and Boyuan Chen},
      year={2025},
      eprint={2509.15412},
      archivePrefix={arXiv},
      primaryClass={cs.RO},
      url={https://arxiv.org/abs/2509.15412}, 
}

📚 Acknowledgement

This work was supported by ARO under award W911NF2410405 and DARPA TIAMAT program under award HR00112490419.

We also acknowledge the reference to the following codebase:

  1. MBRL-Lib: A Modular Library for Model-based Reinforcement Learning
  2. DATT: Deep Adaptive Trajectory Tracking for Quadrotor Control

About

Official repo for Sym2Real: Symbolic Dynamics with Residual Learning for Data-Efficient Adaptive Control

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published