add chinese
build / setup (compute matrix) (push) Has been cancelled
build / ${{ matrix.label }} (push) Has been cancelled
build / macos-15-arm64-studio (push) Has been cancelled
build / ubuntu-24.04-clang-18-studio (push) Has been cancelled
build / ubuntu-24.04-gcc-14-studio (push) Has been cancelled
build / windows-2025-ninja-studio (push) Has been cancelled
build / ubuntu-24.04-clang-18-wasm (push) Has been cancelled
build / ubuntu-24.04-clang-18-mjx (push) Has been cancelled

This commit is contained in:
2026-08-19 17:14:37 +08:00
parent ac4f431ff5
commit b45b15d153
26 changed files with 4388 additions and 805 deletions
+11 -11
View File
@@ -1,13 +1,13 @@
# Actuator plugins
# 执行器插件(Actuator plugins)
## PID
The `mujoco.pid` actuator plugin implements a configurable [PID controller](https://en.wikipedia.org/wiki/Proportional%E2%80%93integral%E2%80%93derivative_controller):
`mujoco.pid` 执行器插件实现了一个可配置的 [PID 控制器](https://en.wikipedia.org/wiki/Proportional%E2%80%93integral%E2%80%93derivative_controller):
$$f(t) = K_\text{p} e(t) + K_\text{i} \int_0^t e(\tau) \mathrm{d}\tau + K_\text{d} \frac{\mathrm{d}e(t)}{\mathrm{d}t},$$
where $e(t) = u(t) - \ell(t)$ is the difference between the control $u$ and the actuator length $\ell$.
其中 $e(t) = u(t) - \ell(t)$ 是控制量 $u$ 与执行器长度 $\ell$ 之间的差值。
You can use it like:
使用示例如下:
```xml
<mujoco>
@@ -36,12 +36,12 @@ You can use it like:
</mujoco>
```
The available options are:
可用配置选项如下:
|Attribute | Default | Meaning |
|属性 | 默认值 | 含义 |
|----------|---------|---------|
|`kp` | 0 | **P** gain for the controller. |
|`ki` | 0 | **I** gain for the controller.<p/>If nonzero, one activation variable will be added to `mjData.act`, containing the current I term (in units of force). |
|`kd` | 0 | **D** gain for the controller. |
|`imax` | Optional | If specified, the force produced by the I term will be clipped to the range `[-imax, imax]`. |
|`slewmax` | Optional | The maximum rate at which the setpoint for the PID controller can change.<p/>If a bigger change is requested between two timesteps, it will be clipped to the range `[ctrl - slewmax * dt, ctrl + slewmax * dt]`<p/>If specified, one activation variable will be added to `mjData.act` containing the previous value of `ctrl`. |
|`kp` | 0 | 控制器的**比例(P)**增益。 |
|`ki` | 0 | 控制器的**积分(I)**增益。<p/>若非零,将在 `mjData.act` 中添加一个激活变量,用于存储当前的积分项(以力为单位)。 |
|`kd` | 0 | 控制器的**微分(D)**增益。 |
|`imax` | 可选 | 若指定,积分项产生的力将被截断至 `[-imax, imax]` 范围内。 |
|`slewmax` | 可选 | PID 控制器设定点允许的最大变化速率(斜率限制)。<p/>若两个时间步之间请求了更大的变化,它将被截断至 `[ctrl - slewmax * dt, ctrl + slewmax * dt]` 范围。<p/>若指定,将在 `mjData.act` 中添加一个激活变量,用于存储上一个时间步的 `ctrl` 值。 |