Unverified Commit 819a9c75 authored by Farbod Farshidian's avatar Farbod Farshidian Committed by GitHub

Fixes missing `size` attribute when spawning a grid-like ground plane (#410)

# Description

The flat ground size is not set based on the config file. The PR passes
this config to `spawn_ground_plane`

## Type of change

- Bug fix (non-breaking change which fixes an issue)

| Before | After |
| ------ | ----- |
| ![Screenshot from 2024-02-14
20-58-46](https://github.com/isaac-orbit/orbit/assets/3355155/790ef3d3-d734-469c-b109-bf312d310012)|
![Screenshot from 2024-02-14
20-19-54](https://github.com/isaac-orbit/orbit/assets/3355155/2be3b453-65f0-4f88-98a6-f5649a9f6459)
|


## Checklist

- [X] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./orbit.sh --format`
- [ ] I have made corresponding changes to the documentation
- [X] My changes generate no new warnings
- [X] I have added tests that prove my fix is effective or that my
feature works
- [X] I have run all the tests with `./orbit.sh --test` and they pass
- [ ] I have updated the changelog and the corresponding version in the
extension's `config/extension.toml` file
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there
parent 8fbd397d
...@@ -160,7 +160,7 @@ class TerrainImporter: ...@@ -160,7 +160,7 @@ class TerrainImporter:
Operations - Import. Operations - Import.
""" """
def import_ground_plane(self, key: str, size: tuple[int, int] = (2.0e6, 2.0e6)): def import_ground_plane(self, key: str, size: tuple[float, float] = (2.0e6, 2.0e6)):
"""Add a plane to the terrain importer. """Add a plane to the terrain importer.
Args: Args:
...@@ -182,7 +182,7 @@ class TerrainImporter: ...@@ -182,7 +182,7 @@ class TerrainImporter:
self.warp_meshes[key] = convert_to_warp_mesh(mesh.vertices, mesh.faces, device=device) self.warp_meshes[key] = convert_to_warp_mesh(mesh.vertices, mesh.faces, device=device)
# get the mesh # get the mesh
ground_plane_cfg = sim_utils.GroundPlaneCfg(physics_material=self.cfg.physics_material) ground_plane_cfg = sim_utils.GroundPlaneCfg(physics_material=self.cfg.physics_material, size=size)
ground_plane_cfg.func(self.cfg.prim_path, ground_plane_cfg) ground_plane_cfg.func(self.cfg.prim_path, ground_plane_cfg)
def import_mesh(self, key: str, mesh: trimesh.Trimesh): def import_mesh(self, key: str, mesh: trimesh.Trimesh):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment