Ask Your Question
0

is it possible to add to the gmapping-generated map obstacles using GPS coordinates. Or any other messages expect LaserScan ?

asked 2019-05-15 05:44:08 -0500

aksel gravatar image

i have an device that provides me GPS cordinates of ather boats, so i want to add them as obstacles in the gmapping map .

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2019-05-15 13:57:11 -0500

Carl D gravatar image

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.

edit flag offensive delete link more

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.

aksel gravatar imageaksel ( 2019-05-16 02:21:53 -0500 )edit

@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.

Reamees gravatar imageReamees ( 2019-05-20 01:42:47 -0500 )edit

ow yes thanks this is close to want i'm trying todo

aksel gravatar imageaksel ( 2019-05-21 03:05:53 -0500 )edit
0

answered 2019-05-21 03:11:34 -0500

aksel gravatar image

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2019-05-15 05:44:08 -0500

Seen: 42 times

Last updated: May 21