Skip to content

Commit 16dd086

Browse files
authored
[MISC] Force public getters to return by-value to avoid mistake. (Genesis-Embodied-AI#2184)
* Force public getters to return by-value to avoid mistake. * Fix unit test download timeout issue. * Fix generic CI artifact upload/download logics.
1 parent 0b45608 commit 16dd086

File tree

6 files changed

+56
-55
lines changed

6 files changed

+56
-55
lines changed

.github/workflows/generic.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ jobs:
149149
OS_FAMILY=$(python -c "import platform; print(platform.system())")
150150
MACHINE_ARCH=$(python -c "import platform; print(platform.machine())")
151151
GSTAICHI_VERSION=$(python -c "import importlib.metadata ; print(importlib.metadata.version('gstaichi'))")
152-
echo "ARTIFACT_PREFIX=${OS_FAMILY}-${MACHINE_ARCH}-${GSTAICHI_VERSION}-${{ matrix.GS_BACKEND }}-${{ matrix.GS_ENABLE_NDARRAY }}" >> $GITHUB_OUTPUT
152+
echo "ARTIFACT_PREFIX=${OS_FAMILY}-${MACHINE_ARCH}-${GSTAICHI_VERSION}" >> $GITHUB_OUTPUT
153153
154154
- name: Restore Taichi Kernel Cache
155155
if: ${{ always() && steps.artifact_prefix.outputs.ARTIFACT_PREFIX != '' }}
@@ -165,11 +165,12 @@ jobs:
165165
pytest -v --logical --dev --backend ${{ matrix.GS_BACKEND }} -m required --forked ./tests
166166
167167
- name: Save Updated Taichi Kernel Cache
168-
# lets match this version to the black format check
169168
if: >-
170169
${{ always() &&
171-
(matrix.OS == 'ubuntu-24.04' || matrix.OS == 'macos-15' || matrix.OS == 'windows-2025') &&
170+
(matrix.OS == 'ubuntu-24.04' || matrix.OS == 'ubuntu-24.04-arm' || matrix.OS == 'macos-15' || matrix.OS == 'windows-2025') &&
172171
matrix.PYTHON_VERSION == '3.12' &&
172+
matrix.GS_BACKEND == 'cpu' &&
173+
matrix.GS_ENABLE_NDARRAY == '1' &&
173174
steps.artifact_prefix.outputs.ARTIFACT_PREFIX != '' }}
174175
uses: actions/cache/save@v4
175176
with:

genesis/engine/entities/rigid_entity/rigid_entity.py

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1418,13 +1418,13 @@ def inverse_kinematics_multilink(
14181418
self._solver._static_rigid_sim_config,
14191419
)
14201420

1421-
qpos = ti_to_torch(self._IK_qpos_best, transpose=True)
1421+
qpos = ti_to_torch(self._IK_qpos_best, transpose=True, copy=True)
14221422
qpos = qpos[0] if self._solver.n_envs == 0 else qpos[envs_idx]
14231423

14241424
if return_error:
1425-
error_pose = ti_to_torch(self._IK_err_pose_best, transpose=True).reshape((-1, self._IK_n_tgts, 6))[
1426-
:, :n_links
1427-
]
1425+
error_pose = ti_to_torch(self._IK_err_pose_best, transpose=True, copy=True).reshape(
1426+
(-1, self._IK_n_tgts, 6)
1427+
)[:, :n_links]
14281428
error_pose = error_pose[0] if self._solver.n_envs == 0 else error_pose[envs_idx]
14291429
return qpos, error_pose
14301430
return qpos
@@ -2848,9 +2848,8 @@ def get_links_net_contact_force(self, envs_idx=None):
28482848
entity_links_force : torch.Tensor, shape (n_links, 3) or (n_envs, n_links, 3)
28492849
The net force applied on each links due to direct external contacts.
28502850
"""
2851-
tensor = ti_to_torch(
2852-
self._solver.links_state.contact_force, envs_idx, slice(self.link_start, self.link_end), transpose=True
2853-
)
2851+
links_idx = slice(self.link_start, self.link_end)
2852+
tensor = ti_to_torch(self._solver.links_state.contact_force, envs_idx, links_idx, transpose=True, copy=True)
28542853
return tensor[0] if self._solver.n_envs == 0 else tensor
28552854

28562855
def set_friction_ratio(self, friction_ratio, links_idx_local=None, envs_idx=None):
@@ -2873,11 +2872,9 @@ def set_friction_ratio(self, friction_ratio, links_idx_local=None, envs_idx=None
28732872
)
28742873
links_friction_ratio = torch.as_tensor(friction_ratio, dtype=gs.tc_float, device=gs.device)
28752874
geoms_friction_ratio = torch.repeat_interleave(links_friction_ratio, links_n_geoms, dim=-1)
2876-
geoms_idx = torch.tensor(
2877-
[i_g for i_l in links_idx_local for i_g in range(self._links[i_l].geom_start, self._links[i_l].geom_end)],
2878-
dtype=gs.tc_int,
2879-
device=gs.device,
2880-
)
2875+
geoms_idx = [
2876+
i_g for i_l in links_idx_local for i_g in range(self._links[i_l].geom_start, self._links[i_l].geom_end)
2877+
]
28812878

28822879
self._solver.set_geoms_friction_ratio(geoms_friction_ratio, geoms_idx, envs_idx)
28832880

genesis/engine/solvers/base_solver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def set_gravity(self, gravity, envs_idx=None):
5757
_kernel_set_gravity_ndarray(gravity, envs_idx, self._gravity)
5858

5959
def get_gravity(self, envs_idx=None):
60-
tensor = ti_to_torch(self._gravity, envs_idx, transpose=True)
60+
tensor = ti_to_torch(self._gravity, envs_idx, transpose=True, copy=True)
6161
return tensor[0] if self.n_envs == 0 else tensor
6262

6363
def dump_ckpt_to_numpy(self) -> dict[str, np.ndarray]:

genesis/engine/solvers/fem_solver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1109,7 +1109,7 @@ def get_forces(self):
11091109
if not self.is_active:
11101110
return None
11111111

1112-
return ti_to_torch(self.elements_v_energy.force)
1112+
return ti_to_torch(self.elements_v_energy.force, copy=True)
11131113

11141114
@ti.kernel
11151115
def _kernel_add_elements(

genesis/engine/solvers/rigid/rigid_solver_decomp.py

Lines changed: 39 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -945,7 +945,7 @@ def substep(self, f):
945945

946946
def check_errno(self):
947947
if gs.use_zerocopy:
948-
errno = ti_to_torch(self._errno, copy=None).item()
948+
errno = ti_to_torch(self._errno).item()
949949
else:
950950
errno = kernel_get_errno(self._errno)
951951

@@ -2217,21 +2217,21 @@ def get_sol_params(self, geoms_idx=None, envs_idx=None, *, joints_idx=None, eqs_
22172217
"""
22182218
if eqs_idx is not None:
22192219
# Always batched
2220-
tensor = ti_to_torch(self.equalities_info.sol_params, envs_idx, eqs_idx, transpose=True)
2220+
tensor = ti_to_torch(self.equalities_info.sol_params, envs_idx, eqs_idx, transpose=True, copy=True)
22212221
if self.n_envs == 0:
22222222
tensor = tensor[0]
22232223
elif joints_idx is not None:
22242224
# Conditionally batched
22252225
assert envs_idx is None
22262226
# batch_shape = (envs_idx, joints_idx) if self._options.batch_joints_info else (joints_idx,)
22272227
# tensor = ti_to_torch(self.joints_info.sol_params, *batch_shape, transpose=True)
2228-
tensor = ti_to_torch(self.joints_info.sol_params, envs_idx, joints_idx, transpose=True)
2228+
tensor = ti_to_torch(self.joints_info.sol_params, envs_idx, joints_idx, transpose=True, copy=True)
22292229
if self.n_envs == 0 and self._options.batch_joints_info:
22302230
tensor = tensor[0]
22312231
else:
22322232
# Never batched
22332233
assert envs_idx is None
2234-
tensor = ti_to_torch(self.geoms_info.sol_params, geoms_idx, transpose=True)
2234+
tensor = ti_to_torch(self.geoms_info.sol_params, geoms_idx, transpose=True, copy=True)
22352235
return tensor
22362236

22372237
@staticmethod
@@ -2260,37 +2260,37 @@ def get_links_pos(
22602260

22612261
ref = self._convert_ref_to_idx(ref)
22622262
if ref == 0:
2263-
tensor = ti_to_torch(self.links_state.root_COM, envs_idx, links_idx, transpose=True)
2263+
tensor = ti_to_torch(self.links_state.root_COM, envs_idx, links_idx, transpose=True, copy=True)
22642264
elif ref == 1:
22652265
i_pos = ti_to_torch(self.links_state.i_pos, envs_idx, links_idx, transpose=True)
22662266
root_COM = ti_to_torch(self.links_state.root_COM, envs_idx, links_idx, transpose=True)
22672267
tensor = i_pos + root_COM
22682268
elif ref == 2:
2269-
tensor = ti_to_torch(self.links_state.pos, envs_idx, links_idx, transpose=True)
2269+
tensor = ti_to_torch(self.links_state.pos, envs_idx, links_idx, transpose=True, copy=True)
22702270
else:
22712271
gs.raise_exception("'ref' must be either 'link_origin', 'link_com', or 'root_com'.")
22722272

22732273
return tensor[0] if self.n_envs == 0 else tensor
22742274

22752275
def get_links_quat(self, links_idx=None, envs_idx=None, *, to_torch=True):
2276-
tensor = ti_to_torch(self.links_state.quat, envs_idx, links_idx, transpose=True)
2276+
tensor = ti_to_torch(self.links_state.quat, envs_idx, links_idx, transpose=True, copy=True)
22772277
return tensor[0] if self.n_envs == 0 else tensor
22782278

22792279
def get_links_vel(
22802280
self, links_idx=None, envs_idx=None, *, ref: Literal["link_origin", "link_com", "root_com"] = "link_origin"
22812281
):
22822282
if gs.use_zerocopy:
22832283
mask = (0, *indices_to_mask(links_idx)) if self.n_envs == 0 else indices_to_mask(envs_idx, links_idx)
2284-
cd_vel = ti_to_torch(self.links_state.cd_vel, transpose=True, copy=False)
2284+
cd_vel = ti_to_torch(self.links_state.cd_vel, transpose=True)
22852285
if ref == "root_com":
22862286
return cd_vel[mask]
2287-
cd_ang = ti_to_torch(self.links_state.cd_ang, transpose=True, copy=False)
2287+
cd_ang = ti_to_torch(self.links_state.cd_ang, transpose=True)
22882288
if ref == "link_com":
2289-
i_pos = ti_to_torch(self.links_state.i_pos, transpose=True, copy=False)
2289+
i_pos = ti_to_torch(self.links_state.i_pos, transpose=True)
22902290
delta = i_pos[mask]
22912291
else:
2292-
pos = ti_to_torch(self.links_state.pos, transpose=True, copy=False)
2293-
root_COM = ti_to_torch(self.links_state.root_COM, transpose=True, copy=False)
2292+
pos = ti_to_torch(self.links_state.pos, transpose=True)
2293+
root_COM = ti_to_torch(self.links_state.root_COM, transpose=True)
22942294
delta = pos[mask] - root_COM[mask]
22952295
return cd_vel[mask] + cd_ang[mask].cross(delta, dim=-1)
22962296

@@ -2303,7 +2303,7 @@ def get_links_vel(
23032303
return _tensor
23042304

23052305
def get_links_ang(self, links_idx=None, envs_idx=None, *, to_torch=True):
2306-
tensor = ti_to_torch(self.links_state.cd_ang, envs_idx, links_idx, transpose=True)
2306+
tensor = ti_to_torch(self.links_state.cd_ang, envs_idx, links_idx, transpose=True, copy=True)
23072307
return tensor[0] if self.n_envs == 0 else tensor
23082308

23092309
def get_links_acc(self, links_idx=None, envs_idx=None):
@@ -2321,7 +2321,7 @@ def get_links_acc(self, links_idx=None, envs_idx=None):
23212321
return _tensor
23222322

23232323
def get_links_acc_ang(self, links_idx=None, envs_idx=None, *, to_torch=True):
2324-
tensor = ti_to_torch(self.links_state.cacc_ang, envs_idx, links_idx, transpose=True)
2324+
tensor = ti_to_torch(self.links_state.cacc_ang, envs_idx, links_idx, transpose=True, copy=True)
23252325
return tensor[0] if self.n_envs == 0 else tensor
23262326

23272327
def get_links_root_COM(self, links_idx=None, envs_idx=None, *, to_torch=True):
@@ -2331,39 +2331,39 @@ def get_links_root_COM(self, links_idx=None, envs_idx=None, *, to_torch=True):
23312331
This corresponds to the global COM of each entity, assuming a single-rooted structure - that is, as long as no
23322332
two successive links are connected by a free-floating joint (ie a joint that allows all 6 degrees of freedom).
23332333
"""
2334-
tensor = ti_to_torch(self.links_state.root_COM, envs_idx, links_idx, transpose=True)
2334+
tensor = ti_to_torch(self.links_state.root_COM, envs_idx, links_idx, transpose=True, copy=True)
23352335
return tensor[0] if self.n_envs == 0 else tensor
23362336

23372337
def get_links_mass_shift(self, links_idx=None, envs_idx=None, *, to_torch=True):
2338-
tensor = ti_to_torch(self.links_state.mass_shift, envs_idx, links_idx, transpose=True)
2338+
tensor = ti_to_torch(self.links_state.mass_shift, envs_idx, links_idx, transpose=True, copy=True)
23392339
return tensor[0] if self.n_envs == 0 else tensor
23402340

23412341
def get_links_COM_shift(self, links_idx=None, envs_idx=None, *, to_torch=True):
2342-
tensor = ti_to_torch(self.links_state.i_pos_shift, envs_idx, links_idx, transpose=True)
2342+
tensor = ti_to_torch(self.links_state.i_pos_shift, envs_idx, links_idx, transpose=True, copy=True)
23432343
return tensor[0] if self.n_envs == 0 else tensor
23442344

23452345
def get_links_inertial_mass(self, links_idx=None, envs_idx=None):
23462346
if self._options.batch_links_info and envs_idx is not None:
23472347
gs.raise_exception("`envs_idx` cannot be specified for non-batched links info.")
2348-
tensor = ti_to_torch(self.links_info.inertial_mass, envs_idx, links_idx, transpose=True)
2348+
tensor = ti_to_torch(self.links_info.inertial_mass, envs_idx, links_idx, transpose=True, copy=True)
23492349
return tensor[0] if self.n_envs == 0 and self._options.batch_links_info else tensor
23502350

23512351
def get_links_invweight(self, links_idx=None, envs_idx=None):
23522352
if self._options.batch_links_info and envs_idx is not None:
23532353
gs.raise_exception("`envs_idx` cannot be specified for non-batched links info.")
2354-
tensor = ti_to_torch(self.links_info.invweight, envs_idx, links_idx, transpose=True)
2354+
tensor = ti_to_torch(self.links_info.invweight, envs_idx, links_idx, transpose=True, copy=True)
23552355
return tensor[0] if self.n_envs == 0 and self._options.batch_links_info else tensor
23562356

23572357
def get_geoms_friction_ratio(self, geoms_idx=None, envs_idx=None):
2358-
tensor = ti_to_torch(self.geoms_state.friction_ratio, envs_idx, geoms_idx, transpose=True)
2358+
tensor = ti_to_torch(self.geoms_state.friction_ratio, envs_idx, geoms_idx, transpose=True, copy=True)
23592359
return tensor[0] if self.n_envs == 0 else tensor
23602360

23612361
def get_geoms_pos(self, geoms_idx=None, envs_idx=None):
2362-
tensor = ti_to_torch(self.geoms_state.pos, envs_idx, geoms_idx, transpose=True)
2362+
tensor = ti_to_torch(self.geoms_state.pos, envs_idx, geoms_idx, transpose=True, copy=True)
23632363
return tensor[0] if self.n_envs == 0 else tensor
23642364

23652365
def get_qpos(self, qs_idx=None, envs_idx=None):
2366-
tensor = ti_to_torch(self.qpos, envs_idx, qs_idx, transpose=True)
2366+
tensor = ti_to_torch(self.qpos, envs_idx, qs_idx, transpose=True, copy=True)
23672367
return tensor[0] if self.n_envs == 0 else tensor
23682368

23692369
def get_dofs_control_force(self, dofs_idx=None, envs_idx=None):
@@ -2375,92 +2375,94 @@ def get_dofs_control_force(self, dofs_idx=None, envs_idx=None):
23752375
return _tensor
23762376

23772377
def get_dofs_force(self, dofs_idx=None, envs_idx=None):
2378-
tensor = ti_to_torch(self.dofs_state.force, envs_idx, dofs_idx, transpose=True)
2378+
tensor = ti_to_torch(self.dofs_state.force, envs_idx, dofs_idx, transpose=True, copy=True)
23792379
return tensor[0] if self.n_envs == 0 else tensor
23802380

23812381
def get_dofs_velocity(self, dofs_idx=None, envs_idx=None):
2382-
tensor = ti_to_torch(self.dofs_state.vel, envs_idx, dofs_idx, transpose=True)
2382+
tensor = ti_to_torch(self.dofs_state.vel, envs_idx, dofs_idx, transpose=True, copy=True)
23832383
return tensor[0] if self.n_envs == 0 else tensor
23842384

23852385
def get_dofs_position(self, dofs_idx=None, envs_idx=None):
2386-
tensor = ti_to_torch(self.dofs_state.pos, envs_idx, dofs_idx, transpose=True)
2386+
tensor = ti_to_torch(self.dofs_state.pos, envs_idx, dofs_idx, transpose=True, copy=True)
23872387
return tensor[0] if self.n_envs == 0 else tensor
23882388

23892389
def get_dofs_kp(self, dofs_idx=None, envs_idx=None):
23902390
if not self._options.batch_dofs_info and envs_idx is not None:
23912391
gs.raise_exception("`envs_idx` cannot be specified for non-batched dofs info.")
2392-
tensor = ti_to_torch(self.dofs_info.kp, envs_idx, dofs_idx, transpose=True)
2392+
tensor = ti_to_torch(self.dofs_info.kp, envs_idx, dofs_idx, transpose=True, copy=True)
23932393
return tensor[0] if self.n_envs == 0 and self._options.batch_dofs_info else tensor
23942394

23952395
def get_dofs_kv(self, dofs_idx=None, envs_idx=None):
23962396
if not self._options.batch_dofs_info and envs_idx is not None:
23972397
gs.raise_exception("`envs_idx` cannot be specified for non-batched dofs info.")
2398-
tensor = ti_to_torch(self.dofs_info.kv, envs_idx, dofs_idx, transpose=True)
2398+
tensor = ti_to_torch(self.dofs_info.kv, envs_idx, dofs_idx, transpose=True, copy=True)
23992399
return tensor[0] if self.n_envs == 0 and self._options.batch_dofs_info else tensor
24002400

24012401
def get_dofs_force_range(self, dofs_idx=None, envs_idx=None):
24022402
if not self._options.batch_dofs_info and envs_idx is not None:
24032403
gs.raise_exception("`envs_idx` cannot be specified for non-batched dofs info.")
2404-
tensor = ti_to_torch(self.dofs_info.force_range, envs_idx, dofs_idx, transpose=True)
2404+
tensor = ti_to_torch(self.dofs_info.force_range, envs_idx, dofs_idx, transpose=True, copy=True)
24052405
if self.n_envs == 0 and self._options.batch_dofs_info:
24062406
tensor = tensor[0]
24072407
return tensor[..., 0], tensor[..., 1]
24082408

24092409
def get_dofs_limit(self, dofs_idx=None, envs_idx=None):
24102410
if not self._options.batch_dofs_info and envs_idx is not None:
24112411
gs.raise_exception("`envs_idx` cannot be specified for non-batched dofs info.")
2412-
tensor = ti_to_torch(self.dofs_info.limit, envs_idx, dofs_idx, transpose=True)
2412+
tensor = ti_to_torch(self.dofs_info.limit, envs_idx, dofs_idx, transpose=True, copy=True)
24132413
if self.n_envs == 0 and self._options.batch_dofs_info:
24142414
tensor = tensor[0]
24152415
return tensor[..., 0], tensor[..., 1]
24162416

24172417
def get_dofs_stiffness(self, dofs_idx=None, envs_idx=None):
24182418
if not self._options.batch_dofs_info and envs_idx is not None:
24192419
gs.raise_exception("`envs_idx` cannot be specified for non-batched dofs info.")
2420-
tensor = ti_to_torch(self.dofs_info.stiffness, envs_idx, dofs_idx, transpose=True)
2420+
tensor = ti_to_torch(self.dofs_info.stiffness, envs_idx, dofs_idx, transpose=True, copy=True)
24212421
return tensor[0] if self.n_envs == 0 and self._options.batch_dofs_info else tensor
24222422

24232423
def get_dofs_invweight(self, dofs_idx=None, envs_idx=None):
24242424
if not self._options.batch_dofs_info and envs_idx is not None:
24252425
gs.raise_exception("`envs_idx` cannot be specified for non-batched dofs info.")
2426-
tensor = ti_to_torch(self.dofs_info.invweight, envs_idx, dofs_idx, transpose=True)
2426+
tensor = ti_to_torch(self.dofs_info.invweight, envs_idx, dofs_idx, transpose=True, copy=True)
24272427
return tensor[0] if self.n_envs == 0 and self._options.batch_dofs_info else tensor
24282428

24292429
def get_dofs_armature(self, dofs_idx=None, envs_idx=None):
24302430
if not self._options.batch_dofs_info and envs_idx is not None:
24312431
gs.raise_exception("`envs_idx` cannot be specified for non-batched dofs info.")
2432-
tensor = ti_to_torch(self.dofs_info.armature, envs_idx, dofs_idx, transpose=True)
2432+
tensor = ti_to_torch(self.dofs_info.armature, envs_idx, dofs_idx, transpose=True, copy=True)
24332433
return tensor[0] if self.n_envs == 0 and self._options.batch_dofs_info else tensor
24342434

24352435
def get_dofs_damping(self, dofs_idx=None, envs_idx=None):
24362436
if not self._options.batch_dofs_info and envs_idx is not None:
24372437
gs.raise_exception("`envs_idx` cannot be specified for non-batched dofs info.")
2438-
tensor = ti_to_torch(self.dofs_info.damping, envs_idx, dofs_idx, transpose=True)
2438+
tensor = ti_to_torch(self.dofs_info.damping, envs_idx, dofs_idx, transpose=True, copy=True)
24392439
return tensor[0] if self.n_envs == 0 and self._options.batch_dofs_info else tensor
24402440

24412441
def get_dofs_frictionloss(self, dofs_idx=None, envs_idx=None):
24422442
if not self._options.batch_dofs_info and envs_idx is not None:
24432443
gs.raise_exception("`envs_idx` cannot be specified for non-batched dofs info.")
2444-
tensor = ti_to_torch(self.dofs_info.frictionloss, envs_idx, dofs_idx, transpose=True)
2444+
tensor = ti_to_torch(self.dofs_info.frictionloss, envs_idx, dofs_idx, transpose=True, copy=True)
24452445
return tensor[0] if self.n_envs == 0 and self._options.batch_dofs_info else tensor
24462446

24472447
def get_mass_mat(self, dofs_idx=None, envs_idx=None, decompose=False):
2448-
tensor = ti_to_torch(self.mass_mat_L if decompose else self.mass_mat, envs_idx, transpose=True)
2448+
tensor = ti_to_torch(self.mass_mat_L if decompose else self.mass_mat, envs_idx, transpose=True, copy=True)
24492449
if dofs_idx is not None:
24502450
tensor = tensor[indices_to_mask(None, dofs_idx, dofs_idx)]
24512451
if self.n_envs == 0:
24522452
tensor = tensor[0]
24532453

24542454
if decompose:
2455-
mass_mat_D_inv = ti_to_torch(self._rigid_global_info.mass_mat_D_inv, envs_idx, dofs_idx, transpose=True)
2455+
mass_mat_D_inv = ti_to_torch(
2456+
self._rigid_global_info.mass_mat_D_inv, envs_idx, dofs_idx, transpose=True, copy=True
2457+
)
24562458
if self.n_envs == 0:
24572459
mass_mat_D_inv = mass_mat_D_inv[0]
24582460
return tensor, mass_mat_D_inv
24592461

24602462
return tensor
24612463

24622464
def get_geoms_friction(self, geoms_idx=None):
2463-
return ti_to_torch(self.geoms_info.friction, geoms_idx, None)
2465+
return ti_to_torch(self.geoms_info.friction, geoms_idx, copy=True)
24642466

24652467
def get_AABB(self, entities_idx=None, envs_idx=None):
24662468
from genesis.engine.couplers import LegacyCoupler

0 commit comments

Comments
 (0)