Open
Description
Describe the bug
The code added in #1525 is wrong!
Also marked in #1546
IsaacLab/source/extensions/omni.isaac.lab/omni/isaac/lab/envs/mdp/rewards.py
Lines 100 to 122 in b5078de
sensor.data.pos_w[:, 2]
is the position of sensor origin in world frame, and it is equal to asset.data.root_link_pos_w[:, 2]
.
In rough terrain, the func return
torch.square(asset.data.root_link_pos_w[:, 2] - adjusted_target_height)
= torch.square(asset.data.root_link_pos_w[:, 2] - target_height - sensor.data.pos_w[:, 2])
= torch.square(- target_height)
This is meaningless.
I think we should take the height of the center point as the reference height, but this cannot be achieved with the current API.
Checklist
- I have checked that there is no similar issue in the repo (required)
- I have checked that the issue is not in running Isaac Sim itself and is related to the repo