hku-mars / HBA

[RAL 2023] A globally consistent LiDAR map optimization module
GNU General Public License v2.0
425 stars 58 forks source link

std::bad_alloc while launch hba.launch with kitty07 #7

Closed JACKLiuDay closed 1 year ago

JACKLiuDay commented 1 year ago

image Hi, thank you for your great work about HBA. I read the paper and try to launch the hba project with kitty07 dataset. But when I launch the file, something wrong happened.

JACKLiuDay commented 1 year ago

Hi,I found the reason. It looks like my notebook memory is full. When I run the launch file, memory reach 16G soon. Then report std::bad_alloc

samsdolphin commented 1 year ago

Hi @JACKLiuDay, yes, this is an issue, as mentioned in #6. It should be able to work under 32GiB RAM.

JACKLiuDay commented 1 year ago

Hi @JACKLiuDay, yes, this is an issue, as mentioned in #6. It should be able to work under 32GiB RAM.

Hi,thank you for your quick reply. 16G×2 memory module has been ordered on jingdong. I will try HBA again.

JACKLiuDay commented 1 year ago

@samsdolphin Hi, I just tried my notebook with 16G×2, and it still shows std::bad_alloc. My notebook now has 27.6G memory. Maybe I need to buy more RAM?

samsdolphin commented 1 year ago

Hi @JACKLiuDay, this is weird. I am testing it on my own laptop (see configuration below), and it works fine for me (with maximum 18G RAM consumption). Can you make sure you are using c++17 (in CMakeLists.txt)? Previously I used c++14/c++11, and it failed like this. Screenshot from 2023-06-23 19-30-26

Screenshot from 2023-06-23 19-27-44

samsdolphin commented 1 year ago

Hi @JACKLiuDay, can you check this reply as mentioned in issue #6? This error is similar to yours.

JACKLiuDay commented 1 year ago

Hi @JACKLiuDay, can you check this reply as mentioned in issue #6? This error is similar to yours.

Hi, I tried the reply in #6. It's not working for me. My pose file was put in the right path and I checked it. The cmake was set c++17 and it did not work. My laptop RAM is the same as yours. I have 27.6G RAM now. But when I launch kitti07, htop shows the RAM surging to 27G fast. Mabybe my CPU not working for this project? My CPU is AMD 5800H.

samsdolphin commented 1 year ago

Hi @JACKLiuDay, can you check this reply as mentioned in issue #6? This error is similar to yours.

Hi, I tried the reply in #6. It's not working for me. My pose file was put in the right path and I checked it. The cmake was set c++17 and it did not work. My laptop RAM is the same as yours. I have 27.6G RAM now. But when I launch kitti07, htop shows the RAM surging to 27G fast. Mabybe my CPU not working for this project? My CPU is AMD 5800H.

Ok, @JACKLiuDay, this is something I haven't been concerned about. You could try it on an Intel laptop. 0.0

wwtinwhu commented 1 year ago

It is strange that the terminal has no output. @samsdolphin @JACKLiuDay You can add some print function in the construction of hba before the printf(''HBA init done'') to see which part cause that issue. May help.

image

JACKLiuDay commented 1 year ago

It is strange that the terminal has no output. @samsdolphin @JACKLiuDay You can add some print function in the construction of hba before the printf(''HBA init done'') to see which part cause that issue. May help.

image

Hi, thank you for your advice. I will try it.

JACKLiuDay commented 1 year ago

@samsdolphin @wwtinwhu Hi, I found the reason. But some new problem happeded. The function in mypcl::readpose, while(!file.eof()) became infinite loop on my computer. I changed the function. The HBA init successed. But the pcd load error happened. Some pcd file can not load. image

samsdolphin commented 1 year ago

@samsdolphin @wwtinwhu Hi, I found the reason. But some new problem happeded. The function in mypcl::readpose, while(!file.eof()) became infinite loop on my computer. I changed the function. The HBA init successed. But the pcd load error happened. Some pcd file can not load. image

Hi @JACKLiuDay, thanks for your feedback and @wwtinwhu's suggestion. I guess the AMD processor caused these issues 0.0 since I only tested on the Intel computer.

JACKLiuDay commented 1 year ago

@samsdolphin @wwtinwhu Hi, I found the reason. But some new problem happeded. The function in mypcl::readpose, while(!file.eof()) became infinite loop on my computer. I changed the function. The HBA init successed. But the pcd load error happened. Some pcd file can not load. image

Hi @JACKLiuDay, thanks for your feedback and @wwtinwhu's suggestion. I guess the AMD processor caused these issues 0.0 since I only tested on the Intel computer.

@samsdolphin @wwtinwhu Hi, I found the reason finally. My data path is wrong. It nothing to do with CPU. HBA can run on my notebook successfully. And the result is good for the pointcloud. Excellent work!

wwtinwhu commented 1 year ago

@JACKLiuDay 解决就好!