From 9e08fe20e47ef9e0cb30798c29d947110cffec98 Mon Sep 17 00:00:00 2001 From: Filippo Luca Ferretti <102977828+flferretti@users.noreply.github.com> Date: Thu, 13 Jun 2024 16:56:50 +0200 Subject: [PATCH] Check `plane_normal` type From https://github.com/ami-iit/jaxsim/issues/176 --- src/jaxsim/terrain/terrain.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/jaxsim/terrain/terrain.py b/src/jaxsim/terrain/terrain.py index df0a0a402..c1f44081e 100644 --- a/src/jaxsim/terrain/terrain.py +++ b/src/jaxsim/terrain/terrain.py @@ -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)