Closed shehroze37-zz closed 8 years ago
It's not available as a button for agent, but you can use game.send_command("togglemap")
.
EDIT: Should we add it as a button?
Yesh I think getting access to the top down map will be useful as well. is it possible to get the map from the game state ? Cheers :-)
When I call game.send_game_command("togglemap") it gives me a segmentation fault.
When I call game.send_game_command("togglemap") it gives me a segmentation fault.
Works for me. Could you show an example that triggers the segfault? (Btw. note that map nor any command are unavailable during the competition).
I'm running it in the spectator file with deadly corridor scenario.
game.send_game_command("togglemap")
game.add_game_args("+freelook 1")
game.set_screen_resolution(ScreenResolution.RES_640X480) game.set_render_hud(False) game.set_render_weapon( True ) game.set_window_visible(True) game.set_mode(Mode.SPECTATOR)
game.init()
Put it after init() and new_episode()
On 9 June 2016 at 14:14, Shehroze Bhatti notifications@github.com wrote:
I'm running it in the spectator file with deadly corridor scenario.
game.send_game_command("togglemap")
game.add_game_args("+freelook 1")
game.set_screen_resolution(ScreenResolution.RES_640X480) game.set_render_hud(False) game.set_render_weapon( True ) game.set_window_visible(True) game.set_mode(Mode.SPECTATOR)
game.init()
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Marqt/ViZDoom/issues/84#issuecomment-224876963, or mute the thread https://github.com/notifications/unsubscribe/AEuSHa7t1sCxFQjeIDwYLgjhaM0Y0vm-ks5qKAOzgaJpZM4Iw7Uh .
The binding for the map is tab but still not getting the map when I press tab. Do I need to change something in the binding file?
No. W don't expose this button. It may change in the future though.
Only buttons added as available works in spectator mode. Additional bindings like togglemap, toggleconsole or showscores are disabled - commands are blocked, so game.send_command("tooglemap") will not work. In player mode commands are not filtered.
I have the idea to render the map on the another buffer and make it available as an additional channel. Possible that I will add it, but not in the near future.
Top down map is now implemented as separate buffer on 1.1-dev branch. See buffers.py example. Additional options will be added to the api soon.
Configuration options have been added some time ago. I think this feature is complete.
The map for deathmatch is only partial. It does not show the whole environment !
Somehow I did not notice that. Fixed, now map will follow the player. Thank you @shehroze37.
Dear maintainer, would you mind giving some examples that how to access the top-down map? The link shown above cannot be accessed. Cheers :)
Dear @QingyuanWuNothing, sorry for the long response time. Please see: https://github.com/Farama-Foundation/ViZDoom/blob/master/examples/python/automap_buffer.py - in this example, a top-down map is rendered as a buffer (an image).
and:
https://github.com/Farama-Foundation/ViZDoom/blob/master/examples/python/objects_and_sectors.py - in this example, a map is provided as a set of vertices and edges.
In the binding file, the button binding for top down map is listed but cant get access to the map. How can I get the top down map ?