Skip to content

Conversation

TonyGorgy
Copy link

nbRows and nbColumns are assigned in the correct order.
./ legged_robot.py
hf_params.nbRows = self.terrain.tot_cols -> hf_params.nbRows = self.terrain.tot_rows
hf_params.nbColumns = self.terrain.tot_rows -> hf_params.nbColumns = self.terrain.tot_cols

…e nbRows and nbColumns are assigned in the correct order
@luoye2333
Copy link

@TonyGorgy @nikitardn
I also noticed this bug: when using the height field, the terrain generation is incorrect. Following @TonyGorgy 's method to fix it, although the terrain is correct, the env_origins are transposed, causing incorrect positions when reset_root_state is called.

transpose() should be added when adding the height field, while keeping nbRows and nbColumns unchanged.

self.gym.add_heightfield(self.sim, self.terrain.heightsamples.transpose(), hf_params) # column-major order
Screenshot from 2025-08-27 13-49-47

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants