Skip to content
Prev Previous commit
removed pyvista and pykdtree dependency
  • Loading branch information
vittorione94 committed Dec 7, 2024
commit 29672b246f025671800e9e4f39e01ae89aa74b88
9 changes: 4 additions & 5 deletions dm_control/locomotion/walkers/assets/dog_v2/add_muscles.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@
from os.path import isfile, join

import numpy as np
import pyvista as pv
import trimesh
from pykdtree.kdtree import KDTree
from scipy.spatial import KDTree
from tqdm import tqdm
from utils import array_to_string, slices2paths

Expand Down Expand Up @@ -245,8 +244,8 @@ def add_muscles(
for mtu in muscles:
# Load stl file of site
m = trimesh.load_mesh(muscle_meshes_path + mtu + ".stl")
pv_mesh = pv.read(muscle_meshes_path + mtu + ".stl")
volumes.append(pv_mesh.volume)

volumes.append(m.volume)
# check along which axis to slice
if mtu not in muscles_constants.LATERAL:
plane_normal = [0, 0, -1]
Expand Down Expand Up @@ -418,7 +417,7 @@ def add_muscles(
# are perfectly set up. This is not the case, so the method below is used.
# This method randomly samples the joint limits and records the minimum and
# maximum length of the muscles. Sampling is necessary because some muscles
# cross multiple joints (Biarticular muscles).
# cross multiple joints (Biarticular muscles).
if lengthrange_from_joints:
vector_min = np.ones(physics.model.ntendon) * np.inf
vector_max = np.ones(physics.model.ntendon) * -np.inf
Expand Down