Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
We can rerun c3d files and display their original content.
And also animate biorbd models from the pyomeca organization.

``` conda install -c conda-forge pyorerun rerun-sdk=0.24.1```
``` conda install -c conda-forge pyorerun rerun-sdk=0.27.2```
``` pip install trc-data-reader``` # for .trc file support
``` conda install opensim-org::opensim # not a mandatory dependency```
``` conda install -c conda-forge biobuddy=0.2.0 # not a mandatory dependency```
Expand Down Expand Up @@ -59,7 +59,7 @@ animation.rerun()
```

## From source
```conda install -c conda-forge ezc3d rerun-sdk=0.24 trimesh numpy biorbd pyomeca tk imageio imageio-ffmpeg```
```conda install -c conda-forge ezc3d rerun-sdk=0.27.2 trimesh numpy biorbd pyomeca tk imageio imageio-ffmpeg```

if you want to use the OpenSim, you also need to install separately:
```conda install -c opensim-org::opensim```
Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ channels:
- opensim-org
dependencies:
- ezc3d
- rerun-sdk=0.24.1
- rerun-sdk=0.27.2
- numpy
- matplotlib
- biorbd>=1.10.5
Expand Down
20 changes: 15 additions & 5 deletions pyorerun/model_interfaces/pinocchio_model_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ def mesh_path(self) -> list[str]:
".mesh",
".ply",
]:
if self._mesh_dir and not os.path.isabs(mesh_path_str):
mesh_path_str = str(self._mesh_dir / mesh_path_str)
mesh_paths.append(mesh_path_str)
return mesh_paths

Expand Down Expand Up @@ -158,10 +156,9 @@ def marker_names(self) -> tuple[str, ...]:
In Pinocchio, markers can be represented as frames or operational frames.
This returns all frame names that could represent markers.
"""
# Get all frames that are not joint frames
marker_frames = []
for frame in self.model.frames:
if frame.type == pin.FrameType.OP_FRAME:
if frame.type == pin.FrameType.SENSOR:
marker_frames.append(frame.name)
return tuple(marker_frames)

Expand Down Expand Up @@ -275,8 +272,21 @@ def nb_q(self) -> int:
def dof_names(self) -> tuple[str, ...]:
"""
Returns the names of all degrees of freedom.

Notes
-----
We need to skip the first joint (universe) as it has no DoFs.
Joint DoFs can have individual names if they have multiple DoFs (e.g., a 3-DoF joint).
"""
return tuple(self.model.names[1:]) # Skip universe/world
dof_names = []
for joint, name in zip(self.model.joints[1:], self.model.names[1:]):
if joint.nq == 0:
continue

for k in range(joint.nq):
dof_names.append(f"{name}_{k}")

return tuple(dof_names)

@cached_property
def q_ranges(self) -> tuple[tuple[float, float], ...]:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ classifiers = [
dependencies = [
"ezc3d", # Now needed, but imported for our custom PyoMarkers.from_c3d()
"numpy",
"rerun-sdk==0.24.1",
"rerun-sdk==0.27.2",
"trimesh",
"tk",
"imageio",
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
install_requires=[
"ezc3d", # Not yet available on pypi, use `conda install -c conda-forge ezc3d`
"numpy",
"rerun-sdk=0.24.1",
"rerun-sdk=0.27.2",
"trimesh",
"tk",
"imageio",
Expand Down
Loading