-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Actuator thermal plugin for mujoco #2815
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Actuator thermal plugin for mujoco #2815
Conversation
…s associated with
@quagla @yuvaltassa It needed the number of plugins to be updated in the test. Just did it! |
test/plugin/thermal/CMakeLists.txt
Outdated
@@ -0,0 +1,20 @@ | |||
# Copyright 2022 DeepMind Technologies Limited |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2025
test/plugin/thermal/thermal_test.cc
Outdated
@@ -0,0 +1,107 @@ | |||
// Copyright 2025 Vidur Vij |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vidur Vij -> DeepMind Technologies Limited
plugin/thermal/thermal.h
Outdated
@@ -0,0 +1,61 @@ | |||
// Copyright 2025 Vidur Vij |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same
plugin/thermal/thermal.cc
Outdated
} | ||
} | ||
|
||
} // namespace mujoco::plugin::thermal No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add terminating blank line
plugin/thermal/register.cc
Outdated
@@ -0,0 +1,24 @@ | |||
// Copyright 2023 DeepMind Technologies Limited |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2025
plugin/thermal/CMakeLists.txt
Outdated
@@ -0,0 +1,42 @@ | |||
# Copyright 2022 DeepMind Technologies Limited |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2025
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
C
Rth
RNorm
TempCoeff
Kt25
Kt130
G
Usage Example