跳转至

hover_step

NumPy piecewise hover-step trajectory implementation.

类:

名称 描述
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.

方法:

名称 描述
sample

Sample the active hover target at time t.

sample_heading

Sample yaw and yaw-rate references for time t and translation state.

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.