Skip to content

Commit

Permalink
Minor typing update
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoferigo committed Jun 12, 2024
1 parent 8947957 commit 82502a3
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/jaxsim/parsers/rod/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,15 @@ def from_sdf_inertial(inertial: rod.Inertial) -> jtp.Matrix:
return M_L.astype(dtype=float)


def joint_to_joint_type(
joint: rod.Joint,
) -> descriptions.JointType:
def joint_to_joint_type(joint: rod.Joint) -> int:
"""
Extract the joint type from an SDF joint.
Args:
joint: The parsed SDF joint.
Returns:
The corresponding joint type description.
The integer corresponding to the joint type.
"""

axis = joint.axis
Expand Down Expand Up @@ -138,7 +136,7 @@ def create_box_collision(
collidable_points = [
descriptions.CollidablePoint(
parent_link=link_description,
position=corner,
position=np.array(corner),
enabled=True,
)
for corner in box_corners_wrt_link.T
Expand Down Expand Up @@ -197,7 +195,7 @@ def fibonacci_sphere(samples: int) -> npt.NDArray:
collidable_points = [
descriptions.CollidablePoint(
parent_link=link_description,
position=point,
position=np.array(point),
enabled=True,
)
for point in sphere_points_wrt_link.T
Expand Down

0 comments on commit 82502a3

Please sign in to comment.