跳转至

trajectories

Trajectory implementations package for LAV2.

模块:

名称 描述
base

Array API trajectory base classes.

helix

Array API helix trajectory.

hover_step

Array API hover-step trajectory.

lemniscate

Array API lemniscate trajectory.

lissajous

Array API Lissajous trajectory.

numpy

Numpy-based trajectory implementations.

rectangle

Array API rectangle trajectory.

torch

Torch-based trajectory implementations.

类:

名称 描述
BaseTrajectory

Abstract base class for time-parameterized Array API reference trajectories.

SpatialTrajectory

Base class for trajectories centered around a world-frame anchor point.

HelixTrajectory

Batched helix trajectory.

HoverStepTrajectory

Batched piecewise-constant position and yaw trajectory.

LemniscateTrajectory

Batched Bernoulli lemniscate trajectory.

LissajousTrajectory

Batched three-dimensional Lissajous trajectory.

RectangleTrajectory

Batched constant-speed rectangle trajectory in the horizontal plane.

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.

方法:

名称 描述
__post_init__

Initialize shared batched trajectory state.

sample_heading

Sample batched yaw and yaw-rate references for time values t.

build_target

Assemble a batched dict target from motion primitives.

sample

Sample the full target dict at time values t.

__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.

方法:

名称 描述
sample_heading

Sample batched yaw and yaw-rate references for time values t.

build_target

Assemble a batched dict target from motion primitives.

sample

Sample the full target dict at time values t.

__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.

__post_init__

__post_init__()

Initialize the trajectory center as a batched backend array.

HelixTrajectory dataclass

HelixTrajectory(*, 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), radius: ArrayLike | float = 1.0, omega: ArrayLike | float = 0.5, z_amplitude: ArrayLike | float = 0.0, z_frequency: ArrayLike | float = 1.0, z_phase: ArrayLike | float = 0.0)

Bases: SpatialTrajectory

Batched helix trajectory.

方法:

名称 描述
sample_heading

Sample batched yaw and yaw-rate references for time values t.

build_target

Assemble a batched dict target from motion primitives.

__post_init__

Initialize HelixTrajectory.

sample

Sample the helix at time t.

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.

__post_init__

__post_init__()

Initialize HelixTrajectory.

sample

sample(t: ArrayLike) -> ControllerTarget

Sample the helix at time t.

HoverStepTrajectory dataclass

HoverStepTrajectory(*, num_envs: int = 1, device: str | None = None, backend: BackendName | None = None, xp: ModuleType | None = None, initialize: bool = True, yaw_from_velocity: bool = False, 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), initial: ArrayLike | tuple[float, float, float, float] = (0.0, 0.0, 1.0, 0.0), steps: tuple = ((5.0, (1.0, 0.0, 1.0, 0.0)), (10.0, (1.0, 1.0, 1.5, math.pi / 2.0)), (15.0, (0.0, 1.0, 1.5, math.pi))))

Bases: BaseTrajectory

Batched piecewise-constant position and yaw trajectory.

方法:

名称 描述
sample_heading

Sample batched yaw and yaw-rate references for time values t.

build_target

Assemble a batched dict target from motion primitives.

__post_init__

Initialize HoverStepTrajectory.

sample

Sample the hover-step trajectory at time t.

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.

__post_init__

__post_init__()

Initialize HoverStepTrajectory.

sample

sample(t: ArrayLike) -> ControllerTarget

Sample the hover-step trajectory at time t.

LemniscateTrajectory dataclass

LemniscateTrajectory(*, 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), scale: ArrayLike | float = 1.0, omega: ArrayLike | float = 0.5, z_amplitude: ArrayLike | float = 0.0, z_frequency: ArrayLike | float = 1.0, z_phase: ArrayLike | float = 0.0)

Bases: SpatialTrajectory

Batched Bernoulli lemniscate trajectory.

方法:

名称 描述
sample_heading

Sample batched yaw and yaw-rate references for time values t.

build_target

Assemble a batched dict target from motion primitives.

__post_init__

Initialize LemniscateTrajectory.

sample

Sample the lemniscate at time t.

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.

__post_init__

__post_init__()

Initialize LemniscateTrajectory.

sample

sample(t: ArrayLike) -> ControllerTarget

Sample the lemniscate at time t.

LissajousTrajectory dataclass

LissajousTrajectory(*, 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), amplitude: ArrayLike | tuple[float, float, float] = (1.0, 1.0, 0.2), frequency: ArrayLike | tuple[float, float, float] = (1.0, 2.0, 0.5), phase: ArrayLike | tuple[float, float, float] = (0.0, 0.0, 0.0), omega: ArrayLike | float = 0.5)

Bases: SpatialTrajectory

Batched three-dimensional Lissajous trajectory.

方法:

名称 描述
sample_heading

Sample batched yaw and yaw-rate references for time values t.

build_target

Assemble a batched dict target from motion primitives.

__post_init__

Initialize LissajousTrajectory.

sample

Sample the Lissajous trajectory at time t.

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.

__post_init__

__post_init__()

Initialize LissajousTrajectory.

sample

sample(t: ArrayLike) -> ControllerTarget

Sample the Lissajous trajectory at time t.

RectangleTrajectory dataclass

RectangleTrajectory(*, 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), size: ArrayLike | tuple[float, float] = (2.0, 1.0), speed: ArrayLike | float = 0.5)

Bases: SpatialTrajectory

Batched constant-speed rectangle trajectory in the horizontal plane.

方法:

名称 描述
sample_heading

Sample batched yaw and yaw-rate references for time values t.

build_target

Assemble a batched dict target from motion primitives.

__post_init__

Initialize RectangleTrajectory.

sample

Sample the rectangle trajectory at time t.

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.

__post_init__

__post_init__()

Initialize RectangleTrajectory.

sample

sample(t: ArrayLike) -> ControllerTarget

Sample the rectangle trajectory at time t.