is it possible to add to the gmapping-generated map obstacles using GPS coordinates. Or any other messages expect LaserScan ?
i have an device that provides me GPS cordinates of ather boats, so i want to add them as obstacles in the gmapping map .
Asked by aksel on 2019-05-15 05:44:08 UTC
Answers
I don't know if it is possible to add them into gmapping, but if you just want them to show up as obstacles to avoid, you could feed the GPS coordinates directly into the costmap obstacle layer.
The simplest possible way to do this that I can see would be to take the GPS coordinate of each boat, pretend that it is a laser scan point and put it into a laser scan message. Publish this on a topic and configure the costmap obstacle layer to use this as an additional observation source where observation_sources
is a parameter to the obstacle layer saying which topics to listen to.
Hmm. Now that I think of it, since gmapping is listening to laser scans, it could possibly be configured to listen to this source as well.
Asked by Carl D on 2019-05-15 13:57:11 UTC
Comments
i had the same idea, but when i tried it, i found that gmapping does accept only one source of scan. thanks for abswering.
Asked by aksel on 2019-05-16 02:21:53 UTC
@aksel you could have a node that takes in your scan, adds to that message some points based on your GPS coordinates and republishes the scan with the added points and use the new message as input for the gmapping node. I'm not saying you should do it like this, but you could.
Asked by Reamees on 2019-05-20 01:42:47 UTC
ow yes thanks this is close to want i'm trying todo
Asked by aksel on 2019-05-21 03:05:53 UTC
@Carl D can you explain on how you can put that laser scan point (obtained from gps coordinate) into a laser scan msg? What will the laser scan msg look like?
Asked by pravi on 2020-11-05 16:58:52 UTC
The solution i found :
Getting a GPS point (coordinates). Converting these points to (x,y) of my gmapping map. Creating a frame at this (x,y) Publish a scan from this frame with the same name of topic that gmapping receives.
Asked by aksel on 2019-05-21 03:11:34 UTC
Comments
Hey, I'm trying to do it.. Can you elaborate on this? WHat do you mean by creating a frame at taht point and how did u do that? And, how did you generate the scan data?
Asked by pravi on 2020-11-05 14:49:01 UTC
@ aksel Can you elaborate on your solution or share your code please? What scan data did you publish from that frame?
Asked by pravi on 2020-11-05 16:55:45 UTC
Comments