ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
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-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

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?

pravi gravatar image pravi  ( 2020-11-05 13:49:01 -0500 )edit

@ aksel Can you elaborate on your solution or share your code please? What scan data did you publish from that frame?

pravi gravatar image pravi  ( 2020-11-05 15:55:45 -0500 )edit
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 image aksel  ( 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 image Reamees  ( 2019-05-20 01:42:47 -0500 )edit

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

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

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

pravi gravatar image pravi  ( 2020-11-05 15:58:52 -0500 )edit

Question Tools

Stats

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

Seen: 241 times

Last updated: May 21 '19