Spaces:
Sleeping
Sleeping
Remove optional selected_subject parameter from log_subjects method
Browse files- visualization/logger.py +2 -3
- visualization/visualizer.py +1 -2
visualization/logger.py
CHANGED
@@ -27,15 +27,14 @@ class SimulationLogger:
|
|
27 |
])
|
28 |
), timeless=True)
|
29 |
|
30 |
-
def log_subjects(self, subjects: List[Dict[str, Any]]
|
31 |
if not subjects:
|
32 |
return
|
33 |
|
34 |
for idx, subject in enumerate(subjects):
|
35 |
try:
|
36 |
vertices, faces = create_subject_mesh(subject)
|
37 |
-
subject_color = [0.8, 0.2, 0.2, 1.0]
|
38 |
-
0.8, 0.8, 0.8, 1.0]
|
39 |
|
40 |
rr.log(
|
41 |
f"world/subject_{idx}",
|
|
|
27 |
])
|
28 |
), timeless=True)
|
29 |
|
30 |
+
def log_subjects(self, subjects: List[Dict[str, Any]]) -> None:
|
31 |
if not subjects:
|
32 |
return
|
33 |
|
34 |
for idx, subject in enumerate(subjects):
|
35 |
try:
|
36 |
vertices, faces = create_subject_mesh(subject)
|
37 |
+
subject_color = [0.8, 0.2, 0.2, 1.0]
|
|
|
38 |
|
39 |
rr.log(
|
40 |
f"world/subject_{idx}",
|
visualization/visualizer.py
CHANGED
@@ -27,8 +27,7 @@ def visualize_simulation(file, simulation_index: Optional[int]) -> Optional[str]
|
|
27 |
|
28 |
logger = SimulationLogger()
|
29 |
logger.log_metadata(simulation['instructions'])
|
30 |
-
logger.log_subjects(
|
31 |
-
simulation['subjects'], simulation.get('selectedSubject'))
|
32 |
logger.log_camera_trajectory(simulation['cameraFrames'])
|
33 |
logger.log_camera_frames(simulation['cameraFrames'])
|
34 |
|
|
|
27 |
|
28 |
logger = SimulationLogger()
|
29 |
logger.log_metadata(simulation['instructions'])
|
30 |
+
logger.log_subjects(simulation['subjects'])
|
|
|
31 |
logger.log_camera_trajectory(simulation['cameraFrames'])
|
32 |
logger.log_camera_frames(simulation['cameraFrames'])
|
33 |
|