Skip to content

Commit

Permalink
Fix bottom collidable point environment variable usage
Browse files Browse the repository at this point in the history
  • Loading branch information
flferretti committed Jan 28, 2025
1 parent 0abc4c3 commit f716159
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/jaxsim/parsers/rod/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def create_box_collision(
# Conditionally add the top corners based on the environment variable.
top_corners = (
np.array([[0, 0, z], [x, 0, z], [x, y, z], [0, y, z]])
if not os.environ.get("JAXSIM_COLLISION_USE_BOTTOM_ONLY", "0")
if not int(os.environ.get("JAXSIM_COLLISION_USE_BOTTOM_ONLY", "0"))
else []
)

Expand Down Expand Up @@ -184,7 +184,7 @@ def fibonacci_sphere(samples: int) -> npt.NDArray:
]

# Filter to keep only the bottom half if required.
if os.environ.get("JAXSIM_COLLISION_USE_BOTTOM_ONLY", "0"):
if int(os.environ.get("JAXSIM_COLLISION_USE_BOTTOM_ONLY", "0")):
# Keep only the points with z <= 0.
points = [point for point in points if point[2] <= 0]

Expand Down

0 comments on commit f716159

Please sign in to comment.