rectangle
Array API rectangle trajectory.
类:
| 名称 | 描述 |
|---|---|
RectangleTrajectory |
Batched constant-speed rectangle trajectory in the horizontal plane. |
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.
方法:
| 名称 | 描述 |
|---|---|
__post_init__ |
Initialize RectangleTrajectory. |
sample |
Sample the rectangle trajectory at time t. |
sample_heading |
Sample batched yaw and yaw-rate references for time values |
build_target |
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.
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.