daohu527 / ndt_mapping

Baidu apollo offline mapping tool
Apache License 2.0
66 stars 24 forks source link

ndt_mapping execution problem #12

Closed dyheggi closed 2 years ago

dyheggi commented 2 years ago

Hello,Mr.daohu!

I encountered 'segmentation fault' error while running NDT algorithm.I inserted the detection parameter ‘times’

Then I find the map in the lidarprocess function after the second loop_ ptr statements are no longer executed.That is, line 203 in the figure.

I want to know what caused this problem, I would appreciate it if you could help me!!!

2022-04-21 18-38-04 的屏幕截图

2022-04-21 18-39-54 的屏幕截图

daohu527 commented 2 years ago

It looks like this has something to do with the PCL library, I found some introductions online, you can try to remove the nan points first

  PointCloudPtr scan_ptr(new PointCloud());
  vector<int> index;
  pcl::removeNaNFromPointCloud(*cloud_ptr,*cloud_ptr,index);   // remove nan points
  RangeFilter(cloud_ptr, scan_ptr);
dyheggi commented 2 years ago

After trying, there was an error in the compilation(./apollo.sh build localization), which showed that the vector was not declared, and there was a problem with int

2022-04-21 22-31-52 的屏幕截图

daohu527 commented 2 years ago

try

  std::vector<int> index;
  pcl::removeNaNFromPointCloud(*cloud_ptr,*cloud_ptr,index);
dyheggi commented 2 years ago

This time, it can be compiled, but there are still the same errors as before

2022-04-22 09-21-54 的屏幕截图

daohu527 commented 2 years ago

If you can, you can send 3-5 frames of data to daohu527@gmail.com, I will have a try

dyheggi commented 2 years ago

It has been sent to you(dyheggi@163.com)

dyheggi commented 2 years ago

I made the following changes:

1.In order to prevent the error of intensity, the intensity data type of the parsed PCD file is changed to 'float'

2.The parsed files include not only PCD files, but also fusion, lidar, GNSS and other LOC Txt file, so I don't know if I can run the program normally by sending you only a few PCD files

dyheggi commented 2 years ago

I've tried, but I still need those txt files, which can't be executed only with PCD, so if you can, I want to send you the data packet I recorded, or the whole PCD I parsed

daohu527 commented 2 years ago

@eggiiiiiii I tested it, apollo5.0 can work normally, but 6.0 not.

At the moment I don't know what the problem is, it might take some time. You can use apollo5.0 and r5.0.0 to build a map, it doesn't need to change anything, just switch branches and follow the same steps

dyheggi commented 2 years ago

Ok, my current computer is apollo5.0, pcl version is 1.10.0, apollo car in the laboratory is apollo5.5.0, and pcl version is 1.8.

I'm going to test whether apollo5.5 version 5.5 can run.

dyheggi commented 2 years ago

I installed apollo5.0, move NDT related files to local_ tool the directory, GPU cannot be compiled when entering the docker environment, like this

2022-04-22 17-41-10 的屏幕截图

This situation is like our laboratory car, which is equipped with Apollo Version 5.5

daohu527 commented 2 years ago

You should check out the ndt_mapping in 5.0.0 too.

cd modules/localization/msf/local_tool/ndt_mapping
git checkout r5.0.0
dyheggi commented 2 years ago

Encountered such a problem

2022-04-22 21-48-06 的屏幕截图

daohu527 commented 2 years ago

you can clone the r5.0.0 branch

git clone -b r5.0.0 git@github.com:daohu527/ndt_mapping.git
dyheggi commented 2 years ago

Sorry, I still can't. the execution code shows that I don't have access rights.

Downloading the compressed package directly from GitHub and decompressing it will also report an error as before

2022-04-23 13-51-11 的屏幕截图

dyheggi commented 2 years ago

In addition, let me ask you, what is your PCL version? Mine is 1.10.0. Will this affect the program ?

daohu527 commented 2 years ago

If you run apollo 5.0 docker, the pcl version is 1.7, If apollo 6.0 the pcl version is 1.10

dyheggi commented 2 years ago

I checked my PCL and found that it is still version 1.10. Do I need to install a 1.7 PCL library?

And I still can't copy your NDT_ Mapping code...

daohu527 commented 2 years ago

I'm confused how you are running apollo, if you are running in docker why do you have this annoyance.

I create a release version, you can try to download r5.0.0

dyheggi commented 2 years ago

Now GPU compilation and NDT compilation are successful.

However, I have the following problems when decompressing the data package

2022-04-26 10-54-23 的屏幕截图

Since our car is a 16 wire radar, we will cyber before record The following changes have been made to the parser, and the "R32" in the command has been changed to "lidar16". The program can run, but it can't run now. Why

2022-04-26 10-56-48 的屏幕截图

dyheggi commented 2 years ago

This is our modified file in apollo6 You can run programs on 0, but not on 5.0

2022-04-26 11-06-50 的屏幕截图

dyheggi commented 2 years ago

Do you know the format of adding traffic light files to high-precision maps? Now I only put the stop line on it, but the traffic lights can't be put up all the time because of the format problem. If you have an edited file, can you send me a copy? I want to refer to the format.

daohu527 commented 2 years ago

You can ref to borregas_ave.txt's signal, Note to add overlap, signal and lane connect with overlap

By the way, this is clearly beyond the scope of this project's discussion. We'd better focus on the function of the project, if you have other questions, you can go to the apollo community for help

dyheggi commented 2 years ago

After continuous debugging, I can now run the NDT algorithm and output the map!

In addition, I would like to ask you what is your tool for visualizing PCD?

My PCL tool on Apollo version 6.0 always fails to install in version 5.0...

daohu527 commented 2 years ago

I used pcl_viewer or cloudcompare

mbing123 commented 2 years ago

Hello,Mr.daohu! my apollo car computer is apollo5.5. And clone the ndt_mapping_r5.0.0. Now GPU compilation and NDT compilation are successful. However, I have the following problems when create a map I want to know what caused this problem, I would appreciate it if you could help me!!! Screenshot from 2022-04-30 18-40-11

daohu527 commented 2 years ago

If there are no other question, I will close this issue and I will look at apollo 6.0 PCL library issue soon

daohu527 commented 2 years ago

@eggiiiiiii I fixed this issue for now, Because 6.0 can't download go.sdk now, I can't compile it, you can checkout the r6.0.0 and have a try.

cd apollo/modules/localization/msf/local_tool/ndt_mapping
git checkout r6.0.0
dyheggi commented 2 years ago

I'll try!

Thank you very much for your help!!!