Actuator thermal plugin for mujoco#2815
Open
vidurvij-apptronik wants to merge 17 commits intogoogle-deepmind:mainfrom
Open
Actuator thermal plugin for mujoco#2815vidurvij-apptronik wants to merge 17 commits intogoogle-deepmind:mainfrom
vidurvij-apptronik wants to merge 17 commits intogoogle-deepmind:mainfrom
Conversation
…s associated with
quagla
approved these changes
Aug 26, 2025
Contributor
Author
|
@quagla @yuvaltassa It needed the number of plugins to be updated in the test. Just did it! |
yuvaltassa
reviewed
Sep 17, 2025
test/plugin/thermal/CMakeLists.txt
Outdated
| @@ -0,0 +1,20 @@ | |||
| # Copyright 2022 DeepMind Technologies Limited | |||
test/plugin/thermal/thermal_test.cc
Outdated
| @@ -0,0 +1,107 @@ | |||
| // Copyright 2025 Vidur Vij | |||
Collaborator
There was a problem hiding this comment.
Vidur Vij -> DeepMind Technologies Limited
plugin/thermal/thermal.h
Outdated
| @@ -0,0 +1,61 @@ | |||
| // Copyright 2025 Vidur Vij | |||
plugin/thermal/thermal.cc
Outdated
| } | ||
| } | ||
|
|
||
| } // namespace mujoco::plugin::thermal No newline at end of file |
Collaborator
There was a problem hiding this comment.
Add terminating blank line
plugin/thermal/register.cc
Outdated
| @@ -0,0 +1,24 @@ | |||
| // Copyright 2023 DeepMind Technologies Limited | |||
plugin/thermal/CMakeLists.txt
Outdated
| @@ -0,0 +1,42 @@ | |||
| # Copyright 2022 DeepMind Technologies Limited | |||
yuvaltassa
approved these changes
Sep 17, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Thermal Plugin for Actuator Temperature Modeling
Summary
This PR introduces a new thermal plugin for MuJoCo that models the temperature dynamics of actuators.
The plugin simulates heat generation from electrical resistance, heat dissipation to the
environment, and temperature-dependent motor characteristics.
Description
Physics Model
The thermal plugin implements a first-order lumped thermal model with the following components:
1. Temperature-Dependent Torque Constant
The motor torque constant varies linearly with temperature:
Kt(T) = Kt25 + ((Kt130 - Kt25) / (403.15 - 298.15)) × (T - 298.15)
where:
Kt25: Torque constant at 25°C (298.15 K)Kt130: Torque constant at 130°C (403.15 K)T: Current temperature in KelvinThis can be replace by a constant value in the future
2. Motor Current Calculation
From the actuator force and torque constant:
I = F / (Kt(T) × G)
where:
F: Actuator force (N)G: Gear ratioI: Motor current (A)3. Temperature-Dependent Electrical Resistance
The electrical resistance increases with temperature:
R(T) = RNorm × (1 + α × (T - 298.15))
where:
RNorm: Nominal resistance at 25°C (Ω)α: Temperature coefficient of resistance (1/K)4. Thermal Dynamics
The temperature evolution follows the heat balance equation:
C × dT/dt = Pin - Pout
where:
Pin = I² × R(T) (Joule heating)
Pout = (T - Tambient) / Rth (Heat dissipation)
C: Thermal capacitance (J/K)Rth: Thermal resistance (K/W)Tambient: Ambient temperature (K)The temperature is updated using Euler integration:
T(t + Δt) = T(t) + (dT/dt) × Δt
Implementation Details
Files Added:
plugin/thermal/thermal.h: Plugin header with configuration structureplugin/thermal/thermal.cc: Core implementation of thermal modelplugin/thermal/register.cc: Plugin registrationplugin/thermal/CMakeLists.txt: Build configurationtest/plugin/thermal/thermal_test.cc: Unit teststest/plugin/thermal/testdata/thermal_test.xml: Test configurationtest/plugin/thermal/CMakeLists.txt: Test build configurationKey Features:
Configuration Parameters
CRthRNormTempCoeffKt25Kt130GUsage Example