hover_step
NumPy piecewise hover-step trajectory implementation.
Classes:
| Name | Description |
|---|---|
HoverStepTrajectory |
Piecewise-constant position and yaw trajectory. |
HoverStepTrajectory
dataclass
HoverStepTrajectory(yaw_from_velocity: bool = False, fixed_yaw: float = 0.0, attitude: tuple[float, float] = (0.0, 0.0), body_rate: tuple[float, float] = (0.0, 0.0), initial: tuple[float, float, float, float] = (0.0, 0.0, 1.0, 0.0), steps: tuple[tuple[float, tuple[float, float, float, float]], ...] = ((5.0, (1.0, 0.0, 1.0, 0.0)), (10.0, (1.0, 1.0, 1.5, np.pi / 2.0)), (15.0, (0.0, 1.0, 1.5, np.pi))))
Bases: BaseTrajectory
Piecewise-constant position and yaw trajectory.
Methods:
| Name | Description |
|---|---|
sample |
Sample the active hover target at time |
sample_heading |
Sample yaw and yaw-rate references for time |
build_target |
Assemble a full 12D target from position, velocity, and acceleration. |
sample_batch |
Sample a batch of timestamps and stack the resulting 12D targets. |
sample
sample(t: float) -> np.ndarray
Sample the active hover target at time t.
sample_heading
sample_heading(t: float, pos: ndarray, vel: ndarray, acc: ndarray) -> tuple[float, float]
Sample yaw and yaw-rate references for time t and translation state.
build_target
build_target(t: float, pos: ndarray, vel: ndarray, acc: ndarray) -> np.ndarray
Assemble a full 12D target from position, velocity, and acceleration.
sample_batch
sample_batch(ts: ndarray) -> np.ndarray
Sample a batch of timestamps and stack the resulting 12D targets.