lemniscate
NumPy lemniscate trajectory implementation.
Classes:
| Name | Description |
|---|---|
LemniscateTrajectory |
Bernoulli lemniscate trajectory with optional vertical oscillation. |
LemniscateTrajectory
dataclass
LemniscateTrajectory(yaw_from_velocity: bool = True, fixed_yaw: float = 0.0, attitude: tuple[float, float] = (0.0, 0.0), body_rate: tuple[float, float] = (0.0, 0.0), center: tuple[float, float, float] = (0.0, 0.0, 1.0), scale: float = 1.0, omega: float = 0.5, z_amplitude: float = 0.0, z_frequency: float = 1.0, z_phase: float = 0.0)
Bases: SpatialTrajectory
Bernoulli lemniscate trajectory with optional vertical oscillation.
Methods:
| Name | Description |
|---|---|
sample |
Sample the lemniscate trajectory 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. |
__post_init__ |
Cache the trajectory center as a float32 NumPy vector. |
sample
sample(t: float) -> np.ndarray
Sample the lemniscate trajectory 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.
__post_init__
__post_init__()
Cache the trajectory center as a float32 NumPy vector.