Repository navigation
feat(isaacsim):通过 EnvCfg 后端接线暴露 UniSim 的 PhysX solver 旋钮 - #1620
Merged
Merged
Conversation
Closes #1617. UniSim 1.7.x accepts a bounded, readback-validated PhysX solver override set on the IsaacSim backend (unilabsim/unisim#251, #259), but the standard UniLab path (registry.make -> make_manager_based_rl_env -> create_backend) had no channel for those knobs: task owners could not declare the solver table and the backend silently ran PhysX defaults. - EnvCfg gains the six solver fields, following the per-backend knob convention (Optional, None keeps the PhysX scene defaults): isaacsim_solver_position_iteration_count (int >= 1), isaacsim_solver_velocity_iteration_count (int >= 0), isaacsim_bounce_threshold_velocity / isaacsim_contact_offset / isaacsim_rest_offset / isaacsim_max_depenetration_velocity (non-negative floats). EnvCfg.validate mirrors the PhysxSolverConfig bounds so owner configs fail fast. - env_backend_kwargs forwards all six to the UniSim factory under the same names. - Tests: field->kwargs mapping assertions (values forwarded verbatim, defaults stay None) and validation rejection coverage. - Changelog entry (shared page, Added).
…dshake test_isaacsim_worker_timeout_has_backend_diagnostic set worker_timeout_s=0.2 to probe the hanging STEP diagnostic, but the same budget also constrains the INIT handshake, which includes the mock worker's cold Python spawn; on loaded CI runners (ubuntu-slim) INIT exceeded 0.2 s and the test flaked before reaching the step under test (PR #1620 CI, job 106416975382). Materialize with the default timeout and shrink the budget only for the STEP probe.
lemon-star608
added a commit
to lemon-star608/Uni-simtoolreal
that referenced
this pull request
Sep 23, 2026
unisim-core 1.7.5 (carries our merged adapter fixes through #294) and mjbatch-uni 0.2.4 (streaming VariantPackBuilder, PR #38) shipped today; only unilab stays on the upstream git pin until a release contains Motphys/UniLab#1620/#1636. The mujoco variant-executor floor is now explicit (mjbatch-uni>=0.2.4).
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.
Closes #1617
背景
UniSim 1.7.x 为 IsaacSim 后端交付了有界、带读回验证的 PhysX solver 配置(unilabsim/unisim#251、#259),但在 UniLab 标准路径(
registry.make→make_manager_based_rl_env→create_backend)上这些旋钮没有任何通道能到达后端:任务 owner 无法经 Hydra YAML 声明求解器表,后端只能静默使用 PhysX 默认值。改动
src/unilab/base/base.py:EnvCfg新增六个 solver 字段,沿用现有按后端命名的旋钮惯例(Optional,None保持 PhysX 场景默认值):isaacsim_solver_position_iteration_count(int ≥ 1)isaacsim_solver_velocity_iteration_count(int ≥ 0,PhysX 允许 0 velocity iterations)isaacsim_bounce_threshold_velocity/isaacsim_contact_offset/isaacsim_rest_offset/isaacsim_max_depenetration_velocity(非负 float)EnvCfg.validate镜像 unisimPhysxSolverConfig的边界(position ≥ 1、velocity ≥ 0、浮点项非负),owner 配置快速失败。src/unilab/base/backend_factory.py:env_backend_kwargs将六个字段按同名机械转发到 UniSim factory(unisim 侧create_backend本就接受这些isaacsim_前缀 kwargs,pop 后装配PhysxSolverConfig并做引擎读回比对)。tests/base/test_isaacsim_backend.py:新增转发层测试(字段→kwargs 逐值映射断言 + 默认值保持None)与EnvCfg校验拒绝用例(0/负数/bool/错误类型共 8 组 parametrize)。docs/sphinx/source/changelog.md:Unreleased / Added 中英条目。与 unisim 侧的对接
字段全集逐一读自 unisim factory 的 kwargs pop 处(
unisim/factory.py:isaacsim_solver_position_iteration_count、isaacsim_solver_velocity_iteration_count、isaacsim_bounce_threshold_velocity、isaacsim_contact_offset、isaacsim_rest_offset、isaacsim_max_depenetration_velocity)与PhysxSolverConfig字段(unisim/backend/isaacsim/physx_solver.py),一一对应、无遗漏、无杜撰。unisim 侧负责有界校验 + 引擎读回比对,本 PR 只做配置通道。测试证据
make check:format + mypy(128 files)+ pyright + ruff 全绿。make test:1508 passed + 28 skipped(含本 PR 新增 10 个测试点)。unisim-core>=1.7.4,solver kwargs 必然可用,无 legacy 兼容分支。说明
issue 中登记的独立项(
reset_state.py在 mapped 场景拒绝 DR 写,使 unisim#248 的 reset-time 模型 DR 从事件项不可达)不在本 PR 范围,建议单独跟踪。