Unverified Commit 23290191 authored by Kelly Guo's avatar Kelly Guo Committed by GitHub

Fixes scaling of default ground plane (#1133)

# Description

A typo in the code was preventing the `size` parameter in GroundPlaneCfg
from being parsed and applied to the default ground plane. In addition,
some errors are being thrown with the kit command use to apply the
scale. This change fixes the typo and switches to use isaac sim core
APIs for applying scale.

## Type of change

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

## Checklist

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [x] 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 71e3ed9a
[package]
# Note: Semantic Versioning is used: https://semver.org/
version = "0.24.17"
version = "0.24.18"
# Description
title = "Isaac Lab framework for Robot Learning"
......
Changelog
---------
0.24.18 (2024-10-04)
~~~~~~~~~~~~~~~~~~~~
Fixed
^^^^^
* Fixes parsing and application of ``size`` parameter for :class:`~omni.isaac.lab.sim.spawn.GroundPlaneCfg` to correctly
scale the grid-based ground plane.
0.24.17 (2024-10-04)
~~~~~~~~~~~~~~~~~~~~
......
......@@ -151,16 +151,11 @@ def spawn_ground_plane(
# Scale only the mesh
# Warning: This is specific to the default grid plane asset.
if prim_utils.is_prim_path_valid(f"{prim_path}/Enviroment"):
if prim_utils.is_prim_path_valid(f"{prim_path}/Environment"):
# compute scale from size
scale = (cfg.size[0] / 100.0, cfg.size[1] / 100.0, 1.0)
# apply scale to the mesh
omni.kit.commands.execute(
"ChangeProperty",
prop_path=Sdf.Path(f"{prim_path}/Enviroment.xformOp:scale"),
value=scale,
prev=None,
)
prim_utils.set_prim_property(f"{prim_path}/Environment", "xformOp:scale", scale)
# Change the color of the plane
# Warning: This is specific to the default grid plane asset.
......
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