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
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ And also animate biorbd models from the pyomeca organization.

```bash
conda install -c conda-forge pyorerun rerun-sdk=0.27.2
pip install trc-data-reader # for .trc file support, not available on conda
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 @@ -63,7 +62,7 @@ animation.rerun()
```

## From source
```conda install -c conda-forge ezc3d rerun-sdk=0.27.2 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 trc-data-reader```

if you want to use the OpenSim, you also need to install separately:
```conda install -c opensim-org::opensim```
Expand All @@ -72,9 +71,6 @@ if you want to use the BioBuddy, you also need to install separately:
```conda install -c conda-forge biobuddy=0.2.0``` or
```pip install biobuddy==0.2.0```

if you want to use the .trc file support, you also need to install separately:
``` pip install trc-data-reader ```

Then, ensure it is accessible in your Python environment by installing the package:

``` pip install . ``` or ``` python setup.py install ```
Expand Down
1 change: 1 addition & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ channels:
- opensim-org
dependencies:
- ezc3d
- trc-data-reader>=0.4.0
- rerun-sdk=0.27.2
- numpy
- matplotlib
Expand Down
11 changes: 11 additions & 0 deletions pyorerun/multi_frame_rate_phase_rerun.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import numpy as np
import rerun as rr
import rerun.blueprint as rrb

from .phase_rerun import PhaseRerun

Expand Down Expand Up @@ -120,6 +121,16 @@ def rerun(
if init:
spawn = not notebook and os.environ.get("PYORERUN_HEADLESS", "0").lower() not in ("1", "true", "yes")
rr.init(f"{name}_{0}", spawn=spawn)
rr.log("/", rr.ViewCoordinates.RIGHT_HAND_Y_UP, static=True)
rr.send_blueprint(
rrb.Blueprint(
rrb.Spatial3DView(
name="",
origin=f"/",
eye_controls=rrb.archetypes.EyeControls3D(eye_up=[0, 1, 0]), # Y-axis as up
)
)
)

for phase_rerun in self.phase_reruns:
frame = 0
Expand Down
22 changes: 22 additions & 0 deletions pyorerun/multi_phase_rerun.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,17 @@ def all_windows(self) -> list[str]:
def rerun_by_frame(self, server_name: str = "multi_phase_animation", notebook=False) -> None:
spawn = not notebook and os.environ.get("PYORERUN_HEADLESS", "0").lower() not in ("1", "true", "yes")
rr.init(server_name, spawn=spawn)
rr.log("/", rr.ViewCoordinates.RIGHT_HAND_Y_UP, static=True)
rr.send_blueprint(
rrb.Blueprint(
rrb.Spatial3DView(
name="",
origin=f"/",
eye_controls=rrb.archetypes.EyeControls3D(eye_up=[0, 1, 0]), # Y-axis as up
)
)
)

for i, phase in enumerate(self.rerun_biorbd_phases):
for j, (window, rr_phase) in enumerate(phase.items()):

Expand All @@ -100,6 +111,17 @@ def rerun_by_frame(self, server_name: str = "multi_phase_animation", notebook=Fa
def rerun(self, server_name: str = "multi_phase_animation", notebook=False) -> None:
spawn = not notebook and os.environ.get("PYORERUN_HEADLESS", "0").lower() not in ("1", "true", "yes")
rr.init(server_name, spawn=spawn)
rr.log("/", rr.ViewCoordinates.RIGHT_HAND_Y_UP, static=True)
rr.send_blueprint(
rrb.Blueprint(
rrb.Spatial3DView(
name="",
origin=f"/",
eye_controls=rrb.archetypes.EyeControls3D(eye_up=[0, 1, 0]), # Y-axis as up
)
)
)

for i, phase in enumerate(self.rerun_biorbd_phases):
for j, (window, rr_phase) in enumerate(phase.items()):

Expand Down
Loading