udaan.core.types module

Type definitions for Udaan library.

This module defines type aliases and enumerations used throughout the codebase to ensure type safety and improve code readability.

class udaan.core.types.ForceType[source]

Bases: Enum

Force application type on quadrotor body.

Defines how forces are applied to the physics simulation.

WRENCH

Apply net force and torque at center of mass

PROP_FORCES

Apply individual forces at propeller locations

PROP_FORCES = 2
WRENCH = 1
class udaan.core.types.InputType[source]

Bases: Enum

Input command type for quadrotor control.

Defines what type of command the controller generates.

WRENCH

Force and torque vector [thrust, tau_x, tau_y, tau_z]

PROP_FORCES

Individual propeller forces [f1, f2, f3, f4]

ACCELERATION

Desired acceleration command [ax, ay, az]

ACCELERATION = 3
PROP_FORCES = 2
WRENCH = 1
udaan.core.types.Mat3

3x3 matrix (rotation matrix, inertia tensor, etc.)

alias of ndarray[tuple[Any, …], dtype[floating]]

udaan.core.types.Mat4

4x4 matrix (homogeneous transformation)

alias of ndarray[tuple[Any, …], dtype[floating]]

udaan.core.types.Quaternion

Quaternion in [w, x, y, z] format (scalar-first convention)

alias of ndarray[tuple[Any, …], dtype[floating]]

udaan.core.types.TrajectoryFunc

t -> (position, velocity, acceleration)

Type:

Trajectory function

alias of Callable[[float], tuple[ndarray[tuple[Any, …], dtype[floating]], ndarray[tuple[Any, …], dtype[floating]], ndarray[tuple[Any, …], dtype[floating]]]]

udaan.core.types.Vec3

3D vector (position, velocity, angular velocity, etc.)

alias of ndarray[tuple[Any, …], dtype[floating]]