File size: 680 Bytes
314ecfb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
"""Stream metadata and training-only labels, deliberately separate from policy inputs."""
from typing import NamedTuple, List, Dict, Optional
from torch import Tensor
from utils.custom_types import DrivingExample


class PIMStreamBatch(NamedTuple):
    frames: List[DrivingExample]
    timestamps: Tensor                 # [B,T], episode-relative seconds
    ego_poses: Tensor                  # [B,T,3], world x/y/yaw in radians
    labels: List[Optional[Dict[str, Tensor]]]


class PIMStepOutput(NamedTuple):
    speed_wps: Tensor
    route: Tensor
    state: object
    diagnostics: Dict[str, Tensor]
    action_features: Tensor
    scene_tokens: Tensor
    scene_mask: Tensor