MCPcopy Create free account
hub / github.com/KTH-RPL/dufomap / __getitem__

Method __getitem__

main.py:38–47  ·  view source on GitHub ↗
(self, index_)

Source from the content-addressed store, hash-verified

36 return len(self.pcd_files)
37
38 def __getitem__(self, index_):
39 res_dict = {
40 'scene_id': self.scene_id,
41 'timestamp': self.pcd_files[index_].split("/")[-1].split(".")[0],
42 }
43 pcd_ = pcdpy3.PointCloud.from_path(self.pcd_files[index_])
44 pc0 = pcd_.np_data[:,:3]
45 res_dict['pc'] = pc0.astype(np.float32)
46 res_dict['pose'] = list(pcd_.viewpoint)
47 return res_dict
48
49def main_vis(
50 data_dir: str = "/home/kin/data/00",

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected