Skip to content

Commit

Permalink
Update rod deprecated methods
Browse files Browse the repository at this point in the history
  • Loading branch information
flferretti committed May 20, 2024
1 parent d6748eb commit 1cecf81
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
4 changes: 1 addition & 3 deletions src/jaxsim/mujoco/loaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,8 @@ def convert(
joints_dict[joint_name].type = "fixed"

# Convert the ROD model to URDF.
urdf_string = rod.urdf.exporter.UrdfExporter.sdf_to_urdf_string(
urdf_string = rod.urdf.exporter.UrdfExporter.to_urdf_string(
sdf=rod.Sdf(model=rod_model, version="1.7"),
gazebo_preserve_fixed_joints=False,
pretty=True,
)

# -------------------------------------
Expand Down
8 changes: 2 additions & 6 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,7 @@ def jaxsim_model_box() -> js.model.JaxSimModel:
)

# Export the URDF string.
urdf_string = rod.urdf.exporter.UrdfExporter.sdf_to_urdf_string(
sdf=rod_model, pretty=True
)
urdf_string = rod.urdf.exporter.UrdfExporter.to_urdf_string(sdf=rod_model)

return build_jaxsim_model(model_description=urdf_string)

Expand Down Expand Up @@ -159,9 +157,7 @@ def jaxsim_model_sphere() -> js.model.JaxSimModel:
)

# Export the URDF string.
urdf_string = rod.urdf.exporter.UrdfExporter.sdf_to_urdf_string(
sdf=rod_model, pretty=True
)
urdf_string = rod.urdf.exporter.UrdfExporter.to_urdf_string(sdf=rod_model)

return build_jaxsim_model(model_description=urdf_string)

Expand Down
4 changes: 1 addition & 3 deletions tests/test_pytree.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ def test_call_jit_compiled_function_passing_different_objects():
)

# Export the URDF string.
urdf_string = rod.urdf.exporter.UrdfExporter.sdf_to_urdf_string(
sdf=rod_model, pretty=True
)
urdf_string = rod.urdf.exporter.UrdfExporter.to_urdf_string(sdf=rod_model)

model1 = js.model.JaxSimModel.build_from_model_description(
model_description=urdf_string,
Expand Down

0 comments on commit 1cecf81

Please sign in to comment.