Methods#

placo.directions_2d(n: int) ndarray#

Generates a set of directions in 2D.

Parameters:

n (int) – the number of directions

placo.directions_3d(n: int, epsilon: float = 0.5) ndarray#

Generates a set of directions in 3D, using Fibonacci lattice.

Parameters:
  • n (int) – the number of directions

  • epsilon (float) – the epsilon parameter for the Fibonacci lattice

placo.flatten_on_floor(transformation: ndarray) ndarray#

Takes a 3D transformation and ensure it is “flat” on the floor (setting z to 0 and keeping only yaw)

Parameters:

transformation (numpy.ndarray) – a 3D transformation

placo.frame_yaw(rotation: ndarray) float#

Computes the “yaw” of an orientation.

Parameters:

rotation (numpy.ndarray) – the orientation

placo.interpolate_frames(frameA: ndarray, frameB: ndarray, AtoB: float) ndarray#

Interpolate between two frames.

Parameters:
  • frameA (numpy.ndarray) – Frame A

  • frameB (numpy.ndarray) – Frame B

  • AtoB (float) – A real number from 0 to 1 that controls the interpolation (0: frame A, 1: frameB)

placo.optimal_transformation(points_in_A: ndarray, points_in_B: ndarray) ndarray#

Finds the optimal transformation T_a_b that minimizes the sum of squared distances between the (same) points with coordinates expressed in A and B. Points are stacked in lines (columns are x, y and z) in the matrices.

placo.rotation_from_axis(axis: str, vector: ndarray) ndarray#

Builds a rotation matrix with a given axis target.

Parameters:
  • axis (str) – axis (x, y or z)

  • vector (numpy.ndarray) – target (unit) vector

placo.seed(seed_value: int) None#

Initialize the pseudo-random number generator with the argument seed_value.

placo.sharedMemory(value: bool) None#

Share the memory when converting from Eigen to Numpy.

placo.wrap_angle(angle: float) float#

Wraps an angle between -pi and pi.