# iit-dlslab/sim2real-robot-identification architecture

> Architecture diagram of the GitHub repository iit-dlslab/sim2real-robot-identification, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/iit-dlslab/sim2real-robot-identification
- Repository: https://github.com/iit-dlslab/sim2real-robot-identification

## Overview

This repository identifies robot dynamics and motor parameters using real-robot recordings and either MuJoCo or IsaacLab/Pace simulation. The main workflow is to configure a robot, collect joint-state and control data through ROS 2, then fit parameters against that recording and inspect the resulting report or robot model. It also supports replaying and plotting recordings and maintains models for several robots. The graph reflects the README and sampled entry points; wiring inside unsampled fitting and replay code is left out where it cannot be established.

Main entry points: [`sysid_mujoco/my_fit.py`](https://github.com/iit-dlslab/sim2real-robot-identification/blob/main/sysid_mujoco/my_fit.py) (MuJoCo fitter), [`sysid_isaaclab/my_fit.py`](https://github.com/iit-dlslab/sim2real-robot-identification/blob/main/sysid_isaaclab/my_fit.py) (IsaacLab fitter), [`datasets`](https://github.com/iit-dlslab/sim2real-robot-identification/tree/main/datasets) (Trajectory recordings), [`run_collection_quadruped_ros2.py`](https://github.com/iit-dlslab/sim2real-robot-identification/blob/main/run_collection_quadruped_ros2.py) (ROS collectors)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_collection["Data collection"]
  node_collection_scripts["ROS collectors"]
  node_manipulator_collector["Manipulator collector"]
  node_ros_interface["ROS messages<br/>[BlindState.msg]"]
  node_settings["Robot settings<br/>[config.py]"]
end

subgraph group_calibration["Parameter fitting"]
  node_mujoco_fit["MuJoCo fitter<br/>[my_fit.py]"]
  node_mujoco_common["MuJoCo utilities<br/>[common.py]"]
  node_fit_report["Fit report<br/>[my_fit.py]"]
  node_isaac_fit["IsaacLab fitter<br/>[my_fit.py]"]
  node_isaac_tasks["Pace robot tasks"]
end

subgraph group_models["Robot assets"]
  node_robot_models["Robot models"]
  node_identified_params["Identified parameters"]
end

subgraph group_inspection["Dataset inspection"]
  node_replay_quad["Quadruped replay"]
  node_replay_arm["Manipulator replay"]
  node_plotter["Trajectory plotter"]
end

node_operator(("Operator"))
node_robot{{"Physical robot"}}
node_datasets[("Trajectory recordings")]
node_mujoco_engine{{"MuJoCo"}}
node_pace{{"Pace Sim2Real"}}
node_isaaclab{{"IsaacLab simulator"}}

node_operator -->|"starts collection"| node_collection_scripts
node_operator -->|"starts collection"| node_manipulator_collector
node_collection_scripts -->|"reads settings"| node_settings
node_manipulator_collector -->|"reads settings"| node_settings
node_collection_scripts -->|"uses messages"| node_ros_interface
node_manipulator_collector -->|"uses messages"| node_ros_interface
node_robot -->|"sends state"| node_collection_scripts
node_collection_scripts -->|"sends control"| node_robot
node_robot -->|"sends state"| node_manipulator_collector
node_manipulator_collector -->|"sends control"| node_robot
node_collection_scripts -->|"writes recordings"| node_datasets
node_manipulator_collector -->|"writes recordings"| node_datasets
node_operator -->|"runs fit"| node_mujoco_fit
node_mujoco_fit -->|"reads recordings"| node_datasets
node_mujoco_fit -->|"uses utilities"| node_mujoco_common
node_mujoco_fit -->|"selects model"| node_robot_models
node_mujoco_fit -->|"fits parameters"| node_mujoco_engine
node_mujoco_fit -->|"generates report"| node_fit_report
node_operator -->|"runs fit"| node_isaac_fit
node_isaac_fit -->|"reads recording"| node_datasets
node_isaac_fit -->|"loads task"| node_isaac_tasks
node_isaac_fit -->|"uses environment"| node_pace
node_isaac_fit -->|"steps simulation"| node_isaaclab
node_isaac_tasks -->|"loads robot asset"| node_robot_models
node_isaac_fit -->|"estimates parameters"| node_identified_params
node_operator -->|"replays recording"| node_replay_quad
node_operator -->|"replays recording"| node_replay_arm
node_operator -->|"plots recording"| node_plotter
node_replay_quad -->|"reads recording"| node_datasets
node_replay_arm -->|"reads recording"| node_datasets
node_plotter -->|"reads recording"| node_datasets

click node_collection_scripts "https://github.com/iit-dlslab/sim2real-robot-identification/blob/main/run_collection_quadruped_ros2.py"
click node_manipulator_collector "https://github.com/iit-dlslab/sim2real-robot-identification/blob/main/run_collection_manipulator_ros2.py"
click node_ros_interface "https://github.com/iit-dlslab/sim2real-robot-identification/blob/main/ros2_ws/src/dls2_interface/msg/BlindState.msg"
click node_settings "https://github.com/iit-dlslab/sim2real-robot-identification/blob/main/config.py"
click node_datasets "https://github.com/iit-dlslab/sim2real-robot-identification/tree/main/datasets"
click node_mujoco_fit "https://github.com/iit-dlslab/sim2real-robot-identification/blob/main/sysid_mujoco/my_fit.py"
click node_mujoco_common "https://github.com/iit-dlslab/sim2real-robot-identification/blob/main/sysid_mujoco/common.py"
click node_fit_report "https://github.com/iit-dlslab/sim2real-robot-identification/blob/main/sysid_mujoco/my_fit.py"
click node_isaac_fit "https://github.com/iit-dlslab/sim2real-robot-identification/blob/main/sysid_isaaclab/my_fit.py"
click node_isaac_tasks "https://github.com/iit-dlslab/sim2real-robot-identification/tree/main/sysid_isaaclab/tasks"
click node_robot_models "https://github.com/iit-dlslab/sim2real-robot-identification/tree/main/robot_model"
click node_identified_params "https://github.com/iit-dlslab/sim2real-robot-identification/blob/main/robot_model/go2/isaaclab_identified_parameters.py"
click node_replay_quad "https://github.com/iit-dlslab/sim2real-robot-identification/blob/main/datasets/replay_dataset_quadruped.py"
click node_replay_arm "https://github.com/iit-dlslab/sim2real-robot-identification/blob/main/datasets/replay_dataset_manipulator.py"
click node_plotter "https://github.com/iit-dlslab/sim2real-robot-identification/blob/main/datasets/plot_joint_trajectories.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_collection_scripts,node_manipulator_collector,node_ros_interface,node_settings toneBlue
class node_mujoco_fit,node_mujoco_common,node_fit_report,node_isaac_fit,node_isaac_tasks,node_datasets toneAmber
class node_robot_models,node_identified_params toneMint
class node_replay_quad,node_replay_arm,node_plotter toneRose
class node_operator,node_robot,node_mujoco_engine,node_pace,node_isaaclab toneIndigo
```

## Components

### Data collection

- [ROS collectors](https://github.com/iit-dlslab/sim2real-robot-identification/blob/main/run_collection_quadruped_ros2.py): `run_collection_quadruped_ros2.py`
- [Manipulator collector](https://github.com/iit-dlslab/sim2real-robot-identification/blob/main/run_collection_manipulator_ros2.py): `run_collection_manipulator_ros2.py`
- [ROS messages](https://github.com/iit-dlslab/sim2real-robot-identification/blob/main/ros2_ws/src/dls2_interface/msg/BlindState.msg): `ros2_ws/src/dls2_interface/msg/BlindState.msg`
- [Robot settings](https://github.com/iit-dlslab/sim2real-robot-identification/blob/main/config.py): `config.py`

### Parameter fitting

- [MuJoCo fitter](https://github.com/iit-dlslab/sim2real-robot-identification/blob/main/sysid_mujoco/my_fit.py): `sysid_mujoco/my_fit.py`
- [MuJoCo utilities](https://github.com/iit-dlslab/sim2real-robot-identification/blob/main/sysid_mujoco/common.py): `sysid_mujoco/common.py`
- [Fit report](https://github.com/iit-dlslab/sim2real-robot-identification/blob/main/sysid_mujoco/my_fit.py): `sysid_mujoco/my_fit.py`
- [IsaacLab fitter](https://github.com/iit-dlslab/sim2real-robot-identification/blob/main/sysid_isaaclab/my_fit.py): `sysid_isaaclab/my_fit.py`
- [Pace robot tasks](https://github.com/iit-dlslab/sim2real-robot-identification/tree/main/sysid_isaaclab/tasks): `sysid_isaaclab/tasks`

### Robot assets

- [Robot models](https://github.com/iit-dlslab/sim2real-robot-identification/tree/main/robot_model): `robot_model`
- [Identified parameters](https://github.com/iit-dlslab/sim2real-robot-identification/blob/main/robot_model/go2/isaaclab_identified_parameters.py): `robot_model/go2/isaaclab_identified_parameters.py`

### Dataset inspection

- [Quadruped replay](https://github.com/iit-dlslab/sim2real-robot-identification/blob/main/datasets/replay_dataset_quadruped.py): `datasets/replay_dataset_quadruped.py`
- [Manipulator replay](https://github.com/iit-dlslab/sim2real-robot-identification/blob/main/datasets/replay_dataset_manipulator.py): `datasets/replay_dataset_manipulator.py`
- [Trajectory plotter](https://github.com/iit-dlslab/sim2real-robot-identification/blob/main/datasets/plot_joint_trajectories.py): `datasets/plot_joint_trajectories.py`

### Other components

- **Operator**
- **Physical robot**
- [Trajectory recordings](https://github.com/iit-dlslab/sim2real-robot-identification/tree/main/datasets): `datasets`
- **MuJoCo**
- **Pace Sim2Real**
- **IsaacLab simulator**

## Connections

- Operator → ROS collectors: starts collection
- Operator → Manipulator collector: starts collection
- ROS collectors → Robot settings: reads settings
- Manipulator collector → Robot settings: reads settings
- ROS collectors → ROS messages: uses messages
- Manipulator collector → ROS messages: uses messages
- Physical robot → ROS collectors: sends state
- ROS collectors → Physical robot: sends control
- Physical robot → Manipulator collector: sends state
- Manipulator collector → Physical robot: sends control
- ROS collectors → Trajectory recordings: writes recordings
- Manipulator collector → Trajectory recordings: writes recordings
- Operator → MuJoCo fitter: runs fit
- MuJoCo fitter → Trajectory recordings: reads recordings
- MuJoCo fitter → MuJoCo utilities: uses utilities
- MuJoCo fitter → Robot models: selects model
- MuJoCo fitter → MuJoCo: fits parameters
- MuJoCo fitter → Fit report: generates report
- Operator → IsaacLab fitter: runs fit
- IsaacLab fitter → Trajectory recordings: reads recording
- IsaacLab fitter → Pace robot tasks: loads task
- IsaacLab fitter → Pace Sim2Real: uses environment
- IsaacLab fitter → IsaacLab simulator: steps simulation
- Pace robot tasks → Robot models: loads robot asset
- IsaacLab fitter → Identified parameters: estimates parameters
- Operator → Quadruped replay: replays recording
- Operator → Manipulator replay: replays recording
- Operator → Trajectory plotter: plots recording
- Quadruped replay → Trajectory recordings: reads recording
- Manipulator replay → Trajectory recordings: reads recording
- Trajectory plotter → Trajectory recordings: reads recording
