diff --git a/bioviz/__init__.py b/bioviz/__init__.py index 5d988b3..f2eba6c 100644 --- a/bioviz/__init__.py +++ b/bioviz/__init__.py @@ -206,8 +206,8 @@ def _get_data_from_eigen(self, Q=None, compute_kin=True): def _get_data_from_casadi(self, Q=None, compute_kin=True): self.data = [] for i in range(self.m.nbSegment()): - nb_vertex = self.m.segment(i).characteristics().mesh().nbVertex() - vertices = np.ndarray((3, nb_vertex, 1)) + n_vertex = self.m.segment(i).characteristics().mesh().nbVertex() + vertices = np.ndarray((3, n_vertex, 1)) vertices[:, :, 0] = self.segments[i](Q) self.data.append(vertices) @@ -300,15 +300,15 @@ def __init__( # Create all the reference to the things to plot self.nQ = self.model.nbQ() self.Q = np.zeros(self.nQ) - self.markers = Markers(np.ndarray((3, self.model.nbMarkers(), 1))) if self.show_markers: self.Markers = InterfacesCollections.Markers(self.model) - self.global_center_of_mass = Markers(np.ndarray((3, 1, 1))) + self.markers = Markers(np.ndarray((3, self.model.nbMarkers(), 1))) if self.show_global_center_of_mass: self.CoM = InterfacesCollections.CoM(self.model) - self.segments_center_of_mass = Markers(np.ndarray((3, self.model.nbSegment(), 1))) + self.global_center_of_mass = Markers(np.ndarray((3, 1, 1))) if self.show_segments_center_of_mass: self.CoMbySegment = InterfacesCollections.CoMbySegment(self.model) + self.segments_center_of_mass = Markers(np.ndarray((3, self.model.nbSegment(), 1))) if self.show_meshes: self.mesh = [] self.meshPointsInMatrix = InterfacesCollections.MeshPointsInMatrix(self.model) @@ -826,3 +826,4 @@ def __set_rt_from_q(self): for k, rt in enumerate(self.allGlobalJCS.get_data(Q=self.Q, compute_kin=False)): self.rt[k] = Rototrans(rt) self.vtk_model.update_rt(self.rt) + diff --git a/environment.yml b/environment.yml index 3bc8cd3..c9f9e6c 100644 --- a/environment.yml +++ b/environment.yml @@ -1,14 +1,20 @@ # create a dev conda environment with: `make create_env` or `conda env create -f environment.yml` -name: biorbd-viz +name: bioptim channels: - conda-forge dependencies: - python + - numpy + - matplotlib + - scipy - pyomeca - vtk - pyqt - pandas - eigen + - casadi - rbdl - biorbd - packaging + - pytest + - setuptools diff --git a/requirements.yml b/requirements.yml new file mode 100644 index 0000000..6a21f1a --- /dev/null +++ b/requirements.yml @@ -0,0 +1,10 @@ +numpy +casadi +pytest +matplotlib +scipy +packaging +setuptools +rbdl=*=*casadi* +biorbd=*=*casadi* +biorviz=*=*casadi*