Skip to content

Commit

Permalink
Merge pull request #177 from ami-iit/flferretti-patch-2
Browse files Browse the repository at this point in the history
Check `plane_normal` type when instantiating a `PlaneTerrain`
  • Loading branch information
flferretti committed Jun 14, 2024
2 parents dab36e6 + 9e08fe2 commit 5dd2692
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/jaxsim/terrain/terrain.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ def build(plane_normal: list) -> "PlaneTerrain":
Returns:
PlaneTerrain: A PlaneTerrain instance.
"""
if not isinstance(plane_normal, list):
raise TypeError(
f"Expected a list for the plane normal vector, got: {type(plane_normal)}."
)

return PlaneTerrain(plane_normal=plane_normal)

Expand Down

0 comments on commit 5dd2692

Please sign in to comment.