base
Array API trajectory base classes.
Classes:
| Name | Description |
|---|---|
BaseTrajectory |
Abstract base class for time-parameterized Array API reference trajectories. |
SpatialTrajectory |
Base class for trajectories centered around a world-frame anchor point. |
BaseTrajectory
dataclass
BaseTrajectory(*, num_envs: int = 1, device: str | None = None, backend: BackendName | None = None, xp: ModuleType | None = None, initialize: bool = True, yaw_from_velocity: bool = True, fixed_yaw: ArrayLike | float = 0.0, attitude: ArrayLike | tuple[float, float] = (0.0, 0.0), body_rate: ArrayLike | tuple[float, float] = (0.0, 0.0))
Bases: ABC
Abstract base class for time-parameterized Array API reference trajectories.
Methods:
| Name | Description |
|---|---|
__post_init__ |
Initialize shared batched trajectory state. |
sample_heading |
Sample batched yaw and yaw-rate references for time values |
build_target |
Assemble a batched dict target from motion primitives. |
sample |
Sample the full target dict at time values |
__post_init__
__post_init__()
Initialize shared batched trajectory state.
sample_heading
sample_heading(t: ArrayLike, pos: ArrayLike, vel: ArrayLike, acc: ArrayLike) -> tuple[ArrayLike, ArrayLike]
Sample batched yaw and yaw-rate references for time values t.
build_target
build_target(t: ArrayLike, pos: ArrayLike, vel: ArrayLike, acc: ArrayLike) -> ControllerTarget
Assemble a batched dict target from motion primitives.
sample
abstractmethod
sample(t: ArrayLike) -> ControllerTarget
Sample the full target dict at time values t.
SpatialTrajectory
dataclass
SpatialTrajectory(*, num_envs: int = 1, device: str | None = None, backend: BackendName | None = None, xp: ModuleType | None = None, initialize: bool = True, yaw_from_velocity: bool = True, fixed_yaw: ArrayLike | float = 0.0, attitude: ArrayLike | tuple[float, float] = (0.0, 0.0), body_rate: ArrayLike | tuple[float, float] = (0.0, 0.0), center: ArrayLike | tuple[float, float, float] = (0.0, 0.0, 1.0))
Bases: BaseTrajectory
Base class for trajectories centered around a world-frame anchor point.
Methods:
| Name | Description |
|---|---|
__post_init__ |
Initialize the trajectory center as a batched backend array. |
sample_heading |
Sample batched yaw and yaw-rate references for time values |
build_target |
Assemble a batched dict target from motion primitives. |
sample |
Sample the full target dict at time values |
__post_init__
__post_init__()
Initialize the trajectory center as a batched backend array.
sample_heading
sample_heading(t: ArrayLike, pos: ArrayLike, vel: ArrayLike, acc: ArrayLike) -> tuple[ArrayLike, ArrayLike]
Sample batched yaw and yaw-rate references for time values t.
build_target
build_target(t: ArrayLike, pos: ArrayLike, vel: ArrayLike, acc: ArrayLike) -> ControllerTarget
Assemble a batched dict target from motion primitives.
sample
abstractmethod
sample(t: ArrayLike) -> ControllerTarget
Sample the full target dict at time values t.