Skip to content

Commit cce12e8

Browse files
committed
Rename shape_types with link_shapes
1 parent 875700e commit cce12e8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/jaxsim/api/kin_dyn_parameters.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,13 +1014,13 @@ def compute_mass_inertia(shape_idx, dims, density):
10141014

10151015
@staticmethod
10161016
def _convert_scaling_to_3d_vector(
1017-
shape_types: jtp.Int, scaling_factors: jtp.Vector
1017+
link_shapes: jtp.Int, scaling_factors: jtp.Vector
10181018
) -> jtp.Vector:
10191019
"""
10201020
Convert scaling factors for specific shape dimensions into a 3D scaling vector.
10211021
10221022
Args:
1023-
shape_types: The shape_types of the link (e.g., box, sphere, cylinder).
1023+
link_shapes: The link_shapes of the link (e.g., box, sphere, cylinder).
10241024
scaling_factors: The scaling factors for the shape dimensions.
10251025
10261026
Returns:
@@ -1033,7 +1033,7 @@ def _convert_scaling_to_3d_vector(
10331033
- Sphere: [r, r, r]
10341034
"""
10351035

1036-
# Index mapping for each shape type (shape_type x 3 dims)
1036+
# Index mapping for each shape type (link_shapes x 3 dims)
10371037
# Box: [lx, ly, lz] -> [0, 1, 2]
10381038
# Cylinder: [r, r, l] -> [0, 0, 1]
10391039
# Sphere: [r, r, r] -> [0, 0, 0]
@@ -1046,7 +1046,7 @@ def _convert_scaling_to_3d_vector(
10461046
)
10471047

10481048
# For each link, get the index vector for its shape
1049-
per_link_indices = shape_indices[shape_types]
1049+
per_link_indices = shape_indices[link_shapes]
10501050

10511051
# Gather dims per link according to per_link_indices
10521052
return scaling_factors.dims[per_link_indices.squeeze()]

0 commit comments

Comments
 (0)