Skip to content

Commit

Permalink
Add HeightmapCallable and remove leftovers
Browse files Browse the repository at this point in the history
Co-authored-by: Diego Ferigo <diego.ferigo@iit.it>
  • Loading branch information
flferretti and diegoferigo committed Apr 2, 2024
1 parent 90b980a commit 42aa283
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/jaxsim/mujoco/loaders.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pathlib
import tempfile
import warnings
from typing import Any, Callable
from typing import Any

import mujoco as mj
import rod.urdf.exporter
Expand Down Expand Up @@ -49,7 +49,6 @@ class RodModelToMjcf:
@staticmethod
def assets_from_rod_model(
rod_model: rod.Model,
heightmap: pathlib.Path | Callable | None = None,
) -> dict[str, bytes]:
""""""

Expand Down Expand Up @@ -131,7 +130,7 @@ def convert(
rod_model: rod.Model,
considered_joints: list[str] | None = None,
plane_normal: tuple[float, float, float] = (0, 0, 1),
heightmap: pathlib.Path | Callable | None = None,
heightmap: bool | None = None,
) -> tuple[str, dict[str, Any]]:
""""""

Expand Down Expand Up @@ -233,9 +232,7 @@ def convert(
# ------------------------

# Load the URDF model into Mujoco.
assets = RodModelToMjcf.assets_from_rod_model(
rod_model=rod_model, heightmap=heightmap
)
assets = RodModelToMjcf.assets_from_rod_model(rod_model=rod_model)
mj_model = mj.MjModel.from_xml_string(xml=urdf_string, assets=assets) # noqa

# Get the joint names.
Expand Down

0 comments on commit 42aa283

Please sign in to comment.