Save 2D map

1,152 views
Skip to first unread message

Hunter L. Allen

unread,
Jul 28, 2017, 4:48:20 PM7/28/17
to google-cartographer
Hey all,

I was wondering what I'm doing wrong here: I'm just trying to save a 2D map, but the output map is rather strange.



I just ran a simple

```
rosrun map_server map_saver
```

to produce this. What's odd to me is the lack of occupancy lines -- the walls are not being registered somehow. Am I doing something incorrectly?

Thanks,
--Hunter

Holger Rapp

unread,
Jul 31, 2017, 5:10:02 AM7/31/17
to Hunter L. Allen, google-cartographer
​Does the /map look good in rViz? Do the /submaps look good? Could you attach a screenshot?​

My initial hunch is that map_saver does some sort of discretization at sub-optimal values.


--
You received this message because you are subscribed to the Google Groups "google-cartographer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cartographer+unsubscribe...@googlegroups.com.
To post to this group, send email to google-cartographer@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cartographer/f1e28052-a246-40c9-acc2-994d54375d0c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Google Germany GmbH
Erika-Mann-Straße 33
80331 München

Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschäftsführer: Matthew Scott Sucherman, Paul Terence Manicle


dgrie...@6river.com

unread,
Jul 31, 2017, 9:31:50 AM7/31/17
to google-cartographer, hun...@osrfoundation.org
We ran into this problem as well.  The map_saver node discretizes the map such that 100 is lethal, 0 is free, and anything else is unknown space.  Because Cartographer outputs the probability from 0-100, only things that are 100% likely to be an obstacle are saved as lethal obstacles by map_saver.  Our solution was to modify map_saver to take ranges for the values, i.e. 0-20 is free, 21-64 is unknown, and 65-100 is lethal.  We have not yet pushed a PR to ros-navigation for this change.

Cheers,
Dan


On Monday, July 31, 2017 at 5:10:02 AM UTC-4, Holger Rapp wrote:
​Does the /map look good in rViz? Do the /submaps look good? Could you attach a screenshot?​

My initial hunch is that map_saver does some sort of discretization at sub-optimal values.

On Fri, Jul 28, 2017 at 10:48 PM, Hunter L. Allen <hun...@osrfoundation.org> wrote:
Hey all,

I was wondering what I'm doing wrong here: I'm just trying to save a 2D map, but the output map is rather strange.



I just ran a simple

```
rosrun map_server map_saver
```

to produce this. What's odd to me is the lack of occupancy lines -- the walls are not being registered somehow. Am I doing something incorrectly?

Thanks,
--Hunter

--
You received this message because you are subscribed to the Google Groups "google-cartographer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cartographer+unsub...@googlegroups.com.
To post to this group, send email to google-ca...@googlegroups.com.

Hunter L. Allen

unread,
Jul 31, 2017, 2:14:09 PM7/31/17
to google-cartographer, hun...@osrfoundation.org


On Monday, July 31, 2017 at 6:31:50 AM UTC-7, dgrie...@6river.com wrote:
We ran into this problem as well.  The map_saver node discretizes the map such that 100 is lethal, 0 is free, and anything else is unknown space.  Because Cartographer outputs the probability from 0-100, only things that are 100% likely to be an obstacle are saved as lethal obstacles by map_saver.  Our solution was to modify map_saver to take ranges for the values, i.e. 0-20 is free, 21-64 is unknown, and 65-100 is lethal.  We have not yet pushed a PR to ros-navigation for this change.

You were very right! That's rather strange, as the comments are even there with the desired bounds. I guess this comes from the fact that GMapping itself rounds up, so it made sense for the map server to as well. 

I suppose it would be best to update the output yaml so that the occupancy is reflective of the input occupancy.

A PR upstream would almost certainly be welcome.
Cheers,

-Hunter

Guillaume Doisy

unread,
Aug 13, 2017, 6:26:24 PM8/13/17
to google-cartographer, hun...@osrfoundation.org
I am having the same issue. Is there currently a way to save a 2D map generated by cartographer?

Guillaume Doisy

unread,
Aug 13, 2017, 7:12:18 PM8/13/17
to google-cartographer, hun...@osrfoundation.org
Thanks a lot!

"I've PR'd the changes into the navigation stack.


You can checkout that branch for a temporary fix, and, otherwise, you can wait for the next nav stack release (assuming that gets merged before then)."

Damon Kohler

unread,
Aug 18, 2017, 6:00:58 AM8/18/17
to Guillaume Doisy, google-cartographer, hun...@osrfoundation.org
We don't recommend saving the map via map_saver due to the issues you all described. Instead, this should be implemented in the asset writer pipeline. This regression/feature is being tracked in https://github.com/googlecartographer/cartographer_ros/issues/475

Cheers,
To unsubscribe from this group and stop receiving emails from it, send an email to google-cartogra...@googlegroups.com.
Google Germany GmbH
Erika-Mann-Straße 33
80331 München

Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschäftsführer: Matthew Scott Sucherman, Paul Terence Manicle


Cheers,

-Hunter

--
You received this message because you are subscribed to the Google Groups "google-cartographer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cartogra...@googlegroups.com.

To post to this group, send email to google-ca...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--

Damon Kohler

Software Engineer

damon...@google.com

Google Germany GmbH

Erika-Mann-Straße 33

80636 München


Geschäftsführer: Paul Manicle, Halimah DeLaine Prado

Registergericht und -nummer: Hamburg, HRB 86891

Sitz der Gesellschaft: Hamburg


Diese E-Mail ist vertraulich. Falls sie diese fälschlicherweise erhalten haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter, löschen Sie alle Kopien und Anhänge davon und lassen Sie mich bitte wissen, dass die E-Mail an die falsche Person gesendet wurde.

    

This e-mail is confidential. If you received this communication by mistake, please don't forward it to anyone else, please erase all copies and attachments, and please let me know that it has gone to the wrong person.

Reply all
Reply to author
Forward
0 new messages