1+ '''
2+ # @date: 2024-07-25 17:29
3+ # @author: Qingwen Zhang (https://kin-zhang.github.io/)
4+ # Copyright (C) 2023-now, RPL, KTH Royal Institute of Technology
5+ #
6+ # @detail: Play data with interactive viewer.
7+ #
8+ # This file is part of DynamicMap_Benchmark (https://github.com/KTH-RPL/DynamicMap_Benchmark).
9+ # If you find this repo helpful, please cite the respective publication as
10+ # listed on the above website.
11+ '''
12+
113import sys , os
214BASE_DIR = os .path .abspath (os .path .join (os .path .dirname ( __file__ ), '..' ))
315sys .path .append (BASE_DIR )
@@ -53,15 +65,15 @@ def __getitem__(self, index_):
5365 return res_dict
5466
5567def vis (
56- data_dir : str = "/home/kin/data /Dynamic_Papers_assets/Benchmark_data/00" ,
68+ data_dir : str = "/home/kin/DATA_HDD /Dynamic_Papers_assets/Benchmark_data/00" ,
5769 view_file : str = os .path .abspath (BASE_DIR + "/../../assets/view/default.json" ),
58- point_size : int = 2 ,
70+ point_size : int = 3 ,
5971 speed : int = 1 ,
6072 ):
6173 o3d_vis = MyVisualizer (view_file = view_file , window_title = "DynamicMap Benchmark Data Preview" )
6274 opt = o3d_vis .vis .get_render_option ()
6375 # opt.background_color = np.asarray([216, 216, 216]) / 255.0
64- opt .background_color = np .asarray ([80 / 255 , 90 / 255 , 110 / 255 ])
76+ # opt.background_color = np.asarray([80/255, 90/255, 110/255])
6577 # opt.background_color = np.asarray([1, 1, 1])
6678 opt .point_size = point_size
6779 dataset = DynamicMapData (data_dir )
@@ -72,6 +84,7 @@ def vis(
7284
7385 pcd = o3d .geometry .PointCloud ()
7486 pcd .points = o3d .utility .Vector3dVector (data ['pc' ][:, :3 ])
87+ # print(data['pc'].shape)
7588 o3d_vis .update ([pcd , o3d .geometry .TriangleMesh .create_coordinate_frame (size = 1 )])
7689 time .sleep (0.05 * 1 / speed )
7790
0 commit comments