google-deepmind / google-deepmind/mujoco

Proposal for linear parametrization of inverse dynamics for SysID

Open
#1,631 6 comments 3 reactions 0 assignees View on GitHub
enhancement
Dominant language
C++
Stars
15.2k
Forks
1.8k
Avg merge
10d 16h
Merged PRs (30d)
25

Description

Hello MuJoCo Team,

I am currently finalizing my thesis in system identification (SysID) and adaptive control, together with @simeon-ned, we are working on SysID and adaptive control. We are very excited about the recent April update that introduced optimization and mentioned upcoming tutorials on SysID. Given our consistent use of MuJoCo for our research, we have developed a small [GitHub repository dedicated to SysID in MuJoCo](https://github.com/lvjonok/mujoco-sysid?tab=readme-ov-file) .

We have focused on the regressor representation, a linear parametrization of inverse dynamics, which is pivotal in SysID for robotic systems. To our knowledge, dedicated functions for this representation are not available in MuJoCo, prompting us to develop a prototype. Here are the main functions we introduced:
- [`mj_bodyRegressor`](https://github.com/lvjonok/mujoco-sysid/blob/1a041888600e9539dcad3f1cb8093132eac8d12f/mujoco_sysid/modeling.py#L56): This function calculates the regressor matrix for a single rigid body within a MuJoCo model.
- [`mj_jointRegressor`](https://github.com/lvjonok/mujoco-sysid/blob/1a041888600e9539dcad3f1cb8093132eac8d12f/mujoco_sysid/modeling.py#L91): This function calculates the regressor matrix for the entire inverse dynamics within a MuJoCo model.

**Demo and Examples**:

[We have also included a demo notebook showcasing SysID](https://colab.research.google.com/github/lvjonok/mujoco-sysid/blob/master/examples/mujoco_sysid_demo.ipynb) in robotic systems using the regressor functions. Current examples include:
- Estimation of cart-pole inertial parameters through random forcing and LQR stabilization.
- Identification of the end-effector load for the Franka Emika Panda and compensation using inverse dynamics.
- Determination of mass, center of mass, and spatial inertia for a Skydio X2 Quadrotor following trajectories via LTV LQR.

We plan to expand these examples to include more advanced techniques such as adaptive control, Riemannian regularization on parameter manifolds, physical consistency, and log-Cholesky inertia parametrization.

If you find this work useful and believe it deserves inclusion in the official MuJoCo engine and MJX, we would be delighted to contribute these capabilities further and assist in any way possible. Additionally, we are eager to enhance the demo notebook with more examples. We look forward to your feedback and hope to contribute meaningfully to the MuJoCo community.

Lastly, we want to express our gratitude for MuJoCo. We work with it daily and find it to be an incredibly convenient, powerful, and versatile tool.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.