Livox-SDK / LIO-Livox

A Robust LiDAR-Inertial Odometry for Livox LiDAR
BSD 3-Clause "New" or "Revised" License
638 stars 163 forks source link

How to save final mapped point cloud #43

Open Minsu-Kim1822 opened 1 year ago

Minsu-Kim1822 commented 1 year ago

Hi all,

I tried to use pointcloud map which is generated by HAP. Actually, I used to use loam livox with save map options and it was quite useful to me. However, this package does not provide that options.

Is there any way to save generated pont cloud??

xchwu commented 1 year ago

I have the same problem as you

HowoongJun commented 1 year ago

You can use getter functions for surface, corner and nonfeature map in Estimator.h Since PoseEstimation.cpp is one of main loops, you may edit this code to save your map.

wzt991101 commented 1 year ago

I have encountered the same problem. Have you solved this problem?

abhishekt711 commented 1 year ago

You can use getter functions for surface, corner and nonfeature map in Estimator.h Since PoseEstimation.cpp is one of main loops, you may edit this code to save your map.

can you please help what modification do we need to do save the map into pcd file?

abhishekt711 commented 1 year ago

Hi all,

I tried to use pointcloud map which is generated by HAP. Actually, I used to use loam livox with save map options and it was quite useful to me. However, this package does not provide that options.

Is there any way to save generated pont cloud??

Did you solve this problem?, can you please help

HowoongJun commented 1 year ago

You can use getter functions for surface, corner and nonfeature map in Estimator.h Since PoseEstimation.cpp is one of main loops, you may edit this code to save your map.

can you please help what modification do we need to do save the map into pcd file?

There is 'getter function' such as get_corner_map(), get_surf_map(), and get_nonfeature_map() in Estimator.h. You can get your map with this functions. Get your map, and save them with pcl::PCDWriter. or, voxelize your raw point cloud map and save it also with pcl::PCDWriter.

abhishekt711 commented 1 year ago

You can use getter functions for surface, corner and nonfeature map in Estimator.h Since PoseEstimation.cpp is one of main loops, you may edit this code to save your map.

can you please help what modification do we need to do save the map into pcd file?

There is 'getter function' such as get_corner_map(), get_surf_map(), and get_nonfeature_map() in Estimator.h. You can get your map with this functions. Get your map, and save them with pcl::PCDWriter. or, voxelize your raw point cloud map and save it also with pcl::PCDWriter.

Can I store all together the full map in a single pcd ?

HowoongJun commented 1 year ago

You can use getter functions for surface, corner and nonfeature map in Estimator.h Since PoseEstimation.cpp is one of main loops, you may edit this code to save your map.

can you please help what modification do we need to do save the map into pcd file?

There is 'getter function' such as get_corner_map(), get_surf_map(), and get_nonfeature_map() in Estimator.h. You can get your map with this functions. Get your map, and save them with pcl::PCDWriter. or, voxelize your raw point cloud map and save it also with pcl::PCDWriter.

Can I store all together the full map in a single pcd ?

That is up to you. Your map size, your mapping region, range, voxel size ..

abhishekt711 commented 1 year ago

You can use getter functions for surface, corner and nonfeature map in Estimator.h Since PoseEstimation.cpp is one of main loops, you may edit this code to save your map.

can you please help what modification do we need to do save the map into pcd file?

There is 'getter function' such as get_corner_map(), get_surf_map(), and get_nonfeature_map() in Estimator.h. You can get your map with this functions. Get your map, and save them with pcl::PCDWriter. or, voxelize your raw point cloud map and save it also with pcl::PCDWriter.

Can I store all together the full map in a single pcd ?

That is up to you. Your map size, your mapping region, range, voxel size ..

I have stored the map.pcd by storing the points from /livox_full_cloud_mapped, but getting the error as when i view pcd using pcl_viewer as: pcl_viewer livox_map_op.pcd The viewer window provides interactive commands; for help, press 'h' or 'H' from within the window. Loading livox_map_op.pcd [pcl::PCDReader::read] Number of points read (6177834) is different than expected (51273595)

hongyiWeng commented 1 year ago

You can use getter functions for surface, corner and nonfeature map in Estimator.h Since PoseEstimation.cpp is one of main loops, you may edit this code to save your map.

can you please help what modification do we need to do save the map into pcd file?

There is 'getter function' such as get_corner_map(), get_surf_map(), and get_nonfeature_map() in Estimator.h. You can get your map with this functions. Get your map, and save them with pcl::PCDWriter. or, voxelize your raw point cloud map and save it also with pcl::PCDWriter.

Can I store all together the full map in a single pcd ?

That is up to you. Your map size, your mapping region, range, voxel size ..

I have stored the map.pcd by storing the points from /livox_full_cloud_mapped, but getting the error as when i view pcd using pcl_viewer as: pcl_viewer livox_map_op.pcd The viewer window provides interactive commands; for help, press 'h' or 'H' from within the window. Loading livox_map_op.pcd [pcl::PCDReader::read] Number of points read (6177834) is different than expected (51273595)

When u saved pcd file, would u set the height and length of the pcd file?

abhishekt711 commented 1 year ago

I have made a map, but NDT localization fails in the turning using HAP LiDAR.

lonlonago commented 7 months ago

save map code ; wechat 394467238

Yeager-101 commented 7 months ago

@HowoongJun I have my own opinions on saving maps. I think calling get_corner_map(), get_surf_map(), and get_nonfeature_map() cannot get the map you want to save, because the results obtained by these functions are not global, but only partial. As part of the map, if you want to save the global map, you cannot just call these functions.

creeper5820 commented 1 month ago

image I got a map using get_***_map( ). it is sparse and only retains some feature points