Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions docs/sphinx/source/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,38 @@ PyPI 版本变更与未发布变更;发布日期采用 PyPI 上传日期。完

## Unreleased

### Added / 新增

- `EntityData` now publishes mjlab-aligned site state for entities that declare
`site_names`: `site_pos_w`, `site_quat_w` (wxyz), `site_lin_vel_w`, and
`site_ang_vel_w`, each `(num_envs, num_sites, 3|4)` in the declared site
order, with the linear velocity taken at the site origin. The scene tensor
read plan derives every site from its owning body's tracked link state and
the public `SimBackend.get_ray_site_frames` local frame on both the MuJoCo
CPU and MJWarp backends (within 1e-5 of CPU MuJoCo `mj_kinematics` +
`mj_objectVelocity`). `SceneTensorReadSpec.site_names` requests the publish,
`SceneTensorReadPlan.site_tensor_view` returns the phase view, and Manager
environments publish every declared site automatically. Entities without
sites return empty tensors, and sites owned by the static world body keep a
constant pose with zero velocity. Declaring `site_names` keeps the full
named-body tracking request on MuJoCo and MJWarp; an explicit
`SceneCfg.tracked_body_names` that omits a site's owning body fails closed
at read-plan compilation
([#2673](https://github.com/Motphys/UniLab/issues/2673)).
`EntityData` 现在为声明了 `site_names` 的实体发布与 mjlab 对齐的 site 状态:
`site_pos_w`、`site_quat_w`(wxyz)、`site_lin_vel_w`、`site_ang_vel_w`,形状均为
`(num_envs, num_sites, 3|4)`,按声明的 site 顺序排列,线速度取 site 原点。
scene tensor read plan 在 MuJoCo CPU 与 MJWarp 两个后端上,用所属 body 已跟踪的
link 状态和公开的 `SimBackend.get_ray_site_frames` 本地帧合成每个 site(与 CPU
MuJoCo 的 `mj_kinematics` + `mj_objectVelocity` 相比误差在 1e-5 以内)。
`SceneTensorReadSpec.site_names` 发起该发布,`SceneTensorReadPlan.site_tensor_view`
返回 phase 视图,Manager 环境会自动发布所有已声明的 site。未声明 site 的实体
返回空张量;挂在静态 world body 上的 site 保持常量位姿和零速度。声明
`site_names` 会在 MuJoCo 与 MJWarp 上保留完整的命名 body 跟踪请求;显式的
`SceneCfg.tracked_body_names` 若漏掉某个 site 的所属 body,则在 read plan
编译期 fail closed
([#2673](https://github.com/Motphys/UniLab/issues/2673))。

### Fixed / 修复

- Refreshed the bilingual documentation against the current CLI, owner configs,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,17 @@ carrier; they do not replace the `obs` plus optional `critic` semantics.
Event, reward, termination, and observation functions may declare this
attribute. Declarations for one entity must use the identical ordered name
tuple, which keeps slot semantics unambiguous without per-term rebinding.
- An entity that declares `site_names` publishes its site state every read
phase. `EntityData.site_pos_w`, `site_quat_w`, `site_lin_vel_w`, and
`site_ang_vel_w` are `(num_envs, num_sites, ...)` carriers in the declared
site order, derived from each owning body's tracked link state and the public
`SimBackend.get_ray_site_frames` local frame; the linear velocity is taken at
the site origin. `SceneTensorReadSpec.site_names` requests the publish and
`SceneTensorReadPlan.site_tensor_view` returns the phase view. Before a plan
is compiled the carrier is zero-valued so Manager construction can probe term
shapes; afterwards an unrefreshed phase fails closed. Entities without sites
return empty tensors, and sites owned by the static world body keep a constant
pose with zero velocity.

## Evidence In Repo

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,15 @@ Env 生命周期由 `src/unilab/base/base.py` 与 `src/unilab/base/torch_env.py`
event、reward、termination 与 observation 函数都可以声明该属性。同一 entity
的声明必须使用完全相同的有序名称元组,从而在不逐 term 重绑定的情况下保持
slot 语义明确。
- 声明了 `site_names` 的 entity 在每个 read phase 发布其 site 状态。
`EntityData.site_pos_w`、`site_quat_w`、`site_lin_vel_w`、`site_ang_vel_w`
是按声明 site 顺序排列的 `(num_envs, num_sites, ...)` carrier,由所属 body
已跟踪的 link 状态和公开的 `SimBackend.get_ray_site_frames` 本地帧合成,线速度
取 site 原点。`SceneTensorReadSpec.site_names` 发起该发布,
`SceneTensorReadPlan.site_tensor_view` 返回 phase 视图。read plan 编译之前
carrier 为零值,供 Manager 构造期探测 term 形状;编译之后未刷新的 phase
会 fail closed。未声明 site 的 entity 返回空张量,挂在静态 world body 上的
site 保持常量位姿和零速度。

## 仓库中的证据

Expand Down
Loading
Loading