lighthouse_cf_pose_sample


Classes

AtomicCounter

AtomicCounter()

Methods

def increment(self, num=1)

BsPairPoses

BsPairPoses(bs1: cflib.localization.lighthouse_types.Pose, bs2: cflib.localization.lighthouse_types.Pose)

A type representing the poses of a pair of base stations


Ancestors (in MRO)

  • builtins.tuple

Instance variables

bs1: cflib.localization.lighthouse_types.Pose

Alias for field number 0


bs2: cflib.localization.lighthouse_types.Pose

Alias for field number 1


LhCfPoseSample

LhCfPoseSample(angles_calibrated: dict[int, cflib.localization.lighthouse_bs_vector.LighthouseBsVectors])

Represents a sample of a Crazyflie pose in space, it contains:

  • lighthouse angles from one or more base stations
  • The the two solutions found by IPPE for each base station, in the cf ref frame.

The ippe solution is somewhat heavy and is only created on demand by calling augment_with_ippe()


Class variables

global_uid

Static methods

def yaml_constructor(loader, node)

def yaml_representer(dumper, data: LhCfPoseSample)

Instance variables

uid: int

Get the unique identifier of the sample


Methods

def augment_with_ippe(self, sensor_positions: numpy.ndarray[tuple[typing.Any, ...], numpy.dtype[numpy.float64]]) > NoneType

def is_empty(self) > bool

Checks if no angles are set

Returns: bool: True if no angles are set


LhCfPoseSampleStatus

LhCfPoseSampleStatus(*args, **kwds)

An enum representing the status of a pose sample


Ancestors (in MRO)

  • enum.Enum

Class variables

AMBIGUOUS

BS_UNKNOWN

NO_DATA

OK

TOO_FEW_BS

LhCfPoseSampleType

LhCfPoseSampleType(*args, **kwds)

An enum representing the type of a pose sample


Ancestors (in MRO)

  • enum.Enum

Class variables

ORIGIN

VERIFICATION

XYZ_SPACE

XY_PLANE

X_AXIS

LhCfPoseSampleWrapper

LhCfPoseSampleWrapper(pose_sample: cflib.localization.lighthouse_cf_pose_sample.LhCfPoseSample, sample_type: cflib.localization.lighthouse_cf_pose_sample.LhCfPoseSampleType = xyz-space)

A wrapper of LhCfPoseSample that includes more information, useful in the estimation process and in a UI.


Class variables

LARGE_ERROR_THRESHOLD

NO_POSE

Instance variables

angles_calibrated: dict[int, cflib.localization.lighthouse_bs_vector.LighthouseBsVectors]

base_station_ids: list[int]

Get the base station ids of the sample


has_pose: bool

ippe_solutions: dict[int, cflib.localization.lighthouse_cf_pose_sample.BsPairPoses]

is_error_large: bool

Check if the error distance is large enough to be considered an outlier


is_valid: bool

pose: cflib.localization.lighthouse_types.Pose

uid: int

Get the unique identifier of the sample