Skip to content

Fix terrain_out_of_bounds to return tensor instead of bool #3180

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ def terrain_out_of_bounds(
to the edge of the terrain is calculated based on the size of the terrain and the distance buffer.
"""
if env.scene.cfg.terrain.terrain_type == "plane":
return False # we have infinite terrain because it is a plane
# we have infinite terrain because it is a plane
return torch.zeros(env.num_envs, dtype=torch.bool, device=env.device)
elif env.scene.cfg.terrain.terrain_type == "generator":
# obtain the size of the sub-terrains
terrain_gen_cfg = env.scene.terrain.cfg.terrain_generator
Expand Down
Loading