Closed greatplan2017 closed 2 years ago
when importing pcd file to livox_load_pc_make_sc, it always show error : 'NoneType' object has no attribute 'ring_key'
Can you give me more hints? Or just paste your terminal information here?
$ ./livox_scan_context_test.py
('Save ScanContext to: ', '/home/innox/ws_livox/src/Livox-Localization/map/scancontext')
Traceback (most recent call last):
File "./livox_scan_context_test.py", line 20, in
Hi, please check your data files structure.
Make sure you have .pcd and .odom files stored as described.
You can debug it with checking the ring_keys storage status.
can you send .pcd and .odom files as a sample for me? my email is 573050736@qq.com. thanks!
Hi, please check our readme:
https://github.com/SiyuanHuang95/Livox-Localization#42-sample-dataset
Since no further update, I will close this issue.
I have the same problem with the [greatplan2017], you said it in the readme like this: The pre-built point-cloud map and its corresponding extracted history information represented with Ring Key, Scan Context and the pose file could be found in one zip file saved in the Baidu Netdisk. But we couldn't find the zip file.
Hi @greatplan2017 @yijing2050
Just upload: Links: https://pan.baidu.com/s/1Jst9U_oyAdKuJWn5qAKPzQ password: g5rt
Hello. I downloaded the related files and ran the Localization package, and there is no question it performed beutifully.But I have a question,where does the pose.npy come from? Doesn't it look like come from the livox_mapping package?
Or I guess maybe it is generated by livox_scan_context_test.py. Then
/home/yijing/rosws3/src/slam/Livox_Localization/scripts/livox_scan_context_test.py
('Save ScanContext to: ', '/home/yijing/rosws3/src/startup/data/park/scancontext')
Traceback (most recent call last):
File "/home/yijing/rosws3/src/slam/Livox_Localization/scripts/livox_scan_context_test.py", line 21, in
Hello. I downloaded the related files and ran the Localization package, and there is no question it performed beutifully.But I have a question,where does the pose.npy come from? Doesn't it look like come from the livox_mapping package? Or I guess maybe it is generated by livox_scan_context_test.py. Then /home/yijing/rosws3/src/slam/Livox_Localization/scripts/livox_scan_context_test.py ('Save ScanContext to: ', '/home/yijing/rosws3/src/startup/data/park/scancontext') Traceback (most recent call last): File "/home/yijing/rosws3/src/slam/Livox_Localization/scripts/livox_scan_context_test.py", line 21, in Livox_SC.livox_load_pc_make_sc(pcd_path) File "/home/yijing/rosws3/src/slam/Livox_Localization/scripts/scan_context_manager.py", line 147, in livox_load_pc_make_sc self.save() File "/home/yijing/rosws3/src/slam/Livox_Localization/scripts/scan_context_manager.py", line 46, in save self.save_ring_key() File "/home/yijing/rosws3/src/slam/Livox_Localization/scripts/scan_context_manager.py", line 247, in save_ring_key self.ring_keys[i].ring_key) AttributeError: 'NoneType' object has no attribute 'ring_key' The same error with the greatplan2017.You said "You can debug it with checking the ring_keys storage status." But how do I modify the ring_keys storage status? I have no idea.Could you give me a hint?
Livox SC.livox load pc make_ SC (pcd_path) uses a single frame point cloud to construct and save the descriptor of each frame, so in pcd_path should have a single frame point cloud for each frame. However, the point cloud directly saved in livox mapping is the overall point cloud, and the single frame point cloud needs the help of interactive_slam to save. Alternatively, you can modify this part of the code to save the whole point cloud into a single frame point cloud. https://github.com/PJLab-ADG/Livox-Mapping/blob/e896e6f0a09163eb2e8f22e63fee0024df03350e/SC-PGO/src/laserPosegraphOptimization.cpp#L938
Hello. I downloaded the related files and ran the Localization package, and there is no question it performed beutifully.But I have a question,where does the pose.npy come from? Doesn't it look like come from the livox_mapping package? Or I guess maybe it is generated by livox_scan_context_test.py. Then /home/yijing/rosws3/src/slam/Livox_Localization/scripts/livox_scan_context_test.py ('Save ScanContext to: ', '/home/yijing/rosws3/src/startup/data/park/scancontext') Traceback (most recent call last): File "/home/yijing/rosws3/src/slam/Livox_Localization/scripts/livox_scan_context_test.py", line 21, in Livox_SC.livox_load_pc_make_sc(pcd_path) File "/home/yijing/rosws3/src/slam/Livox_Localization/scripts/scan_context_manager.py", line 147, in livox_load_pc_make_sc self.save() File "/home/yijing/rosws3/src/slam/Livox_Localization/scripts/scan_context_manager.py", line 46, in save self.save_ring_key() File "/home/yijing/rosws3/src/slam/Livox_Localization/scripts/scan_context_manager.py", line 247, in save_ring_key self.ring_keys[i].ring_key) AttributeError: 'NoneType' object has no attribute 'ring_key' The same error with the greatplan2017.You said "You can debug it with checking the ring_keys storage status." But how do I modify the ring_keys storage status? I have no idea.Could you give me a hint?
1. Livox_SC.livox_load_pc_make_sc(pcd_path)是利用单帧点云来构建每帧的描述子并进行保存的,所以在pcd_path应该有每一帧的单帧点云。但是在Livox-mapping中直接保存出来的点云是整体点云,单帧点云需要借助[interactive_slam](https://github.com/SMRT-AIST/interactive_slam)进行保存。或者也可以修改这部分代码,将保存整体点云改成保存单帧点云。 https://github.com/PJLab-ADG/Livox-Mapping/blob/e896e6f0a09163eb2e8f22e63fee0024df03350e/SC-PGO/src/laserPosegraphOptimization.cpp#L938
Livox SC.livox load pc make_ SC (pcd_path) uses a single frame point cloud to construct and save the descriptor of each frame, so in pcd_path should have a single frame point cloud for each frame. However, the point cloud directly saved in livox mapping is the overall point cloud, and the single frame point cloud needs the help of interactive_slam to save. Alternatively, you can modify this part of the code to save the whole point cloud into a single frame point cloud. https://github.com/PJLab-ADG/Livox-Mapping/blob/e896e6f0a09163eb2e8f22e63fee0024df03350e/SC-PGO/src/laserPosegraphOptimization.cpp#L938
你好,谢谢你的建议。那就是说scan_context_manager.py and livox_scan_context_test.py没有作用?不能把livox_mapping生成的pcd和TXT文件转换成livox_localization中global_localization.py所需的文件了? 另外感觉livox_localiization package 和LIO_livox有些相似的地方,如果能合二为一,精简一下就更好了。
Hello. I downloaded the related files and ran the Localization package, and there is no question it performed beutifully.But I have a question,where does the pose.npy come from? Doesn't it look like come from the livox_mapping package? Or I guess maybe it is generated by livox_scan_context_test.py. Then /home/yijing/rosws3/src/slam/Livox_Localization/scripts/livox_scan_context_test.py ('Save ScanContext to: ', '/home/yijing/rosws3/src/startup/data/park/scancontext') Traceback (most recent call last): File "/home/yijing/rosws3/src/slam/Livox_Localization/scripts/livox_scan_context_test.py", line 21, in Livox_SC.livox_load_pc_make_sc(pcd_path) File "/home/yijing/rosws3/src/slam/Livox_Localization/scripts/scan_context_manager.py", line 147, in livox_load_pc_make_sc self.save() File "/home/yijing/rosws3/src/slam/Livox_Localization/scripts/scan_context_manager.py", line 46, in save self.save_ring_key() File "/home/yijing/rosws3/src/slam/Livox_Localization/scripts/scan_context_manager.py", line 247, in save_ring_key self.ring_keys[i].ring_key) AttributeError: 'NoneType' object has no attribute 'ring_key' The same error with the greatplan2017.You said "You can debug it with checking the ring_keys storage status." But how do I modify the ring_keys storage status? I have no idea.Could you give me a hint?
1. Livox_SC.livox_load_pc_make_sc(pcd_path)是利用单帧点云来构建每帧的描述子并进行保存的,所以在pcd_path应该有每一帧的单帧点云。但是在Livox-mapping中直接保存出来的点云是整体点云,单帧点云需要借助[interactive_slam](https://github.com/SMRT-AIST/interactive_slam)进行保存。或者也可以修改这部分代码,将保存整体点云改成保存单帧点云。 https://github.com/PJLab-ADG/Livox-Mapping/blob/e896e6f0a09163eb2e8f22e63fee0024df03350e/SC-PGO/src/laserPosegraphOptimization.cpp#L938
Livox SC.livox load pc make_ SC (pcd_path) uses a single frame point cloud to construct and save the descriptor of each frame, so in pcd_path should have a single frame point cloud for each frame. However, the point cloud directly saved in livox mapping is the overall point cloud, and the single frame point cloud needs the help of interactive_slam to save. Alternatively, you can modify this part of the code to save the whole point cloud into a single frame point cloud. https://github.com/PJLab-ADG/Livox-Mapping/blob/e896e6f0a09163eb2e8f22e63fee0024df03350e/SC-PGO/src/laserPosegraphOptimization.cpp#L938
你好,谢谢你的建议。那就是说scan_context_manager.py and livox_scan_context_test.py没有作用?不能把livox_mapping生成的pcd和TXT文件转换成livox_localization中global_localization.py所需的文件了? 另外感觉livox_localiization package 和LIO_livox有些相似的地方,如果能合二为一,精简一下就更好了。
It's not useless. They really need to convert PCD into the file needed for location. However, their function is to convert a single frame point cloud into a file required for positioning. In the current version, Lio mapping directly obtains the overall point cloud, so interactive is also required Slam's help. Then you say livox Localization and lio Is livox similar? I don't think so, because livox The front end of localization is based on fastio, so there should be no similarity
@yijing2050 For the mapping part, accuracy is more important than speed, so we use the optimization method. For the localization part, speed and source cost are also important, filter is thus used. They are for different usage.
Also, I will close this issue since no updates now.
We provide the function livox_load_pc_make_sc in our ScanContextManager class, you can refer to the file livox_scan_context_test.py for the usage demonstration.
The ScanContextManager can be found in: https://github.com/SiyuanHuang95/Livox-Localization/blob/master/scripts/scan_context_manager.py
The usage example could be found: https://github.com/SiyuanHuang95/Livox-Localization/blob/aa200def388dec326c739ec6a98fe892fe0cb99a/scripts/livox_scan_context_test.py#L18