utils.py
Go to the documentation of this file.
1 import numpy as np
2 
3 
5  # TODO
6  pass
7 
8 
9 def parse_translation(p_translation: str, p_cloud_dim: int):
10  parsed_translation = np.identity(p_cloud_dim + 1)
11 
12  p_translation = p_translation.replace(',', ' ')
13 
14  translation_values = np.fromiter(p_translation.split(' '), np.float)
15 
16  for i, v in enumerate(translation_values):
17  parsed_translation[i, p_cloud_dim] = v
18 
19  return parsed_translation
20 
21 
22 def parse_rotation(p_rotation: str, p_cloud_dim: int):
23  parsed_rotation = np.identity(p_cloud_dim + 1)
24 
25  p_rotation = p_rotation.replace(',', ' ')
26  p_rotation = p_rotation.replace(';', ' ')
27 
28  rotation_matrix = np.fromiter(p_rotation.split(' '), np.float)
29 
30  for i, v in enumerate(rotation_matrix):
31  parsed_rotation[i // p_cloud_dim, i % p_cloud_dim] = v
32 
33  return parsed_rotation
utils.parse_translation
def parse_translation(str p_translation, int p_cloud_dim)
Definition: utils.py:9
utils.list_modules
def list_modules()
Definition: utils.py:4
utils.parse_rotation
def parse_rotation(str p_rotation, int p_cloud_dim)
Definition: utils.py:22


libpointmatcher
Author(s):
autogenerated on Mon Sep 16 2024 02:24:10