koide3 / hdl_graph_slam

3D LIDAR-based Graph SLAM
BSD 2-Clause "Simplified" License
1.94k stars 723 forks source link

3D Navigation? or any options for generating 2D map from 3D map ? #219

Open robertsenps opened 2 years ago

robertsenps commented 2 years ago

Hi @koide3 ,

First of all, I would like to say thank you to your great 3d pipeline packages. I have used your package for almost 3 months. I did tune so many parameters including the scan_matching parameters and hdl_graph_slam. I successfully got a very decent map.

I want to use your 3d map also with your hdl localization to make the robot navigate in 3-dimensional space. Because there is no stable 3d navigation pkg on the internet, I decided to use 2d navigation instead. I try to generate a 2d map from 3d map using octomap. But I have a problem with the 2d map generation. I pass the whole 3d pointcloud to the octomap server and set the raytracing to true. I set the raytracing to true because I want to get an output map that is very similar to the 2d mapping like gmapping. The problem is every time the graph is changed (i.e. loop closing), the 2d map on octomap won't be updated according to where the aligned 3d map is located. So the 2d and 3d map is unaligned each other.

I also tried using individual samples from raw lidar to build an octomap representation, but it's the same.

My questions are:

  1. Is there any 3d navigation package that is suitable with hdl_graph_slam ?
  2. If there's no 3d navigation pkg, what should I do to get 2d map that is also updated when 3d map is updated/optimized ?

I'm waiting for your reply. Any help from you will be very helpful for me and the community.

Thanks :)

koide3 commented 2 years ago

Is there any 3d navigation package that is suitable with hdl_graph_slam ?

In my opinion, 3D navigation on ROS is not very matured, and I usually use the standard 2D navigation stack with a 2D (static) map generated offline. In my case, I didn't need a sophisticated navigation and used a very naive 2D map generation (extracting points in a certain height range):

https://github.com/koide3/pointcloud_to_2dmap

If there's no 3d navigation pkg, what should I do to get 2d map that is also updated when 3d map is updated/optimized ?

If you want to navigate the robot while dynamically creating the map, yes, you need to re-create the 2D map every time the 3D map is updated.

dionesiusap commented 2 years ago

This is interesting, I have a similar problem. I also need to somehow generate a 2D map online.

If you want to navigate the robot while dynamically creating the map, yes, you need to re-create the 2D map every time the 3D map is updated.

This is what I'm doing now, re-creating the 2D map from the whole 3D map pointcloud every time the 3D map gets updated. The problem is that as the map gets bigger, the 2D map generation takes a longer time.

I think it will be more efficient if we have some way of implementing a true dynamic 2D map (i.e. incrementally growing the 2D map; only processing the newly mapped point cloud part). Is this possible?

arjunskumar commented 1 year ago

@dionesiusap have you manged to implement dynamic 2d map?

joontack-han commented 1 year ago

@robertsenps @dionesiusap @arjunskumar Well have anybody got solution of 2d mapping? I was going to use @koide3's pcdto2dmap but changed direction to octomap since I couldn't run those properly.

arjunskumar commented 1 year ago

@joontack-han i don't have any solution yet

joontack-han commented 1 year ago

@arjunskumar Have u tried octomap or pointcloud_to_2dmap mentioned?