feat(perception): add ground-aware cuboid refusion
This commit is contained in:
@@ -8,7 +8,7 @@ from collections.abc import Callable
|
||||
from contextlib import suppress
|
||||
from dataclasses import dataclass
|
||||
from pathlib import Path
|
||||
from typing import Literal, TypedDict
|
||||
from typing import Any, Literal, TypedDict
|
||||
from uuid import UUID, uuid4
|
||||
|
||||
import numpy as np
|
||||
@@ -534,6 +534,19 @@ def _recorded_blueprint(
|
||||
),
|
||||
).visualizer()
|
||||
point_visualizer.id = RECORDED_POINTS_VISUALIZER_ID
|
||||
accumulated_time_ranges = (
|
||||
rrb.VisibleTimeRanges(time_ranges) if time_ranges is not None else None
|
||||
)
|
||||
point_overrides: list[Any] = [
|
||||
rrb.EntityBehavior(visible=settings.show_points),
|
||||
point_visualizer,
|
||||
]
|
||||
trajectory_overrides: list[Any] = [
|
||||
rrb.EntityBehavior(visible=settings.show_trajectory),
|
||||
]
|
||||
if accumulated_time_ranges is not None:
|
||||
point_overrides.append(accumulated_time_ranges)
|
||||
trajectory_overrides.append(accumulated_time_ranges)
|
||||
spatial_view = rrb.Spatial3DView(
|
||||
origin="/world",
|
||||
name="Пространственная сцена",
|
||||
@@ -548,21 +561,17 @@ def _recorded_blueprint(
|
||||
# therefore hide/reveal already-recorded entities without
|
||||
# rewriting the data RRD. Keep the point visualizer alongside it
|
||||
# so size/color overrides remain active for the same entity.
|
||||
"/world/points": [
|
||||
rrb.EntityBehavior(visible=settings.show_points),
|
||||
point_visualizer,
|
||||
],
|
||||
"/world/trajectory": rrb.EntityBehavior(
|
||||
visible=settings.show_trajectory,
|
||||
),
|
||||
"/world/points": point_overrides,
|
||||
"/world/trajectory": trajectory_overrides,
|
||||
# Dynamic perception must not inherit the mapping view's
|
||||
# historical accumulation window. It is rendered latest-at in
|
||||
# the dedicated perception view below.
|
||||
"/world/perception": rrb.EntityBehavior(visible=False),
|
||||
},
|
||||
# A positive window accumulates historical frames. With no
|
||||
# window, latest-at deliberately keeps one current LiDAR frame.
|
||||
time_ranges=time_ranges,
|
||||
# Clear any prior view-level accumulation and scope the operator's
|
||||
# history window to mapping entities above. Dynamic perception then
|
||||
# remains latest-at even when both layers share this world view.
|
||||
time_ranges=rrb.VisibleTimeRanges([]),
|
||||
)
|
||||
spatial_view.id = RECORDED_SPATIAL_VIEW_ID
|
||||
camera_view = rrb.Spatial2DView(
|
||||
@@ -599,9 +608,7 @@ def _recorded_blueprint(
|
||||
name="Маршрут и время",
|
||||
)
|
||||
metrics_view.id = RECORDED_METRICS_VIEW_ID
|
||||
active_tab = {"spatial": 0, "perception": 1, "perception3d": 2, "metrics": 3}[
|
||||
active_view
|
||||
]
|
||||
active_tab = {"spatial": 0, "perception": 1, "perception3d": 2, "metrics": 3}[active_view]
|
||||
root_container = rrb.Tabs(
|
||||
spatial_view,
|
||||
camera_view,
|
||||
|
||||
Reference in New Issue
Block a user