IsaacLab: [Bug Report] `base_height_l2` for rough terrain is wrong!
Describe the bug
The code added in #1525 is wrong!
Also marked in #1546
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
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 19 (14 by maintainers)
Commits related to this issue
- Corrects calculation of target height adjustment based on sensor data (#1710) # Description Corrected calculation of target height adjustment based on sensor data. Fixes #1546 and #1698 Than... — committed to isaac-sim/IsaacLab by fan-ziqi 2 years ago
- Corrects calculation of target height adjustment based on sensor data (#1710) # Description Corrected calculation of target height adjustment based on sensor data. Fixes #1546 and #1698 Than... — committed to isaac-sim/IsaacLab by fan-ziqi 2 years ago
- Corrects calculation of target height adjustment based on sensor data (#1710) # Description Corrected calculation of target height adjustment based on sensor data. Fixes #1546 and #1698 Than... — committed to SevenFo/IsaacLab by fan-ziqi 2 years ago
But I think this only satisfies an odd number of points. If it is an even number, it will definitely be indexed to the edge instead of the average of the center points