Skip to content

Commit

Permalink
Check plane_normal type
Browse files Browse the repository at this point in the history
From #176
  • Loading branch information
flferretti authored Jun 13, 2024
1 parent dab36e6 commit 9e08fe2
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 9e08fe2

Please sign in to comment.