Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stage should take world size from the map size #24

Closed
gerkey opened this issue Feb 23, 2012 · 1 comment
Closed

Stage should take world size from the map size #24

gerkey opened this issue Feb 23, 2012 · 1 comment

Comments

@gerkey
Copy link

gerkey commented Feb 23, 2012

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

@rtv
Copy link
Owner

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants