Skip to content

Commit

Permalink
Allow not passing x and y for flat terrains normal
Browse files Browse the repository at this point in the history
  • Loading branch information
flferretti committed Oct 30, 2024
1 parent 8e879e7 commit 43d04f5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/jaxsim/terrain/terrain.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ def build(height: jtp.FloatLike = 0.0, *, normal: jtp.VectorLike) -> PlaneTerrai
_normal=tuple(normal.tolist()),
)

def normal(self, x: jtp.FloatLike, y: jtp.FloatLike) -> jtp.Vector:
def normal(
self, x: jtp.FloatLike | None = None, y: jtp.FloatLike | None = None
) -> jtp.Vector:
"""
Compute the normal vector of the terrain at a specific (x, y) location.
Expand Down

0 comments on commit 43d04f5

Please sign in to comment.