Skip to content
This repository

Stage should take world size from the map size #24

Open
gerkey opened this Issue February 22, 2012 · 1 comment

2 participants

gerkey Richard Vaughan
gerkey

[Apologies if this has already been fixed. It was reported ages ago in the ROS world: https://code.ros.org/trac/ros-pkg/ticket/4133 and has recently come up on the users' list: http://sourceforge.net/mailarchive/forum.php?thread_name=CALpJrX6DDFUfYHwOF_MqNtfdShAeh2s78wJw-fG5W3%2BoWAVN0Q%40mail.gmail.com&forum_name=playerstage-users]

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.

Richard Vaughan
Owner

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.