Trajectories#

Reference trajectory generators for quadrotor simulations.

Parametric reference trajectory generators for quadrotor flight.

Each generator returns (t, positions, velocities) where positions and velocities are (T, 3) arrays in world coordinates. The trajectory parameters are randomised within sensible bounds using the provided rng.

A registry dict TRAJECTORY_REGISTRY maps string names to the corresponding generator function.

online_estimators.trajectories.generators.make_traj_hover(T, dt, rng)[source]#

Stationary hover at the origin.

Parameters:
  • T (float) – Total duration (s).

  • dt (float) – Time-step (s).

  • rng (Generator) – (Unused for hover, but kept for API consistency.)

Return type:

Tuple[ndarray, ndarray, ndarray]

Returns:

  • t (np.ndarray, shape (N,))

  • pos (np.ndarray, shape (N, 3))

  • vel (np.ndarray, shape (N, 3))

online_estimators.trajectories.generators.make_traj_figure8(T, dt, rng)[source]#

Planar figure-eight trajectory.

Parameters:
Return type:

Tuple[ndarray, ndarray, ndarray]

online_estimators.trajectories.generators.make_traj_circle(T, dt, rng)[source]#

Circular trajectory in the XY plane.

Parameters:
Return type:

Tuple[ndarray, ndarray, ndarray]

online_estimators.trajectories.generators.make_traj_lissajous(T, dt, rng)[source]#

Lissajous curve in the XY plane.

Parameters:
Return type:

Tuple[ndarray, ndarray, ndarray]

online_estimators.trajectories.generators.make_traj_ellipse(T, dt, rng)[source]#

Elliptical trajectory in the XY plane.

Parameters:
Return type:

Tuple[ndarray, ndarray, ndarray]

online_estimators.trajectories.generators.make_traj_helix(T, dt, rng)[source]#

Helical trajectory with sinusoidal altitude.

Parameters:
Return type:

Tuple[ndarray, ndarray, ndarray]

online_estimators.trajectories.generators.make_traj_spiral(T, dt, rng)[source]#

Expanding spiral trajectory.

Parameters:
Return type:

Tuple[ndarray, ndarray, ndarray]

online_estimators.trajectories.generators.TRAJECTORY_REGISTRY: Dict[str, Callable[[float, float, Generator], Tuple[ndarray, ndarray, ndarray]]] = {'circle': <function make_traj_circle>, 'ellipse': <function make_traj_ellipse>, 'figure8': <function make_traj_figure8>, 'helix': <function make_traj_helix>, 'hover': <function make_traj_hover>, 'lissajous': <function make_traj_lissajous>, 'spiral': <function make_traj_spiral>}#

Registry mapping trajectory names to generator functions.