Is it possible to use both depth_image_to_laserscan and pointcloud_to_laserscan to generate a map?

asked 2020-05-29 08:00:39 -0500

StewartHemm74 gravatar image

updated 2020-06-01 12:34:31 -0500

I'm currently trying to use the slam_gmapping package, which subscribes to scans (sensor_msgs/LaserScan). I've been able to use just the depth image to laserscan ros package to produce these laserscans, however I wanted to know if I could "enhance" or "improve" the map by using point cloud data in conjuction with the depth images? Depth_image_to_laserscan and pointcloud_to_laserscan both publish laserscans for slam_gmapping to use, but when pointcloud_to_laserscan is only used no map is produced.

Update: Here is a image of the laser scans I have after using the pointcloud_to_laserscan ros package

rviz image of the laser scans

edit retag flag offensive close merge delete

Comments

1

I would suggest using a package that is made for the main sensor type. With pointcloud i would suggest trying rtabmap. This however asumes that you are using a single realsense or kinect like rgb-d camera to generate the pointcloud. As this devices only generate a view degrees wide laserscan its likely that a pure 360° laserscan algorythm might fail/underperform. Also those two mentioned nodes in your post have slight differences one of them cant handle tilted sensors for example. What kind of enhancement are you looking for?

Dragonslayer gravatar image Dragonslayer  ( 2020-05-29 08:59:32 -0500 )edit

I would like to use both of them. The point cloud data I have from using my device is very good, however when I use the pointcloud_to_laserscan ros package the laserscans aren't good and no costmap is produced for me to use slam_gmapping. What are the differences between the two packages or is there a resource the shows the differences? Thanks for your response too!

StewartHemm74 gravatar image StewartHemm74  ( 2020-05-29 10:05:59 -0500 )edit

With gmapping you create a map, that is afterwards used with (mostly) move_base and its costmaps for navigation. "no costmap is produced" typo? Resources, well start here: link textlink text - there isnt much to this nodes. Do I understand you correct, that with depthimage to laserscan all works well, just pointcloud to laserscan is the problem? PtoL is more cpu intense, but even a pi4 should work at some low frequency.

Dragonslayer gravatar image Dragonslayer  ( 2020-05-30 09:45:25 -0500 )edit

Yes, when using depthimage_to_laserscan all works well. Once I switch to use PtoL that were I have issues. The point cloud information looks great but the laser scans look awful. No map is able to be produced when using PtoL, after remapping the necessary topics to go to slam_gmapping and move base.

StewartHemm74 gravatar image StewartHemm74  ( 2020-06-01 08:03:46 -0500 )edit

PtoL actually produces a scan but its "awful", could you post a picture from rviz or so? This would imply that gmapping actually build a map or does this mean the scans are so bad that gmapping doesnt even recognize how this all should fit? Are you running g-mapping at the same time as move_base?

Dragonslayer gravatar image Dragonslayer  ( 2020-06-01 08:50:37 -0500 )edit

I am unable to post a picture from rvize. I can tell you that the scans are so bad that gmapping doesn't even recognize how they shoould all fit. I am running slam_g at the same time as move_base.

StewartHemm74 gravatar image StewartHemm74  ( 2020-06-01 08:58:43 -0500 )edit

Seems to be something wrong in the configuration of the node, what configuration do you use (got a yaml or launchfile to upload)? PtoL is much more tuneable than DtoL.

Dragonslayer gravatar image Dragonslayer  ( 2020-06-01 09:09:10 -0500 )edit

I have the default settings in the yamal file. I got the values from http://wiki.ros.org/pointcloud_to_las...

StewartHemm74 gravatar image StewartHemm74  ( 2020-06-01 09:11:14 -0500 )edit