From 28668532ed2f97a3883be7e68bced252bd1f99bf Mon Sep 17 00:00:00 2001
From: wu_xinjun <bent20140204@outlook.com>
Date: 星期三, 23 三月 2022 15:29:18 +0800
Subject: [PATCH] rearrange the dir tree

---
 src/slam/core.py |   30 ++++++++++++------------------
 1 files changed, 12 insertions(+), 18 deletions(-)

diff --git a/src/slam/slam.py b/src/slam/core.py
similarity index 84%
rename from src/slam/slam.py
rename to src/slam/core.py
index de3904d..c277da8 100644
--- a/src/slam/slam.py
+++ b/src/slam/core.py
@@ -1,11 +1,11 @@
 import numpy as np
 import os, sys
-# add python path of src to sys.path
-src_path = os.path.join(__file__, *(['..'] * 2))
-src_path = os.path.abspath(src_path)
-sys.path.insert(0, src_path)
+# # add python path of src to sys.path
+# src_path = os.path.join(__file__, *(['..'] * 2))
+# src_path = os.path.abspath(src_path)
+# sys.path.insert(0, src_path)
 
-from utils.tools import read_ply
+from ..utils.tools import read_ply
 from tqdm import tqdm
 
 
@@ -84,7 +84,7 @@
     """
 
     # 骞崇Щ
-    moved_data = current + np.array([x,y,z])
+    moved_data = data + np.array([x,y,z])
     # 鏃嬭浆
     rotation_matrix = get_rotation_matrix(-alpha,-beta,-gamma)
     rotated_data = np.matmul(moved_data,rotation_matrix)
@@ -97,10 +97,10 @@
     return rotated_data
 
 
-def compose_ply(muti_ply_with_angle: list):
+def merge_ply(muti_ply_with_angle: list):
 
     ply_nums = len(muti_ply_with_angle)
-    composed_ply_array = None
+    merged_ply_array = None
 
     print ("rotating the ply ...")
     for i, ply_with_angle in enumerate(tqdm(muti_ply_with_angle)):
@@ -116,18 +116,12 @@
         # np.matmul(rotation_matrix,ply.transpose()).transpose() == np.matmul(ply,rotation_matrix)
         rotated_ply = np.matmul(ply,rotation_matrix)
         if i == 0:
-            composed_ply_array = rotated_ply.copy()
+            merged_ply_array = rotated_ply.copy()
         else:
-            composed_ply_array = np.concatenate((composed_ply_array,rotated_ply),axis= 0 )
+            merged_ply_array = np.concatenate((merged_ply_array,rotated_ply),axis= 0 )
     
-    composed_ply_array = np.array(composed_ply_array).reshape(-1,3)
-    return composed_ply_array
+    merged_ply_array = np.array(merged_ply_array).reshape(-1,3)
+    return merged_ply_array
 
-
-if __name__ == "__main__":
-    current = np.array([[1,1,1],[1,3,9],[4,8,5]])
-    print(current)
-    target = transferTo(current,1,1,1,0,0,0,True)
-    print(target)
 
 

--
Gitblit v1.9.1