-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from Ipuch/main
feat: see charts when loading a motion, gravity and fix multimodel spaceviews
- Loading branch information
Showing
8 changed files
with
105 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import numpy as np | ||
import rerun as rr | ||
|
||
from ..abstract.abstract_class import TimelessComponent | ||
|
||
|
||
class Gravity(TimelessComponent): | ||
|
||
def __init__(self, name, vector: np.ndarray): | ||
self.name = name + "/gravity" | ||
self.vector = vector / 20 | ||
|
||
@property | ||
def nb_components(self): | ||
return 1 | ||
|
||
def to_rerun(self) -> None: | ||
rr.log( | ||
self.name, | ||
rr.Arrows3D(origins=np.zeros(3), vectors=self.vector, colors=np.array([255, 255, 255])), | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from typing import Any | ||
|
||
|
||
class TimelessRerunPhase: | ||
def __init__(self, name, phase: int): | ||
self.name = name | ||
self.phase = phase | ||
self.timeless_components = [] | ||
|
||
def add_component(self, component: Any): | ||
self.timeless_components.append(component) | ||
|
||
def to_rerun(self): | ||
for data in self.timeless_components: | ||
data.to_rerun() | ||
|
||
@property | ||
def component_names(self) -> list[str]: | ||
return [data.name for data in self.timeless_components] |