跳转至

torch

Torch trajectory implementations for batched RL environments.

模块:

名称 描述
base

Torch trajectory base classes.

helix

Torch helix trajectory implementation.

hover_step

Torch hover-step trajectory implementation.

lemniscate

Torch lemniscate trajectory implementation.

lissajous

Torch Lissajous trajectory implementation.

rectangle

Torch rectangle trajectory implementation.

类:

名称 描述
BaseTrajectory

Abstract base class for batched torch trajectory implementations.

SpatialTrajectory

Torch base class for trajectories centered around a batched world-frame anchor.

HelixTrajectory

Batched helix trajectory with optional vertical oscillation.

HoverStepTrajectory

Batched piecewise-constant position and yaw trajectory.

LemniscateTrajectory

Batched Bernoulli lemniscate trajectory with vertical oscillation.

LissajousTrajectory

Batched three-dimensional Lissajous trajectory.

RectangleTrajectory

Batched constant-speed rectangle trajectory in the horizontal plane.

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.

方法:

名称 描述
sample_heading

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

build_target

Assemble a batched 12D target tensor from motion primitives.

sample

Sample a batched 12D target tensor for time values t.

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.

方法:

名称 描述
sample_heading

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

build_target

Assemble a batched 12D target tensor from motion primitives.

sample

Sample a batched 12D target tensor for time values t.

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

__post_init__

__post_init__()

Initialize shared tensors from the center batch shape when available.

HelixTrajectory dataclass

HelixTrajectory(*, yaw_from_velocity: bool = True, fixed_yaw: Tensor | None = None, attitude: Tensor | None = None, body_rate: Tensor | None = None, center: Tensor, radius: Tensor, omega: Tensor, z_amplitude: Tensor, z_frequency: Tensor, z_phase: Tensor)

Bases: SpatialTrajectory

Batched helix trajectory with optional vertical oscillation.

方法:

名称 描述
sample_heading

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

build_target

Assemble a batched 12D target tensor from motion primitives.

__post_init__

Initialize shared tensors from the center batch shape when available.

sample

Sample the batched helix trajectory at time values t.

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.

__post_init__

__post_init__()

Initialize shared tensors from the center batch shape when available.

sample

sample(t: Tensor) -> torch.Tensor

Sample the batched helix trajectory at time values t.

HoverStepTrajectory dataclass

HoverStepTrajectory(*, yaw_from_velocity: bool = False, fixed_yaw: Tensor | None = None, attitude: Tensor | None = None, body_rate: Tensor | None = None, initial: Tensor, steps: tuple[tuple[float, Tensor], ...] = ())

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 12D target tensor from motion primitives.

__post_init__

Initialize shared trajectory tensors from the hover-step batch.

sample

Sample the active hover targets for batched time values t.

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.

__post_init__

__post_init__()

Initialize shared trajectory tensors from the hover-step batch.

sample

sample(t: Tensor) -> torch.Tensor

Sample the active hover targets for batched time values t.

LemniscateTrajectory dataclass

LemniscateTrajectory(*, yaw_from_velocity: bool = True, fixed_yaw: Tensor | None = None, attitude: Tensor | None = None, body_rate: Tensor | None = None, center: Tensor, scale: Tensor, omega: Tensor, z_amplitude: Tensor, z_frequency: Tensor, z_phase: Tensor)

Bases: SpatialTrajectory

Batched Bernoulli lemniscate trajectory with vertical oscillation.

方法:

名称 描述
sample_heading

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

build_target

Assemble a batched 12D target tensor from motion primitives.

__post_init__

Initialize shared tensors from the center batch shape when available.

sample

Sample the batched lemniscate trajectory at time values t.

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.

__post_init__

__post_init__()

Initialize shared tensors from the center batch shape when available.

sample

sample(t: Tensor) -> torch.Tensor

Sample the batched lemniscate trajectory at time values t.

LissajousTrajectory dataclass

LissajousTrajectory(*, yaw_from_velocity: bool = True, fixed_yaw: Tensor | None = None, attitude: Tensor | None = None, body_rate: Tensor | None = None, center: Tensor, amplitude: Tensor, frequency: Tensor, phase: Tensor, omega: Tensor)

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 12D target tensor from motion primitives.

__post_init__

Initialize shared tensors from the center batch shape when available.

sample

Sample the batched Lissajous trajectory at time values t.

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.

__post_init__

__post_init__()

Initialize shared tensors from the center batch shape when available.

sample

sample(t: Tensor) -> torch.Tensor

Sample the batched Lissajous trajectory at time values t.

RectangleTrajectory dataclass

RectangleTrajectory(*, yaw_from_velocity: bool = True, fixed_yaw: Tensor | None = None, attitude: Tensor | None = None, body_rate: Tensor | None = None, center: Tensor, size: Tensor, speed: Tensor)

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 12D target tensor from motion primitives.

__post_init__

Initialize shared tensors from the center batch shape when available.

sample

Sample the batched rectangle trajectory at time values t.

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.

__post_init__

__post_init__()

Initialize shared tensors from the center batch shape when available.

sample

sample(t: Tensor) -> torch.Tensor

Sample the batched rectangle trajectory at time values t.