@@ -1014,13 +1014,13 @@ def compute_mass_inertia(shape_idx, dims, density):
1014
1014
1015
1015
@staticmethod
1016
1016
def _convert_scaling_to_3d_vector (
1017
- shape_types : jtp .Int , scaling_factors : jtp .Vector
1017
+ link_shapes : jtp .Int , scaling_factors : jtp .Vector
1018
1018
) -> jtp .Vector :
1019
1019
"""
1020
1020
Convert scaling factors for specific shape dimensions into a 3D scaling vector.
1021
1021
1022
1022
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).
1024
1024
scaling_factors: The scaling factors for the shape dimensions.
1025
1025
1026
1026
Returns:
@@ -1033,7 +1033,7 @@ def _convert_scaling_to_3d_vector(
1033
1033
- Sphere: [r, r, r]
1034
1034
"""
1035
1035
1036
- # Index mapping for each shape type (shape_type x 3 dims)
1036
+ # Index mapping for each shape type (link_shapes x 3 dims)
1037
1037
# Box: [lx, ly, lz] -> [0, 1, 2]
1038
1038
# Cylinder: [r, r, l] -> [0, 0, 1]
1039
1039
# Sphere: [r, r, r] -> [0, 0, 0]
@@ -1046,7 +1046,7 @@ def _convert_scaling_to_3d_vector(
1046
1046
)
1047
1047
1048
1048
# 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 ]
1050
1050
1051
1051
# Gather dims per link according to per_link_indices
1052
1052
return scaling_factors .dims [per_link_indices .squeeze ()]
0 commit comments