Pre-flight checklist
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
# 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
Environment
genelab 0.4.0
genesis 1.2.0
(报告者原始环境未提供;上述版本为维护者复核环境)
RL backend
Not applicable
Simulation backend
Not applicable / unknown
Logs / traceback
(无输出——问题恰恰是静默失效,没有任何报错或警告)
Anything else
正确做法:浮动基座速度应通过 RigidEntity.set_dofs_velocity 写入 free joint 的前 6 个基座 DoF(0–2 线速度,3–5 角速度),而不是不存在的 set_vel / set_ang。
维护者按 bug 模板重排了本 issue(2026-07-10);原始内容见编辑历史。感谢 @humble02 的报告与根因分析。
Pre-flight checklist
What happened
push_by_setting_velocity事件不起作用:对机器人 articulation(GenesisRigidEntity)推力/速度扰动完全没有生效,训练时配置了 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
任何配置了
push_by_setting_velocity事件的任务(例如examples/unitree下 G1 / Go1 的env_cfg.py)均可复现:事件按 interval 触发,但基座线速度/角速度不变。代码位置:
src/genelab/mdp/events.py#L151-L184Environment
RL backend
Not applicable
Simulation backend
Not applicable / unknown
Logs / traceback
Anything else
正确做法:浮动基座速度应通过
RigidEntity.set_dofs_velocity写入 free joint 的前 6 个基座 DoF(0–2 线速度,3–5 角速度),而不是不存在的set_vel/set_ang。