github.com·2026/10/23·google-deepmind
MuJoCo 3.17.0 发布,核心新增 mujoco.batch 批处理 API(Python 同名),可在独立线程池并行推进同一模型的多仿真,内存随线程扩展且结果与串行循环逐位一致,支持自定义模型、轨迹记录与持久仿真。引擎为一维 flex 新增基于离散弹性杆的弯曲弹性,由 young 模量和圆/矩形截面启用;三线性或二次插值 flex 支持自碰撞,默认 arena 内存改按网格拓扑分配。mj_setConst 只算派生量,约束求解终止改按当前惯性矩阵迹,弃用 meaninertia;mju_boxQP 用增量 Cholesky 使冷/热启动提速至最高1.6/2.9倍。编译器支持纹理按引用仅存路径并在渲染时按需加载,新增 mjs_dedupAssets 合并重复资源,mjs_fuseStatic/mjs_discardVisual 改为返回数量。Python 新增 Batch(model, nsim) 及无 GIL 的 step/rollout,修复多控制驱动器、moment 等命名访问,并支持 Bazel 构建。修复插值 flexcomp 弹性、Filament mipmap 与皮肤顶点,以及错误路径的多处内存泄漏和崩溃;示例 elastic mechanism 改用一维 flex 杆。
young 现已生效,旧模型可能突然弯曲或编译失败为什么重要 batch API 直接关系 RL 并行 rollout 吞吐且保证位级一致;weld ABI、求解器终判据与 1D flex 行为变化影响既有代码与新旧轨迹可比性适合 基于 MuJoCo 的具身智能/控制工程师,尤其维护并行采样与评测管线者
mjNEQDATA 由 11 增至 12;编译期无 relpose 的 body-based weld 直设姿态前须置零 eq_data[11]mjs_fuseStatic/mjs_discardVisual 返回数量、错误返回 -1;判错由 != 0 改 < 0mjs_addTexture 新增 class 参数:mjs_addTexture(spec) 须改为 (spec, NULL),add_texture 不变section 选圆/盒截面,正 young 启用,由 discrete 积分器隐式积分mj_loadTexture、mj_embedAssetsmjs_dedupAssets:合并会编译为同一资产的纹理与网格mju_boxQP 改增量 Cholesky 更新:cold-start 提升 1.4-1.6 倍,warm-start 提升 1.9-2.9 倍meaninertia 属性弃用并触发编译警告;求解器终判据改按当前惯量矩阵的迹缩放warm 提速
mju_boxQP 热启动
cold 提速
mju_boxQP 冷启动
术语解释mjModel 中每条 equality 约束数据数组的长度,本次由 11 扩到 12
weld ABI 扩容
已修泄漏
每次失败编译
注释 · 泄漏数字指已修复的错误路径,非现存问题出自 §3/§5/§20
$ Zero eq_data[11] before calling mj_setConst
$ Test for an error with `< 0` rather than `!= 0`
$ mjs_addTexture(spec) → mjs_addTexture(spec, NULL)
$ remove it to migrate
c00ed8153] 在 mujoco/mjbatch.h 中新增了 batch API(Python 中为 mujoco.batch):同一模型的多个仿真在各自专属的线程池中步进,每个仿真保存为独立的积分状态,并在每次调用时加载到一个 mjData 中,因此内存随线程数扩展,且在任意线程数下结果都与普通循环位级一致(bit-identical)。它支持逐仿真的模型与选项字段(或调用方自己的模型)、每步之后的状态观测、记录轨迹、持久仿真(sleep 所需),以及任意的逐仿真函数。设计遵循 @kevinzakka 的 mjbatch。94483e166] 为 1D flex 新增了弯曲弹性(elasticity),采用无扭转的各向同性离散弹性杆模型。横截面通过新的 section 属性选择:以 flex 半径构成的圆形,或以 sectionsize 为半尺寸的盒形。c00ed8153 Added a batch API in mujoco/mjbatch.h (in Python as
mujoco.batch): many simulations of one model stepped on a thread pool of its own, each held as its
integration state and loaded into an mjData for each call, so memory scales with threads and results are
bit-identical to a plain loop at any thread count. It supports per-simulation model and option fields or models of
the caller's, observations of the state after a step, recorded trajectories, persistent simulations (required for
sleep), and arbitrary per-simulation functions. Follows the design of
mjbatch by @kevinzakka.Flex improvements:
94483e166 Added bending elasticity for 1D flexes, using a twist-free isotropic
discrete elastic rod model. The cross-section is selected with the new section
attribute: a circle of the flex radius, or a box with half-sizes [sectionsize](https://mujoco.readthedocs.…EVIDENCE / METHODS
要点卡片
**术语解释单模型多仿真的批量接口:多份仿真状态各自跑在专属线程池,按调用装入 mjData**领衔:单模型多仿真并行、结果位级一致,是采样栈核心升级
同一模型的许多仿真在专属线程池步进,各自持有积分状态;内存随线程数扩展,任意线程数下与朴素循环位级一致。
twist-free 各向同性离散弹杆模型;section 选圆或盒截面(sectionsize、弱轴刚度),正 young 模量启用。
passthrough="textures" 或 embed="false" 时模型存路径不存像素,多纹理子模型场景加载内存与时间只占一小部分。
带正 contact margin 的 geom 增加 single-shot multicontact。
注释 · batch 设计源自 kevinzakka 的 mjbatch,属引擎级新能力出自 §1-9