lighthouse_types


Classes

LhBsCfPoses

LhBsCfPoses(bs_poses: ForwardRef('dict[int, Pose]'), cf_poses: ForwardRef('list[Pose]'))

Represents all poses of base stations and CF samples


Ancestors (in MRO)

  • builtins.tuple

Instance variables

bs_poses: dict

Alias for field number 0


cf_poses: list

Alias for field number 1


LhCfPoseSample

LhCfPoseSample(timestamp: float = 0.0, angles_calibrated: dict[int, LighthouseBsVectors] = None)

Represents a sample of a Crazyflie pose in space, it contains various data related to the pose such as:

  • lighthouse angles from one or more base stations
  • initial estimate of the pose
  • refined estimate of the pose
  • estimated errors

LhDeck4SensorPositions

LhDeck4SensorPositions()

Positions of the sensors on the Lighthouse 4 deck


Class variables

diagonal_distance

positions

LhMeasurement

LhMeasurement(timestamp: ForwardRef('float'), base_station_id: ForwardRef('int'), angles: ForwardRef('LighthouseBsVectors'))

Represents a measurement from one base station.


Ancestors (in MRO)

  • builtins.tuple

Instance variables

angles: cflib.localization.lighthouse_bs_vector.LighthouseBsVectors

Alias for field number 2


base_station_id: int

Alias for field number 1


timestamp: float

Alias for field number 0


Pose

Pose(R_matrix: npt.ArrayLike = array([[1., 0., 0.],
       [0., 1., 0.],
       [0., 0., 1.]]), t_vec: npt.ArrayLike = array([0., 0., 0.]))

Holds the full pose (position and orientation) of an object. Contains functionality to convert between various formats.


Static methods

def from_quat(R_quat: npt.ArrayLike = array([0., 0., 0., 0.]), t_vec: npt.ArrayLike = array([0., 0., 0.])) > cflib.localization.lighthouse_types.Pose

Create a Pose from a quaternion and translation vector


def from_rot_vec(R_vec: npt.ArrayLike = array([0., 0., 0.]), t_vec: npt.ArrayLike = array([0., 0., 0.])) > cflib.localization.lighthouse_types.Pose

Create a Pose from a rotation vector and translation vector


Instance variables

matrix_vec: tuple

Get the pose as a rotation matrix and translation vector


rot_matrix: numpy.ndarray

Get the rotation matrix of the pose


rot_quat: numpy.ndarray

Get the quaternion of the pose


rot_vec: numpy.ndarray

Get the rotation vector of the pose


translation: numpy.ndarray

Get the translation vector of the pose


Methods

def inv_rotate_translate(self, point: npt.ArrayLike) > numpy.ndarray

Inverse rotate and translate a point, that is transform from global to local reference frame


def inv_rotate_translate_pose(self, pose: "'Pose'") > cflib.localization.lighthouse_types.Pose

Inverse rotate and translate a point, that is transform from global to local reference frame


def rotate_translate(self, point: npt.ArrayLike) > numpy.ndarray

Rotate and translate a point, that is transform from local to global reference frame


def rotate_translate_pose(self, pose: "'Pose'") > cflib.localization.lighthouse_types.Pose

Rotate and translate a pose


def scale(self, scale) > NoneType

quiet