Skip to content

rectangle

Torch rectangle trajectory implementation.

Classes:

Name Description
RectangleTrajectory

Batched constant-speed rectangle trajectory in the horizontal plane.

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.

Methods:

Name Description
sample

Sample the batched rectangle trajectory at time values t.

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(t: Tensor) -> torch.Tensor

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.