Skip to content

Commit

Permalink
Return an error if the input link is not supported in the parametric …
Browse files Browse the repository at this point in the history
…model
  • Loading branch information
S-Dafarra committed Mar 8, 2024
1 parent 66f2273 commit 8e25f02
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ def get_geometry(visual_obj):
if isinstance(visual_obj.geometry, urdf_parser_py.urdf.Sphere):
return Geometry.SPHERE, visual_obj.geometry

raise NotImplementedError(
f"The visual type {visual_obj.geometry.__class__} is not supported"
)

def compute_volume(self):
"""
Returns:
Expand Down Expand Up @@ -165,7 +169,6 @@ def compute_mass(self):
Returns:
(npt.ArrayLike): the link mass
"""
mass = 0.0
mass = self.volume * self.densities
return mass

Expand Down

0 comments on commit 8e25f02

Please sign in to comment.