ros-perception / slam_gmapping

http://www.ros.org/wiki/slam_gmapping
668 stars 528 forks source link

Cannot use multiple laser scanners #17

Closed NCharabaruk closed 10 years ago

NCharabaruk commented 10 years ago

Hello,

I am attempting to get gmapping to work using 2 laser scanners. Unfortunately, it is not going well. Would it be possible to get gmapping updated so that it can use multiple laser range finders? Any hints on how I can get this to work?

Thanks

trigal commented 10 years ago

Hi,

I had the same problem not long ago. Unfortunately, after checking the code, it is not so easy to add this feature. With my colleagues at the iralab (University of Milano Bicocca) we developed a small ros node called "Laser-Merger". This node subscribes to any number of LaserScans topic and merges them in a unique LaserScan message, and finally you can use this virtual-laser in gmapping.

The Laser-Merger node is now part of our "ira-laser-tools" repository, and you can donwload/clone it following this link https://github.com/iralab/ira_laser_tools

We are writing the README right now, and you will find the documentation in the next hours. Please note that you need at least ROS-Hydro-Medusa to successfully compile the code!

Hope this helps (-: Augusto

NCharabaruk commented 10 years ago

Hi Augusto,

Thanks for the info and the link. I am trying to write a similar node, though more focused to my specific robot at the moment. Unfortunately it is not working. I shall take a look at your node.

Thanks for the help, Nick

wjwwood commented 10 years ago

I think this might be out-of-scope for the gmapping node to handle. I think that @trigal's approach is the correct one, especially since the gmapping node would need to do exactly this, since we should not modify the actual gmapping project to allow for multiple scanners.

Closing for now, please comment here if you believe it shouldn't be closed yet. Thanks!

mgerdzhev commented 9 years ago

I think that it should be handled in the gmapping node as there may be some problems with the "virtual" laser approach. E.g. if you have 2 lasers on 2 sides of a robot, but the overlap is such that there is a blind spot(see attached picture) this may lead to some problems if the virtual frame of reference is changed. E.g. on the picture the 2 lasers are the 2 black circles at the front, virtual one will be the blue dot in the front middle, the gray area is what the lasers see, This means that the yellow area will be a blind spot. if something is detected further away from the robot at the front, using the virtual transform of the robot(blue) gmapping will mark the area in front of the robot up until that point as "Safe" while in reality there may be an obstacle in the blind spot (red). Let me know if that makes sense.

gmapping_problem

wjwwood commented 9 years ago

As I posted before, we would need to modify the original gmapping software to support this and the best the gmapping node could do is to do a virtual laser like described above.

I don't have any experience with the gmapping software itself, but one could patch it and the gmapping node to take more than one laser, I just don't have time to do it. However, I would consider a pull request which tried to accomplish this.