Stage should take world size from the map size #24

gerkey opened this Issue Feb 23, 2012 · 1 comment


None yet

2 participants

gerkey commented Feb 23, 2012

[Apologies if this has already been fixed. It was reported ages ago in the ROS world: and has recently come up on the users' list:]

Stage trims white space from bitmaps, which has non-intuitive results, including changing the size and aspect ratio of the world. The declared world size should be applied to the actual size of the bitmap, irrespective of surrounding white space.

rtv commented Mar 1, 2012

There's no right way to do this, as Stage's maps are a rasterized version of a the named model and all its blocks. The blocks may or may not have come from a bitmap file. The width and height of the requested map may or may not be the same as the original bitmap. They may have come from a bitmap and been resized or otherwise transformed since. I expect what you want is that if you happen to know the pixel width and height of the original image, then you can request an image that size and get it from Stage. But if you know so much about that file, you can just get a map from the original image file.

RIght now Stage tells you the bounding box of the model in meters, and gives you a rasterization of the contents in the pixel array you ask for. This is the right behaviour in general, but I understand that it breaks the POLAstonishment.

A good workaround is to put a border around your bitmap.

What do you think?

@rtv rtv closed this Jan 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment