### Pre-flight checklist - [x] I searched existing issues (open and closed) and found no duplicate. - [x] I checked the README Troubleshooting section — this is not one of the documented pitfalls. - [x] The bug does not reproduce in a pure Genesis script without GeneLab. (GeneLab 侧调用了不存在的 API,属于 GeneLab 自身问题。) ### What happened `push_by_setting_velocity` 事件不起作用:对机器人 articulation(Genesis `RigidEntity`)推力/速度扰动完全没有生效,训练时配置了 push 事件但基座速度从未被改写,且没有任何报错或警告——静默失效。 原因:该函数通过 `getattr(handle, "set_vel", None)` / `getattr(handle, "set_ang", None)` 取方法,取不到就直接跳过。而 Genesis 的 `RigidEntity` 上**没有** `set_vel` 和 `set_ang`(这两个方法只存在于 `fem_entity` 和 `tool_entity` 上),所以对刚体 articulation 两个分支都拿到 `None`,函数变成 no-op。 ### Steps to reproduce ```python # genesis 1.2.0 from genesis.engine.entities import RigidEntity print(hasattr(RigidEntity, "set_vel")) # False print(hasattr(RigidEntity, "set_ang")) # False print(hasattr(RigidEntity, "set_dofs_velocity")) # True ``` 任何配置了 `push_by_setting_velocity` 事件的任务(例如 `examples/unitree` 下 G1 / Go1 的 `env_cfg.py`)均可复现:事件按 interval 触发,但基座线速度/角速度不变。 代码位置:[`src/genelab/mdp/events.py#L151-L184`](https://github.com/KraHsu/GeneLab/blob/7498fa67d3dfe5786094692c70b48362c4dbd8f8/src/genelab/mdp/events.py#L151-L184) ### Environment ```shell genelab 0.4.0 genesis 1.2.0 (报告者原始环境未提供;上述版本为维护者复核环境) ``` ### RL backend Not applicable ### Simulation backend Not applicable / unknown ### Logs / traceback ```shell (无输出——问题恰恰是静默失效,没有任何报错或警告) ``` ### Anything else 正确做法:浮动基座速度应通过 `RigidEntity.set_dofs_velocity` 写入 free joint 的前 6 个基座 DoF(0–2 线速度,3–5 角速度),而不是不存在的 `set_vel` / `set_ang`。 > _维护者按 bug 模板重排了本 issue(2026-07-10);原始内容见编辑历史。感谢 @humble02 的报告与根因分析。_
Activity
[-]push_by_setting_velocity 不起作用[/-][+]bug: push_by_setting_velocity 对 RigidEntity 静默失效(set_vel/set_ang 不存在)[/+]fix(bridges): reach the inner pyrender viewer for the teleop HUD
KraHsu commentedon Jul 10, 2026
已在 #244 修复并合入 main。感谢 @humble02 的报告——根因分析完全正确:
RigidEntity上不存在set_vel/set_ang(它们只在 FEM / tool 实体上),getattr(..., None)拿不到方法就静默跳过,所以这个事件对所有刚体 articulation 一直是无声 no-op。修复正是按你指的方向:新增
genelab.entity.write_root_velocity(),通过set_dofs_velocity写 free joint 的前 6 个基座 DoF(0–2 世界系线速度,3–5 角速度)。顺着同样的病根做了全量审计,一并修掉的还有:
reset_root_state_uniform的速度随机化半边(同样的死代码)Articulation.write_root_state的速度写入examples/中 wuji cube 的重置 / 速度扰动 kick 和 franka cube 重置set_message_text,同类静默失效)同时新增
tests/test_genesis_api_contract.py,把所有经getattr守卫的 Genesis 方法名钉死在契约测试上,今后 Genesis 升级如再出现这类 API 面变化会直接在 CI 报红,而不是无声失效。fix(entity): write root velocity via free-joint DoFs, not set_vel/set…
fix(bridges): reach the inner pyrender viewer for the teleop HUD