google-deepmind / lab

A customisable 3D platform for agent-based AI research
Other
7.11k stars 1.37k forks source link

Receiving depth image from the simulator, Changing the environment #46

Closed Amir-Ramezani closed 6 years ago

Amir-Ramezani commented 7 years ago

Hi,

Thanks for your package.

As I noticed, it is possible to create an agent with your package, move the agent and receive the agent's view (RGB image) in every 4 steps or so.

My question is: can I receive a depth image instead of RGB image? and can I change the environment?

Regards,

tkoeppe commented 7 years ago

Yes, one of the observations that you get out of the API is RBGD (have a look which one, I forget).

What do you mean by "change the environment"? Your level script can load different maps dynamically (I think some of the examples demonstrate that).

Amir-Ramezani commented 7 years ago

Thanks, it was RGBD_INTERLACED.

I meant to open a map and edit the walls and other features.

tkoeppe commented 7 years ago

There are examples for using the "text level" map generation system to make simple grid maps, which can happen dynamically. You cannot dynamically modify the ready-made .bsp maps (though you could conceivably write code to implement such a feature).

Amir-Ramezani commented 7 years ago

I noticed there is a 'make_map' function in some Lua scripts for making a map from text file. and as I noticed for example I need to have a saved file containing the map information and give it as the input to the Lua function such as:

********
*a * x *****
**     *   *
 ****  I   *
    *  *   *
    *  *****
    *   *
******H*******
*        I P *
**************

as explained in https://github.com/deepmind/lab/blob/master/docs/text_level.md What I cannot find is that how to call that function in my python code, or how exactly generate the map using that lua function (I didn't work with Lua before).

Beside that, for actions, LOOK_LEFT_RIGHT_PIXELS_PER_FRAME is for turn or rotate to left and right, correct me if I am wrong.

Finally, Is it possible to get a top view of the agent in the environment? (a 2D image that shows the agent as it is a camera looking at the agent from top). And also is it possible to get the position of the agent and/or its distance with the walls?

Thanks,

charlesbeattie commented 6 years ago

You can pass settings via

function api:init(params)
  local map = params.textMap
end

Then construct the environment with 'textMap' : \<text of map> in the settings dictionary.

tkoeppe commented 6 years ago

Closing; please reopen if there are any further problems.