base
Torch trajectory base classes.
Classes:
| Name | Description |
|---|---|
BaseTrajectory |
Abstract base class for batched torch trajectory implementations. |
SpatialTrajectory |
Torch base class for trajectories centered around a batched world-frame anchor. |
BaseTrajectory
dataclass
BaseTrajectory(*, yaw_from_velocity: bool = True, fixed_yaw: Tensor | None = None, attitude: Tensor | None = None, body_rate: Tensor | None = None)
Bases: ABC
Abstract base class for batched torch trajectory implementations.
Methods:
| Name | Description |
|---|---|
sample_heading |
Sample batched yaw and yaw-rate references for time values |
build_target |
Assemble a batched 12D target tensor from motion primitives. |
sample |
Sample a batched 12D target tensor for time values |
sample_heading
sample_heading(t: Tensor, pos: Tensor, vel: Tensor, acc: Tensor) -> tuple[torch.Tensor, torch.Tensor]
Sample batched yaw and yaw-rate references for time values t.
build_target
build_target(t: Tensor, pos: Tensor, vel: Tensor, acc: Tensor) -> torch.Tensor
Assemble a batched 12D target tensor from motion primitives.
sample
abstractmethod
sample(t: Tensor) -> torch.Tensor
Sample a batched 12D target tensor for time values t.
SpatialTrajectory
dataclass
SpatialTrajectory(*, yaw_from_velocity: bool = True, fixed_yaw: Tensor | None = None, attitude: Tensor | None = None, body_rate: Tensor | None = None, center: Tensor)
Bases: BaseTrajectory
Torch base class for trajectories centered around a batched world-frame anchor.
Methods:
| Name | Description |
|---|---|
__post_init__ |
Initialize shared tensors from the center batch shape when available. |
sample_heading |
Sample batched yaw and yaw-rate references for time values |
build_target |
Assemble a batched 12D target tensor from motion primitives. |
sample |
Sample a batched 12D target tensor for time values |
__post_init__
__post_init__()
Initialize shared tensors from the center batch shape when available.
sample_heading
sample_heading(t: Tensor, pos: Tensor, vel: Tensor, acc: Tensor) -> tuple[torch.Tensor, torch.Tensor]
Sample batched yaw and yaw-rate references for time values t.
build_target
build_target(t: Tensor, pos: Tensor, vel: Tensor, acc: Tensor) -> torch.Tensor
Assemble a batched 12D target tensor from motion primitives.
sample
abstractmethod
sample(t: Tensor) -> torch.Tensor
Sample a batched 12D target tensor for time values t.